Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

made the script simple #490

Open
wants to merge 361 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
361 commits
Select commit Hold shift + click to select a range
63f0778
add missing __init__.py
tedchamb Aug 3, 2018
5d1e885
Merge pull request #106 from Microsoft/users/tedchamb/dev
tedchamb Aug 3, 2018
75bd43f
bump version to 0.1.15
tedchamb Aug 3, 2018
ecd2532
Merge pull request #108 from Microsoft/users/tedchamb/dev
tedchamb Aug 3, 2018
d786f07
update logging
tedchamb Aug 8, 2018
9660f1b
Merge pull request #109 from Microsoft/users/tedchamb/dev
tedchamb Aug 8, 2018
fea6357
bumnp version to 0.1.16
tedchamb Aug 8, 2018
42e2c57
Merge remote-tracking branch 'origin/dev' into users/tedchamb/dev
tedchamb Sep 4, 2018
a560db0
Fix time.clock() -> time.time() in _file_cache.py
zarenner Sep 11, 2018
36d14c1
Merge pull request #112 from zarenner/patch-1
tedchamb Sep 12, 2018
771feee
latest regen
tedchamb Sep 12, 2018
4ba41de
Merge remote-tracking branch 'origin/dev' into users/tedchamb/dev
tedchamb Sep 12, 2018
31d1aac
Merge pull request #113 from Microsoft/users/tedchamb/dev
tedchamb Sep 12, 2018
4d9e8a7
bump version to 0.1.17
tedchamb Sep 12, 2018
fd4b2a0
Merge pull request #115 from Microsoft/users/tedchamb/dev
tedchamb Sep 12, 2018
211ce79
fix invalid team_context property references.
tedchamb Sep 20, 2018
706da78
Merge pull request #118 from Microsoft/users/tedchamb/dev
tedchamb Sep 20, 2018
0617cb3
fix invalid team_context property references.
tedchamb Sep 20, 2018
db69b3b
Merge pull request #120 from Microsoft/users/tedchamb/dev
tedchamb Sep 20, 2018
c745399
Fix get_commits query parameters to match API
Sep 24, 2018
47b9fe5
Ensure that the license is packaged in the sdist
mariusvniekerk Oct 5, 2018
5c9f495
Update README.md
willsmythe Oct 5, 2018
9e67611
Update README.md
willsmythe Oct 5, 2018
c883ecb
Update get started steps in readme and other cleanup
willsmythe Oct 5, 2018
f764e7d
Update README.md
willsmythe Oct 5, 2018
e371a7e
Update README.md
willsmythe Oct 5, 2018
8eb8cb7
Merge pull request #124 from mariusvniekerk/patch-1
tedchamb Oct 5, 2018
3a7b96c
Fix for msrest 0.6.0 breaking change
tedchamb Oct 9, 2018
16d31c8
bump version to 0.1.18
tedchamb Oct 9, 2018
625f23f
Merge pull request #127 from Microsoft/users/tedchamb/dev
tedchamb Oct 9, 2018
c370f03
adding option to enable force msa pass through header
gauravsaralMs Oct 13, 2018
be6977c
bump version to 0.1.19
tedchamb Oct 15, 2018
03207b0
Merge pull request #131 from Microsoft/users/tedchamb/dev
tedchamb Oct 15, 2018
8cc3d26
Merge pull request #130 from gauravsaralMs/users/gsaral/forceMsaPassT…
tedchamb Oct 17, 2018
c7f10d0
Add resource area id to the graph client.
tedchamb Oct 23, 2018
ee5288b
Merge remote-tracking branch 'origin/dev' into users/tedchamb/dev
tedchamb Oct 23, 2018
283b2ac
Merge pull request #133 from Microsoft/users/tedchamb/dev
tedchamb Oct 23, 2018
80681ed
Merge pull request #122 from namankanakiya/dev
tedchamb Oct 23, 2018
7e180d1
regenerate 4.1 clients after fix to query parameter names for complex…
tedchamb Oct 23, 2018
e273d14
regenerate 4.0 clients after fix to query parameter names for complex…
tedchamb Oct 23, 2018
2ffa787
Merge pull request #134 from Microsoft/users/tedchamb/dev
tedchamb Oct 23, 2018
c6f4c03
update version to 0.1.20
tedchamb Oct 23, 2018
6fa1087
Merge pull request #136 from Microsoft/users/tedchamb/dev
tedchamb Oct 24, 2018
fc037f4
bump dependency of msrest: "msrest>=0.6.0,<0.7.0"
tedchamb Oct 25, 2018
8fcd85c
Merge pull request #138 from Microsoft/users/tedchamb/dev
tedchamb Oct 25, 2018
b91b356
bump version to 0.1.21
tedchamb Oct 25, 2018
51ebc47
Merge pull request #140 from Microsoft/users/tedchamb/dev
tedchamb Oct 25, 2018
0552b42
regen security client
tedchamb Dec 1, 2018
f43fb97
Merge pull request #146 from Microsoft/users/tedchamb/dev
tedchamb Dec 1, 2018
bb6e4c0
regen
tedchamb Dec 1, 2018
cec03ca
Merge pull request #147 from Microsoft/users/tedchamb/dev
tedchamb Dec 1, 2018
845c40a
regen after adding support for methods that return header values as p…
tedchamb Dec 1, 2018
15e8b2c
Merge pull request #148 from Microsoft/users/tedchamb/dev
tedchamb Dec 1, 2018
2526f20
regen 4.0 after adding support for methods that return header values …
tedchamb Dec 2, 2018
bedda2c
Merge pull request #149 from Microsoft/users/tedchamb/dev
tedchamb Dec 2, 2018
ec4f7ab
bump version to 0.1.22
tedchamb Dec 3, 2018
d598b8d
Merge pull request #151 from Microsoft/users/tedchamb/dev
tedchamb Dec 3, 2018
0cff440
Fix deserialization issue with missing DayOfWeek.
tedchamb Jan 3, 2019
a72fc7d
Merge pull request #156 from Microsoft/users/tedchamb/dev
tedchamb Jan 3, 2019
7f3d548
bump version to 0.1.23
tedchamb Jan 3, 2019
1bacd2a
Merge pull request #158 from Microsoft/users/tedchamb/dev
tedchamb Jan 3, 2019
0dbaf30
set creds on config (to support msrest 0.6.3)
tedchamb Jan 9, 2019
5dd2bfa
fix download operations (4.0)
tedchamb Jan 9, 2019
709488b
Merge pull request #160 from Microsoft/users/tedchamb/dev
tedchamb Jan 9, 2019
2051bc2
bump version to 0.1.24
tedchamb Jan 10, 2019
f242ce0
Merge pull request #162 from Microsoft/users/tedchamb/dev
tedchamb Jan 10, 2019
b0524ad
Fix support for client uploads
tedchamb Jan 11, 2019
d4879cd
Merge pull request #163 from Microsoft/users/tedchamb/dev
tedchamb Jan 11, 2019
951ae43
Bump version to 0.1.25
tedchamb Jan 11, 2019
1fb3c2b
Merge pull request #165 from Microsoft/users/tedchamb/dev
tedchamb Jan 11, 2019
0a068f1
Fix for enum references within collections
tedchamb Jan 15, 2019
0ea25c3
Merge pull request #168 from Microsoft/users/tedchamb/dev
tedchamb Jan 15, 2019
b119880
Bump version to 0.1.26
tedchamb Jan 15, 2019
d160269
Merge pull request #170 from Microsoft/users/tedchamb/dev
tedchamb Jan 15, 2019
ad4d454
Initial refactor for v4 of sdk.
tedchamb Feb 11, 2019
e7df9e5
fix up doc strings
tedchamb Feb 12, 2019
8823a37
temp fix for readme sample, until we add factory
tedchamb Feb 12, 2019
e207807
Fix .gitignore
tedchamb Feb 12, 2019
b38ca38
remove test.py
tedchamb Feb 12, 2019
b219c5a
Initial commit for version 5.x
tedchamb Feb 12, 2019
bfa12a7
update readme
tedchamb Feb 12, 2019
655aa55
update readme
tedchamb Feb 12, 2019
507ba8a
small fix to init
tedchamb Feb 12, 2019
782b86b
Add initial client factories
tedchamb Feb 13, 2019
1f6a56c
Fixes for factories, comments, add process definition area
tedchamb Feb 13, 2019
a7db4bd
Get rid of process definitions
tedchamb Feb 13, 2019
62e52fa
fixed up profiles
tedchamb Feb 14, 2019
c4e8377
typo
tedchamb Feb 14, 2019
7d74a2e
add release client
tedchamb Feb 14, 2019
47d5820
add factory comment
tedchamb Feb 14, 2019
394b96e
add missing git_client
tedchamb Feb 15, 2019
85ef56a
add release clients factory
tedchamb Feb 15, 2019
24bfe30
move released client factory under released.
tedchamb Feb 25, 2019
b1bbf39
Update version to b
tedchamb Feb 25, 2019
0061296
Merge pull request #178 from Microsoft/users/tedchamb/dev5
tedchamb Feb 25, 2019
52564f7
Update version to b2
tedchamb Feb 25, 2019
bff43dc
Merge pull request #180 from Microsoft/users/tedchamb/dev5
tedchamb Feb 25, 2019
128de09
Fix casing in v5_0 Nuget client files.
tedchamb Feb 28, 2019
e74c693
delete miscased v5_1 Nuget client files.
tedchamb Feb 28, 2019
3194aae
add back v5_1 Nuget client files.
tedchamb Feb 28, 2019
942aee5
Merge pull request #182 from Microsoft/users/tedchamb/dev5
tedchamb Feb 28, 2019
9a563ab
bump version to b3
tedchamb Feb 28, 2019
1088864
Merge pull request #184 from Microsoft/users/tedchamb/dev5
tedchamb Feb 28, 2019
278b753
Update 5.1 apis to M149
tedchamb Mar 13, 2019
2e2ba69
Merge pull request #189 from Microsoft/users/tedchamb/dev5
tedchamb Mar 13, 2019
c773d99
Regen 5.0 apis
tedchamb Mar 13, 2019
9397453
Merge pull request #190 from Microsoft/users/tedchamb/dev5
tedchamb Mar 13, 2019
58b2885
Bump version
tedchamb Mar 13, 2019
d83cf9b
Remove DeprecationWarning: Creds parameter is deprecated. Set config.…
tedchamb Apr 1, 2019
5ed92ff
Merge pull request #198 from Microsoft/users/tedchamb/dev5
tedchamb Apr 1, 2019
e1a5bc5
Regen for M149
tedchamb Apr 3, 2019
3d4dd41
Merge pull request #199 from Microsoft/users/tedchamb/dev5
tedchamb Apr 3, 2019
2cc15cb
Bump version
tedchamb Apr 3, 2019
bebbc73
regen 5.1 from M150
tedchamb Apr 23, 2019
4777ffd
Merge pull request #206 from Microsoft/users/tedchamb/dev5
tedchamb Apr 23, 2019
2f21440
regen 5.1 from M151
tedchamb May 9, 2019
90ed6ab
Merge pull request #210 from microsoft/users/tedchamb/dev5
tedchamb May 10, 2019
7cca757
Add resource area id for Profile client. Look up resource area infor…
tedchamb May 10, 2019
85b6473
Merge pull request #212 from microsoft/users/tedchamb/dev5
tedchamb May 10, 2019
8349447
delete obsolete wit comments client. These methods have been rolled…
tedchamb May 10, 2019
21ef1fa
add resource area id to 5.0 Profile client.
tedchamb May 10, 2019
0ff5501
fix 5.0 NuGet download_package method.
tedchamb May 10, 2019
dd030bd
Merge pull request #213 from microsoft/users/tedchamb/dev5
tedchamb May 13, 2019
f8ebb2a
version bump
tedchamb May 13, 2019
dc16b18
Merge pull request #215 from microsoft/users/tedchamb/dev5
tedchamb May 13, 2019
32318de
version bump
tedchamb May 13, 2019
f42d505
Merge pull request #217 from microsoft/users/tedchamb/dev5
tedchamb May 13, 2019
a88a21b
fix unexpected keyword argument 'file'
tedchamb May 16, 2019
17ebd25
Merge pull request #218 from microsoft/users/tedchamb/dev5
tedchamb May 16, 2019
3fd8bec
Fix cases where we were not adding custom headers to the request.
tedchamb May 20, 2019
19b21ac
convert header value to str in case its an int or other simple type.
tedchamb May 20, 2019
4f311a8
fix comments that had incorrect return type info
tedchamb May 20, 2019
3727230
Merge pull request #219 from microsoft/users/tedchamb/dev5
tedchamb May 20, 2019
cf279e5
add fiddler helper for debugging
tedchamb May 20, 2019
15a6db4
Merge pull request #220 from microsoft/users/tedchamb/dev5
tedchamb May 21, 2019
1dbc9b1
regen for M152
tedchamb May 28, 2019
2821f86
version bump to 5.0.0b8
tedchamb May 28, 2019
d8b76d8
Merge pull request #222 from microsoft/users/tedchamb/dev5
tedchamb May 29, 2019
efafbbb
version bump to 5.0.0b9
tedchamb May 29, 2019
d0a2b8d
Merge pull request #224 from microsoft/users/tedchamb/dev5
tedchamb May 29, 2019
257897c
regen for M153
tedchamb Jun 19, 2019
6467dde
Merge pull request #227 from microsoft/users/tedchamb/dev5
tedchamb Jun 19, 2019
92a67a9
bump version number to 5.0.0b10
tedchamb Jun 19, 2019
f7daec5
Merge pull request #229 from microsoft/users/tedchamb/dev5
tedchamb Jun 21, 2019
6f07554
fix model comments.
tedchamb Jul 1, 2019
c798941
Merge pull request #235 from microsoft/users/tedchamb/dev5
tedchamb Jul 1, 2019
f0c7d46
fix some camel casing
tedchamb Jul 1, 2019
1ce580b
Wrong class name in v5_1.test_results.__init__.py
SirPownzalot Jul 3, 2019
ff08865
fix a bunch of misspellings
tedchamb Jul 10, 2019
7c38fce
Merge pull request #239 from microsoft/users/tedchamb/dev5
tedchamb Jul 10, 2019
5538ecd
add some missing models
tedchamb Jul 10, 2019
55b4156
fix casing on TestResultsClient import
tedchamb Jul 16, 2019
42c4e41
Merge pull request #240 from microsoft/users/tedchamb/dev5
tedchamb Jul 16, 2019
03bf22a
Merge pull request #236 from SirPownzalot/patch-1
tedchamb Jul 16, 2019
21f891a
Update for M153 - includes released 5.1 clients
tedchamb Jul 23, 2019
4b63dba
Merge pull request #242 from microsoft/users/tedchamb/dev5
tedchamb Jul 23, 2019
b1a20a7
Add Search clients
tedchamb Jul 25, 2019
0804c52
Merge pull request #244 from microsoft/users/tedchamb/dev5
tedchamb Jul 25, 2019
3458ee0
Add audit and token clients. update resource area id on search client
tedchamb Jul 25, 2019
ab2f380
Merge pull request #245 from microsoft/users/tedchamb/dev5
tedchamb Jul 25, 2019
c6ec475
regen after spelling fixes
tedchamb Jul 25, 2019
ea6c073
One more spelling fix
tedchamb Jul 25, 2019
9ca0779
Merge pull request #246 from microsoft/users/tedchamb/dev5
tedchamb Jul 25, 2019
d0b5a07
Move back to beta, until I can look at the two open issues.
tedchamb Jul 25, 2019
143e245
update version
tedchamb Jul 25, 2019
f708734
Merge pull request #247 from microsoft/users/tedchamb/dev5
tedchamb Jul 25, 2019
9e9f1d1
fix Python badge
tedchamb Jul 25, 2019
fa8a8f3
fix Build badge
tedchamb Jul 25, 2019
0d63960
Merge pull request #248 from microsoft/users/tedchamb/dev5
tedchamb Jul 25, 2019
280eb04
Add missing released clients, fix some descriptions
tedchamb Jul 29, 2019
28fb905
Merge pull request #250 from microsoft/users/tedchamb/dev5
tedchamb Jul 29, 2019
52c7ecc
Fix Version model in Search area
tedchamb Aug 5, 2019
5f12ffa
Merge pull request #254 from microsoft/users/tedchamb/dev5
tedchamb Aug 5, 2019
c4f64dc
add support for returning continuationToken for methods using IPagedL…
tedchamb Aug 10, 2019
7675147
revert a change which broke route templates that had tokens that were…
tedchamb Aug 12, 2019
e7b68a9
Merge pull request #258 from microsoft/users/tedchamb/ct
tedchamb Aug 12, 2019
653182f
get rid of debug print statement, fix readme to adapt to continuation…
tedchamb Aug 12, 2019
390fff5
bump version
tedchamb Aug 12, 2019
46c84f8
Merge pull request #261 from microsoft/users/tedchamb/ct
tedchamb Aug 12, 2019
b2d3983
fix camelcasing and python property casing for 5.0 apis
tedchamb Sep 12, 2019
26a40be
Merge pull request #269 from microsoft/users/tedchamb/50cc
tedchamb Sep 12, 2019
936765d
regen 5.1 apis, fix casing of some 5.1 properties.
tedchamb Sep 12, 2019
e257726
Merge pull request #270 from microsoft/users/tedchamb/51cc
tedchamb Sep 12, 2019
5c904c2
bump version to 5.1.0.b4
tedchamb Sep 12, 2019
097e4dc
Merge pull request #271 from microsoft/users/tedchamb/bump
tedchamb Sep 12, 2019
fd7b462
regen after fixing a bunch of spelling mistakes in comments.
tedchamb Oct 14, 2019
c827cd0
Merge pull request #279 from microsoft/users/tedchamb/spelling
tedchamb Oct 19, 2019
147bc4c
bump VERSION = "5.1.0b5"
tedchamb Oct 19, 2019
1049a7d
Merge pull request #282 from microsoft/users/tedchamb/spelling
tedchamb Oct 19, 2019
d934338
fix issue #280, fix naming of upack_api_client folder: universal bec…
tedchamb Oct 20, 2019
7f26ce3
Merge pull request #283 from microsoft/users/tedchamb/issue280
tedchamb Oct 20, 2019
b7f9a97
Fix for issue #289 - check for location at deployment level if it doe…
tedchamb Nov 1, 2019
3a129fb
ensure we don't return a garbage url from _get_deployment_url, which …
tedchamb Nov 1, 2019
b888032
Merge pull request #292 from microsoft/users/tedchamb/issue289
tedchamb Nov 1, 2019
e443323
bump VERSION = "5.1.0b6"
tedchamb Nov 1, 2019
eff9cc2
Merge pull request #293 from microsoft/users/tedchamb/issue289
tedchamb Nov 1, 2019
988b3a4
add test
tedchamb Nov 23, 2019
388226d
Merge pull request #297 from microsoft/users/tedchamb/test
tedchamb Nov 23, 2019
e20c128
Create pythonpackage.yml - playing with actions (#296)
tedchamb Nov 23, 2019
8aea3d2
add .eggs/ to .gitignore (#299)
tedchamb Nov 23, 2019
ee11774
Add python package badge
tedchamb Nov 23, 2019
ac39ea4
fix python versions in setup.py (#300)
tedchamb Nov 23, 2019
b551d98
add python v3.8 (#301)
tedchamb Nov 24, 2019
9a04304
6.0 API (#303)
tedchamb Dec 9, 2019
052bd05
bump version
tedchamb Dec 9, 2019
c637a06
regen after fix for float types in generator for 6.0 apis
tedchamb Jan 3, 2020
4b7104f
regen after fix for float types in generator for 5.1 apis
tedchamb Jan 3, 2020
73e992b
regen after fix for float types in generator for 5.1 apis
tedchamb Jan 3, 2020
3838e91
Merge pull request #308 from microsoft/users/tedchamb/bv
tedchamb Jan 3, 2020
5428142
update apis to match 6.0 RTW
tedchamb Aug 13, 2020
a1988c8
Merge pull request #355 from microsoft/users/tedchamb/60rtm
tedchamb Aug 13, 2020
85bd417
fix for issue #354 (#356)
tedchamb Aug 13, 2020
451cade
regen 6.0 as preview (#358)
tedchamb Aug 15, 2020
d7b8b5f
Microsoft mandatory file
microsoft-github-policy-service[bot] Aug 1, 2022
f58dc26
Update pythonpackage.yml
tonybaloney Aug 24, 2022
23f2dfc
Update setup.py
tonybaloney Aug 24, 2022
528cc0f
Update pythonpackage.yml
tonybaloney Oct 26, 2022
e17e401
Update setup.py
tonybaloney Oct 26, 2022
1a6cae8
Run CI on pull-requests
tonybaloney Oct 30, 2022
558bfd9
Merge pull request #422 from microsoft/users/GitHubPolicyService/ed49…
tonybaloney Oct 30, 2022
f455f43
Remove 3.5 from CI test, check 3.8-3.11
tonybaloney Oct 30, 2022
f6f8d70
Update pythonpackage.yml
tonybaloney Oct 30, 2022
135ffda
Update pythonpackage.yml
tonybaloney Oct 30, 2022
deb2dca
Merge pull request #435 from tonybaloney/patch-2
tonybaloney Oct 30, 2022
03f4b6c
Merge branch 'dev' into patch-1
tonybaloney Oct 30, 2022
fb769da
Merge pull request #428 from tonybaloney/patch-1
tonybaloney Oct 30, 2022
c9b2fef
Update msrest dependency
tonybaloney Oct 31, 2022
0690005
Drop 2.7 support and declare this in setup.py
tonybaloney Oct 31, 2022
252a276
Merge pull request #436 from tonybaloney/patch_msrest
tonybaloney Oct 31, 2022
e25eae7
Initial supprt for 7.1 API version
Apr 14, 2023
8bfe26d
Remove deprecated python version
Apr 14, 2023
f34d2bf
Remove deprecated python version
Apr 14, 2023
d0fb5cf
Update metadata
Apr 14, 2023
2050a3f
Remove old versions, add 7.0 and relased versions
Apr 17, 2023
95cbacd
Fix test
Apr 17, 2023
2a7f41a
Update the client paths in connection
Apr 18, 2023
fef7099
Merge pull request #450 from microsoft/dev7.1
nechvatalp Apr 18, 2023
db488ba
Update description for Pypi
Apr 18, 2023
7f2d7a4
Fix conflict
Apr 18, 2023
a82393c
Updating .gitignore and pushing the released files, adding git clients
Apr 25, 2023
0fb14f8
Merge pull request #457 from microsoft/users/pnechvatal/FixMissingGit…
nechvatalp Apr 25, 2023
a16d446
Update models to fix deserialization error
Apr 26, 2023
5ed4a01
Merge pull request #458 from microsoft/users/pnechvatal/FixGitSeriali…
nechvatalp Apr 26, 2023
b2d0009
Update README.md
nechvatalp Apr 29, 2023
c7f405c
flag and test 3.12 support
tonybaloney Oct 6, 2023
a2b26bb
remove pkg_resources
tonybaloney Oct 6, 2023
87c3dde
Remove the __init__ and use namespace packages to fix the issue with …
tonybaloney Oct 9, 2023
32e705f
Merge pull request #469 from tonybaloney/flag_312
nechvatalp Nov 20, 2023
2cd2d0f
Bump version to 7.1.0b4
Nov 20, 2023
c05e936
made the script simple
boiken Mar 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@

# Shell scripts
*.sh eol=lf

# Python
*.py eol=lf
35 changes: 35 additions & 0 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Python package

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install azure-devops/
- name: Python compile
run: |
python -m compileall .
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Test with pytest
run: |
pip install pytest
pytest
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
env/**
dist/
lib/
.eggs/

# Build results
[Dd]ebug/
Expand Down Expand Up @@ -293,3 +294,11 @@ __pycache__/
*.btm.cs
*.odx.cs
*.xsd.cs
.vscode/
vsts/build/bdist.win32/

# don't ignore release management client
!azure-devops/azure/devops/*/release

# ignore private folder for testing reported issues
issues/
48 changes: 47 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
[![Python package](https://github.com/microsoft/azure-devops-python-api/workflows/Python%20package/badge.svg)](https://github.com/microsoft/azure-devops-python-api/actions)
[![Python](https://img.shields.io/pypi/pyversions/azure-devops.svg)](https://pypi.python.org/pypi/azure-devops)

# Contributing
# Azure DevOps Python API

This repository contains Python APIs for interacting with and managing Azure DevOps. These APIs power the Azure DevOps Extension for Azure CLI. To learn more about the Azure DevOps Extension for Azure CLI, visit the [Microsoft/azure-devops-cli-extension](https://github.com/Microsoft/azure-devops-cli-extension) repo.

## Install

```
pip install azure-devops
```

## Get started

To use the API, establish a connection using a [personal access token](https://docs.microsoft.com/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=vsts) and the URL to your Azure DevOps organization. Then get a client from the connection and make API calls.

```python
from azure.devops.connection import Connection
from msrest.authentication import BasicAuthentication

# Fill in with your personal access token and org URL
personal_access_token = 'YOURPAT'
organization_url = 'https://dev.azure.com/YOURORG'

# Create a connection to the org
credentials = BasicAuthentication('', personal_access_token)
connection = Connection(base_url=organization_url, creds=credentials)

# Get a client (the "core" client provides access to projects, teams, etc)
core_client = connection.clients.get_core_client()

# Get the first page of projects
get_projects_response = core_client.get_projects()

for index ,project in enumerate(get_projects_response):
print(f"[{index}]" , project.name )
```

## API documentation

This Python library provides a thin wrapper around the Azure DevOps REST APIs. See the [Azure DevOps REST API reference](https://docs.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-5.1) for details on calling different APIs.

## Samples

Learn how to call different APIs by viewing the samples in the [Microsoft/azure-devops-python-samples](https://github.com/Microsoft/azure-devops-python-samples) repo.

## Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
Expand Down
41 changes: 41 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->

## Security

Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).

If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.

## Reporting Security Issues

**Please do not report security vulnerabilities through public GitHub issues.**

Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).

If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).

You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).

Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:

* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.

## Preferred Languages

We prefer all communications to be in English.

## Policy

Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).

<!-- END MICROSOFT SECURITY.MD BLOCK -->
File renamed without changes.
1 change: 1 addition & 0 deletions azure-devops/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include LICENSE.txt
4 changes: 4 additions & 0 deletions azure-devops/azure/devops/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
import collections


logger = logging.getLogger(__name__)


class FileCache(collections.MutableMapping):
"""A simple dict-like class that is backed by a JSON file.

Expand All @@ -32,21 +35,21 @@ def load(self):
self.data = {}
try:
if os.path.isfile(self.file_name):
if self.max_age > 0 and os.stat(self.file_name).st_mtime + self.max_age < time.clock():
logging.info('Cache file expired: {file}'.format(file=self.file_name))
if self.max_age > 0 and os.stat(self.file_name).st_mtime + self.max_age < time.time():
logger.debug('Cache file expired: %s', self.file_name)
os.remove(self.file_name)
else:
logging.info('Loading cache file: {file}'.format(file=self.file_name))
logger.debug('Loading cache file: %s', self.file_name)
self.data = get_file_json(self.file_name, throw_on_empty=False) or {}
else:
logging.info('Cache file does not exist: {file}'.format(file=self.file_name))
except Exception as e:
logging.exception(e)
logger.debug('Cache file does not exist: %s', self.file_name)
except Exception as ex:
logger.debug(ex, exc_info=True)
# file is missing or corrupt so attempt to delete it
try:
os.remove(self.file_name)
except Exception as e2:
logging.exception(e2)
except Exception as ex2:
logger.debug(ex2, exc_info=True)
self.initial_load_occurred = True

def save(self):
Expand All @@ -71,10 +74,10 @@ def save_with_retry(self, retries=5):

def clear(self):
if os.path.isfile(self.file_name):
logging.info("Deleting file: " + self.file_name)
logger.info("Deleting file: " + self.file_name)
os.remove(self.file_name)
else:
logging.info("File does not exist: " + self.file_name)
logger.info("File does not exist: " + self.file_name)

def get(self, key, default=None):
self._check_for_initial_load()
Expand Down Expand Up @@ -108,11 +111,17 @@ def _check_for_initial_load(self):


def get_cache_dir():
vsts_cache_dir = os.getenv('VSTS_CACHE_DIR', None) or os.path.expanduser(os.path.join('~', '.vsts', 'python-sdk',
'cache'))
if not os.path.exists(vsts_cache_dir):
os.makedirs(vsts_cache_dir)
return vsts_cache_dir
azure_devops_cache_dir = os.getenv('AZURE_DEVOPS_CACHE_DIR', None)\
or os.path.expanduser(os.path.join('~', '.azure-devops', 'python-sdk', 'cache'))
if not os.path.exists(azure_devops_cache_dir):
try:
os.makedirs(azure_devops_cache_dir)
except OSError:
# https://github.com/microsoft/azure-devops-python-api/issues/354
# FileExistsError is not available in python 2.7
if not os.path.exists(azure_devops_cache_dir):
raise
return azure_devops_cache_dir


DEFAULT_MAX_AGE = 3600 * 12 # 12 hours
Expand Down Expand Up @@ -144,12 +153,12 @@ def read_file_content(file_path, allow_binary=False):
for encoding in ['utf-8-sig', 'utf-8', 'utf-16', 'utf-16le', 'utf-16be']:
try:
with codecs_open(file_path, encoding=encoding) as f:
logging.debug("attempting to read file %s as %s", file_path, encoding)
logger.debug("attempting to read file %s as %s", file_path, encoding)
return f.read()
except UnicodeDecodeError:
if allow_binary:
with open(file_path, 'rb') as input_file:
logging.debug("attempting to read file %s as binary", file_path)
logger.debug("attempting to read file %s as binary", file_path)
return base64.b64encode(input_file.read()).decode("utf-8")
else:
raise
Expand Down
Loading