devopsdriver 0.1.45__tar.gz → 0.1.48__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/PKG-INFO +6 -6
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/README.md +1 -1
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/__init__.py +1 -1
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/settings.py +29 -14
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver.egg-info/PKG-INFO +6 -6
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver.egg-info/requires.txt +4 -4
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/pyproject.toml +4 -4
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/tests/test_settings.py +40 -6
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/LICENSE +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/azdo/__init__.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/azdo/azureobject.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/azdo/builds/__init__.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/azdo/builds/build.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/azdo/builds/client.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/azdo/clients.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/azdo/pipeline/__init__.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/azdo/pipeline/client.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/azdo/pipeline/log.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/azdo/pipeline/pipeline.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/azdo/pipeline/run.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/azdo/timestamp.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/azdo/workitem/__init__.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/azdo/workitem/client.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/azdo/workitem/wiql.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/dataobject.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/manage_settings.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/sendmail.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/template.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver/templates/manage_settings.txt.mako +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver.egg-info/SOURCES.txt +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver.egg-info/dependency_links.txt +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver.egg-info/entry_points.txt +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/devopsdriver.egg-info/top_level.txt +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/setup.cfg +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/tests/test_azure_azureobject.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/tests/test_azure_build.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/tests/test_azure_build_client.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/tests/test_azure_clients.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/tests/test_azure_pipeline.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/tests/test_azure_pipeline_client.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/tests/test_azure_pipeline_run.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/tests/test_azure_timestamp.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/tests/test_azure_workitem_client.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/tests/test_azure_workitem_wiql.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/tests/test_dataobject.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/tests/test_manage_settings.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/tests/test_sendmail.py +0 -0
- {devopsdriver-0.1.45 → devopsdriver-0.1.48}/tests/test_template.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: devopsdriver
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.48
|
|
4
4
|
Summary: DevOps tools
|
|
5
5
|
Author-email: Marc Page <marcallenpage@gmail.com>
|
|
6
6
|
License: This is free and unencumbered software released into the public domain.
|
|
@@ -46,11 +46,11 @@ Classifier: Topic :: Software Development
|
|
|
46
46
|
Requires-Python: >=3.10
|
|
47
47
|
Description-Content-Type: text/markdown
|
|
48
48
|
License-File: LICENSE
|
|
49
|
-
Requires-Dist: PyYAML==6.0.
|
|
50
|
-
Requires-Dist: keyring==25.
|
|
51
|
-
Requires-Dist: setuptools==
|
|
49
|
+
Requires-Dist: PyYAML==6.0.2
|
|
50
|
+
Requires-Dist: keyring==25.3.0
|
|
51
|
+
Requires-Dist: setuptools==74.0.0
|
|
52
52
|
Requires-Dist: azure-devops==7.1.0b4
|
|
53
|
-
Requires-Dist: Mako==1.3.
|
|
53
|
+
Requires-Dist: Mako==1.3.5
|
|
54
54
|
Provides-Extra: dev
|
|
55
55
|
Requires-Dist: black>=24.3.0; extra == "dev"
|
|
56
56
|
Requires-Dist: pylint>=3.1.0; extra == "dev"
|
|
@@ -60,7 +60,7 @@ Requires-Dist: coverage>=7.4.4; extra == "test"
|
|
|
60
60
|
Provides-Extra: doc
|
|
61
61
|
|
|
62
62
|

|
|
63
|
-
[](https://pypi.org/project/devopsdriver/0.1.48/)
|
|
64
64
|
[](https://github.com/marcpage/devops-driver?tab=Unlicense-1-ov-file#readme)
|
|
65
65
|
[](https://github.com/marcpage/devops-driver/graphs/contributors)
|
|
66
66
|
[](http://makeapullrequest.com)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|

|
|
2
|
-
[](https://pypi.org/project/devopsdriver/0.1.48/)
|
|
3
3
|
[](https://github.com/marcpage/devops-driver?tab=Unlicense-1-ov-file#readme)
|
|
4
4
|
[](https://github.com/marcpage/devops-driver/graphs/contributors)
|
|
5
5
|
[](http://makeapullrequest.com)
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
or next to the file passed in (__file__).
|
|
21
21
|
This allows for secrets, keys, and tokens to be stored on the machine and not in the repo.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Files in the OS specific directories have priority over other files and are stored in:
|
|
24
24
|
- macOS: ~/Library/Preferences/
|
|
25
25
|
- Windows: %APPDATA%/
|
|
26
26
|
- Linux: ~/.devopsdriver/
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
This could be colors, emails, repos, queries, whatever.
|
|
54
54
|
|
|
55
55
|
Use case 4: override secrets for specific script
|
|
56
|
-
Overriding secrets stored in
|
|
57
|
-
If your script is `cool_script.py` save them to
|
|
56
|
+
Overriding secrets stored in `<pref>/devopsdriver.yml` for specific scripts.
|
|
57
|
+
If your script is `cool_script.py` save them to `<pref>/cool_script.yml`.
|
|
58
58
|
|
|
59
59
|
*Note*: You can override a specific setting in a sub-dictionary.
|
|
60
|
-
For instance, say
|
|
60
|
+
For instance, say `<pref>/devopsdriver.yml`:
|
|
61
61
|
|
|
62
62
|
```yaml
|
|
63
63
|
api:
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
password: Setec Astronomy
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
You could override this for `cool_script.py` be adding
|
|
68
|
+
You could override this for `cool_script.py` be adding `<pref>/cool_script.yml`:
|
|
69
69
|
|
|
70
70
|
```yaml
|
|
71
71
|
api:
|
|
@@ -143,19 +143,29 @@ class Settings:
|
|
|
143
143
|
PREF_DIR = {
|
|
144
144
|
"Darwin": join(ENVIRON.get("HOME", ""), "Library", "Preferences"),
|
|
145
145
|
"Windows": join(ENVIRON.get("APPDATA", "")),
|
|
146
|
-
"Linux": join(ENVIRON.get("HOME", ""), "
|
|
146
|
+
"Linux": join(ENVIRON.get("HOME", ""), ".%shared_name%"),
|
|
147
147
|
}
|
|
148
148
|
ENV_VAR_PATTERN = regex(r"\${(\S+)}")
|
|
149
149
|
|
|
150
|
-
def __init__(self, file: str, *directories, **settings):
|
|
150
|
+
def __init__(self, file: str, *directories, shared_name: str = None, **settings):
|
|
151
151
|
"""Create a settings object using a file, directories to search, and settings overrides
|
|
152
152
|
|
|
153
153
|
Args:
|
|
154
154
|
file (str): The basename to use and a directory to search. pass __file__
|
|
155
|
+
*directories (list[str]): You can pass other directories to search for files
|
|
156
|
+
shared_name (str, optional): The name of the common settings file.
|
|
157
|
+
Defaults to "devopsdriver".
|
|
158
|
+
**settings (dict[str,str]): Keys you want to directly override in the code
|
|
155
159
|
"""
|
|
156
160
|
self.overrides = settings
|
|
157
|
-
directories = [
|
|
158
|
-
|
|
161
|
+
directories = [
|
|
162
|
+
Settings.__preferences_dir(SHARED if shared_name is None else shared_name),
|
|
163
|
+
dirname(file),
|
|
164
|
+
*directories,
|
|
165
|
+
]
|
|
166
|
+
search_info = Settings.__all_paths(
|
|
167
|
+
file, directories, SHARED if shared_name is None else shared_name
|
|
168
|
+
)
|
|
159
169
|
self.search_files = [join(d, n + e) for e, n, d, _ in search_info]
|
|
160
170
|
self.settings = Settings.__find_all_settings(search_info)
|
|
161
171
|
self.opts = {}
|
|
@@ -316,9 +326,14 @@ class Settings:
|
|
|
316
326
|
return self.get(key)
|
|
317
327
|
|
|
318
328
|
@staticmethod
|
|
319
|
-
def __preferences_dir() -> str:
|
|
320
|
-
|
|
321
|
-
|
|
329
|
+
def __preferences_dir(shared_name: str) -> str:
|
|
330
|
+
|
|
331
|
+
default_dir = Settings.PREF_DIR[Settings.DEFAULT_PREF_DIR].replace(
|
|
332
|
+
"%shared_name%", shared_name
|
|
333
|
+
)
|
|
334
|
+
directory = Settings.PREF_DIR.get(SYSTEM(), default_dir).replace(
|
|
335
|
+
"%shared_name%", shared_name
|
|
336
|
+
)
|
|
322
337
|
MAKEDIRS(directory, exist_ok=True)
|
|
323
338
|
return directory
|
|
324
339
|
|
|
@@ -341,8 +356,8 @@ class Settings:
|
|
|
341
356
|
Settings.__merge(base[key], new[key])
|
|
342
357
|
|
|
343
358
|
@staticmethod
|
|
344
|
-
def __all_paths(file: str, directories: list[str]) -> list[tuple]:
|
|
345
|
-
names = [splitext(basename(file))[0],
|
|
359
|
+
def __all_paths(file: str, directories: list[str], shared: str) -> list[tuple]:
|
|
360
|
+
names = [splitext(basename(file))[0], shared]
|
|
346
361
|
return [
|
|
347
362
|
(e, n, d, f)
|
|
348
363
|
for n in names
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: devopsdriver
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.48
|
|
4
4
|
Summary: DevOps tools
|
|
5
5
|
Author-email: Marc Page <marcallenpage@gmail.com>
|
|
6
6
|
License: This is free and unencumbered software released into the public domain.
|
|
@@ -46,11 +46,11 @@ Classifier: Topic :: Software Development
|
|
|
46
46
|
Requires-Python: >=3.10
|
|
47
47
|
Description-Content-Type: text/markdown
|
|
48
48
|
License-File: LICENSE
|
|
49
|
-
Requires-Dist: PyYAML==6.0.
|
|
50
|
-
Requires-Dist: keyring==25.
|
|
51
|
-
Requires-Dist: setuptools==
|
|
49
|
+
Requires-Dist: PyYAML==6.0.2
|
|
50
|
+
Requires-Dist: keyring==25.3.0
|
|
51
|
+
Requires-Dist: setuptools==74.0.0
|
|
52
52
|
Requires-Dist: azure-devops==7.1.0b4
|
|
53
|
-
Requires-Dist: Mako==1.3.
|
|
53
|
+
Requires-Dist: Mako==1.3.5
|
|
54
54
|
Provides-Extra: dev
|
|
55
55
|
Requires-Dist: black>=24.3.0; extra == "dev"
|
|
56
56
|
Requires-Dist: pylint>=3.1.0; extra == "dev"
|
|
@@ -60,7 +60,7 @@ Requires-Dist: coverage>=7.4.4; extra == "test"
|
|
|
60
60
|
Provides-Extra: doc
|
|
61
61
|
|
|
62
62
|

|
|
63
|
-
[](https://pypi.org/project/devopsdriver/0.1.48/)
|
|
64
64
|
[](https://github.com/marcpage/devops-driver?tab=Unlicense-1-ov-file#readme)
|
|
65
65
|
[](https://github.com/marcpage/devops-driver/graphs/contributors)
|
|
66
66
|
[](http://makeapullrequest.com)
|
|
@@ -6,11 +6,11 @@ license = {file = "LICENSE"}
|
|
|
6
6
|
dynamic = ["version"]
|
|
7
7
|
requires-python = ">= 3.10"
|
|
8
8
|
dependencies = [
|
|
9
|
-
"PyYAML==6.0.
|
|
10
|
-
"keyring==25.
|
|
11
|
-
"setuptools==
|
|
9
|
+
"PyYAML==6.0.2",
|
|
10
|
+
"keyring==25.3.0",
|
|
11
|
+
"setuptools==74.0.0", # neded for azure-devops to use 7.1 API
|
|
12
12
|
"azure-devops==7.1.0b4",
|
|
13
|
-
"Mako==1.3.
|
|
13
|
+
"Mako==1.3.5",
|
|
14
14
|
]
|
|
15
15
|
keywords = ["azure", "devops", "jira", "confluence", "email", "pipelines", "tools"]
|
|
16
16
|
classifiers=[
|
|
@@ -98,6 +98,40 @@ def test_basic():
|
|
|
98
98
|
.env("yy", "yota")
|
|
99
99
|
)
|
|
100
100
|
ltr = {"Linux": "l", "Darwin": "m", "Windows": "w", "Unknown": "l"}
|
|
101
|
+
local_overrides = {
|
|
102
|
+
"Darwin": {
|
|
103
|
+
"v": "mmv",
|
|
104
|
+
"dp.v": "mmv",
|
|
105
|
+
"w": "mmw",
|
|
106
|
+
"dp.w": "mmw",
|
|
107
|
+
"x": "mmx",
|
|
108
|
+
"dp.x": "mmx",
|
|
109
|
+
},
|
|
110
|
+
"Linux": {
|
|
111
|
+
"v": "mlv",
|
|
112
|
+
"dp.v": "mlv",
|
|
113
|
+
"w": "mlw",
|
|
114
|
+
"dp.w": "mlw",
|
|
115
|
+
"x": "mlx",
|
|
116
|
+
"dp.x": "mlx",
|
|
117
|
+
},
|
|
118
|
+
"Windows": {
|
|
119
|
+
"v": "mwv",
|
|
120
|
+
"dp.v": "mwv",
|
|
121
|
+
"w": "mww",
|
|
122
|
+
"dp.w": "mww",
|
|
123
|
+
"x": "mwx",
|
|
124
|
+
"dp.x": "mwx",
|
|
125
|
+
},
|
|
126
|
+
"Unknown": {
|
|
127
|
+
"v": "mlv",
|
|
128
|
+
"dp.v": "mlv",
|
|
129
|
+
"w": "mlw",
|
|
130
|
+
"dp.w": "mlw",
|
|
131
|
+
"x": "mlx",
|
|
132
|
+
"dp.x": "mlx",
|
|
133
|
+
},
|
|
134
|
+
}
|
|
101
135
|
assert opts["yy"] == "yyenviron", opts["yy"]
|
|
102
136
|
assert opts["aa"] == 1, f"{opts['aa']} {os}"
|
|
103
137
|
assert opts["bb"] == 2, f"{opts['bb']} {os}"
|
|
@@ -145,12 +179,12 @@ def test_basic():
|
|
|
145
179
|
assert opts["dp.t"] == "2ammt", f"{opts['dp.t']} {os}"
|
|
146
180
|
assert opts["u"] == "2smmu", f"{opts['u']} {os}"
|
|
147
181
|
assert opts["dp.u"] == "2smmu", f"{opts['dp.u']} {os}"
|
|
148
|
-
assert opts["v"] == "
|
|
149
|
-
assert opts["dp.v"] == "
|
|
150
|
-
assert opts["w"] == "
|
|
151
|
-
assert opts["dp.w"] == "
|
|
152
|
-
assert opts["x"] == "
|
|
153
|
-
assert opts["dp.x"] == "
|
|
182
|
+
assert opts["v"] == local_overrides[os]["v"], f"{opts['v']} {os}"
|
|
183
|
+
assert opts["dp.v"] == local_overrides[os]["dp.v"], f"{opts['dp.v']} {os}"
|
|
184
|
+
assert opts["w"] == local_overrides[os]["w"], f"{opts['w']} {os}"
|
|
185
|
+
assert opts["dp.w"] == local_overrides[os]["dp.w"], f"{opts['dp.w']} {os}"
|
|
186
|
+
assert opts["x"] == local_overrides[os]["x"], f"{opts['x']} {os}"
|
|
187
|
+
assert opts["dp.x"] == local_overrides[os]["dp.x"], f"{opts['dp.x']} {os}"
|
|
154
188
|
assert opts["y"] == f"m{ltr[os]}y", f"{opts['y']} m{ltr[os]}y {os}"
|
|
155
189
|
assert opts["dp.y"] == f"m{ltr[os]}y", f"{opts['dp.y']} m{ltr[os]}y {os}"
|
|
156
190
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|