devopsdriver 0.1.40__tar.gz → 0.1.41__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.40 → devopsdriver-0.1.41}/PKG-INFO +4 -4
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/README.md +1 -1
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/devopsdriver/__init__.py +1 -1
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/devopsdriver/azdo/__init__.py +1 -1
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/devopsdriver/azdo/workitem/wiql.py +36 -1
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/devopsdriver.egg-info/PKG-INFO +4 -4
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/devopsdriver.egg-info/requires.txt +2 -2
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/pyproject.toml +5 -2
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/tests/test_azure_workitem_wiql.py +15 -1
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/LICENSE +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/devopsdriver/azdo/clients.py +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/devopsdriver/azdo/timestamp.py +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/devopsdriver/azdo/workitem/__init__.py +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/devopsdriver/azdo/workitem/client.py +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/devopsdriver/azdo/workitem/workitem.py +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/devopsdriver/manage_settings.py +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/devopsdriver/sendmail.py +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/devopsdriver/settings.py +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/devopsdriver/template.py +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/devopsdriver/templates/manage_settings.txt.mako +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/devopsdriver.egg-info/SOURCES.txt +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/devopsdriver.egg-info/dependency_links.txt +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/devopsdriver.egg-info/entry_points.txt +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/devopsdriver.egg-info/top_level.txt +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/setup.cfg +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/tests/test_azure_clients.py +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/tests/test_azure_timestamp.py +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/tests/test_azure_workitem.py +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/tests/test_azure_workitem_client.py +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/tests/test_manage_settings.py +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/tests/test_sendmail.py +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/tests/test_settings.py +0 -0
- {devopsdriver-0.1.40 → devopsdriver-0.1.41}/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.41
|
|
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.
|
|
@@ -47,8 +47,8 @@ Requires-Python: >=3.10
|
|
|
47
47
|
Description-Content-Type: text/markdown
|
|
48
48
|
License-File: LICENSE
|
|
49
49
|
Requires-Dist: PyYAML==6.0.1
|
|
50
|
-
Requires-Dist: keyring==25.
|
|
51
|
-
Requires-Dist: setuptools==69.0
|
|
50
|
+
Requires-Dist: keyring==25.1.0
|
|
51
|
+
Requires-Dist: setuptools==69.2.0
|
|
52
52
|
Requires-Dist: azure-devops==7.1.0b4
|
|
53
53
|
Requires-Dist: Mako==1.3.2
|
|
54
54
|
Provides-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.41/)
|
|
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.41/)
|
|
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)
|
|
@@ -6,6 +6,6 @@ from .timestamp import Timestamp
|
|
|
6
6
|
|
|
7
7
|
from .workitem.workitem import WorkItem
|
|
8
8
|
from .workitem.wiql import Wiql, Value, Field
|
|
9
|
-
from .workitem.wiql import Ascending, Descending, And, Or
|
|
9
|
+
from .workitem.wiql import Ascending, Descending, And, Or, In, NotIn
|
|
10
10
|
from .workitem.wiql import Equal, NotEqual, LessThanOrEqual, GreaterThanOrEqual
|
|
11
11
|
from .workitem.wiql import IsEmpty, IsNotEmpty, LessThan, GreaterThan
|
|
@@ -133,15 +133,50 @@ class Compare: # pylint: disable=too-few-public-methods
|
|
|
133
133
|
field: Field | str,
|
|
134
134
|
value: Value | str | date | datetime | int | float,
|
|
135
135
|
operator: str,
|
|
136
|
+
value_is_computed=False,
|
|
136
137
|
):
|
|
137
138
|
self.left = field if isinstance(field, Field) else Field(field)
|
|
138
|
-
self.right =
|
|
139
|
+
self.right = (
|
|
140
|
+
value if value_is_computed or isinstance(value, Value) else Value(value)
|
|
141
|
+
)
|
|
139
142
|
self.operator = operator
|
|
140
143
|
|
|
141
144
|
def __str__(self) -> str:
|
|
142
145
|
return f"{str(self.left)} {self.operator} {str(self.right)}"
|
|
143
146
|
|
|
144
147
|
|
|
148
|
+
class In(Compare): # pylint: disable=too-few-public-methods
|
|
149
|
+
"""checks for field in a list of values"""
|
|
150
|
+
|
|
151
|
+
def __init__(
|
|
152
|
+
self,
|
|
153
|
+
field: Field | str,
|
|
154
|
+
*values: list[Value | str | date | datetime | int | float],
|
|
155
|
+
):
|
|
156
|
+
super().__init__(
|
|
157
|
+
field,
|
|
158
|
+
f"({', '.join(str(v if isinstance(v, Value) else Value(v)) for v in values)})",
|
|
159
|
+
"IN",
|
|
160
|
+
value_is_computed=True,
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
class NotIn(Compare): # pylint: disable=too-few-public-methods
|
|
165
|
+
"""checks for field in a list of values"""
|
|
166
|
+
|
|
167
|
+
def __init__(
|
|
168
|
+
self,
|
|
169
|
+
field: Field | str,
|
|
170
|
+
*values: list[Value | str | date | datetime | int | float],
|
|
171
|
+
):
|
|
172
|
+
super().__init__(
|
|
173
|
+
field,
|
|
174
|
+
f"({', '.join(str(v if isinstance(v, Value) else Value(v)) for v in values)})",
|
|
175
|
+
"NOT IN",
|
|
176
|
+
value_is_computed=True,
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
|
|
145
180
|
class Equal(Compare): # pylint: disable=too-few-public-methods
|
|
146
181
|
"""checks for equality"""
|
|
147
182
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: devopsdriver
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.41
|
|
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.
|
|
@@ -47,8 +47,8 @@ Requires-Python: >=3.10
|
|
|
47
47
|
Description-Content-Type: text/markdown
|
|
48
48
|
License-File: LICENSE
|
|
49
49
|
Requires-Dist: PyYAML==6.0.1
|
|
50
|
-
Requires-Dist: keyring==25.
|
|
51
|
-
Requires-Dist: setuptools==69.0
|
|
50
|
+
Requires-Dist: keyring==25.1.0
|
|
51
|
+
Requires-Dist: setuptools==69.2.0
|
|
52
52
|
Requires-Dist: azure-devops==7.1.0b4
|
|
53
53
|
Requires-Dist: Mako==1.3.2
|
|
54
54
|
Provides-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.41/)
|
|
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)
|
|
@@ -7,8 +7,8 @@ dynamic = ["version"]
|
|
|
7
7
|
requires-python = ">= 3.10"
|
|
8
8
|
dependencies = [
|
|
9
9
|
"PyYAML==6.0.1",
|
|
10
|
-
"keyring==25.
|
|
11
|
-
"setuptools==69.0
|
|
10
|
+
"keyring==25.1.0",
|
|
11
|
+
"setuptools==69.2.0", # neded for azure-devops to use 7.1 API
|
|
12
12
|
"azure-devops==7.1.0b4",
|
|
13
13
|
"Mako==1.3.2",
|
|
14
14
|
]
|
|
@@ -34,6 +34,9 @@ settings = "devopsdriver.manage_settings:main"
|
|
|
34
34
|
[tool.setuptools.package-data]
|
|
35
35
|
"*" = ["*.mako"]
|
|
36
36
|
|
|
37
|
+
[tool.setuptools.packages.find]
|
|
38
|
+
include = ["devopsdriver*"]
|
|
39
|
+
|
|
37
40
|
[project.optional-dependencies]
|
|
38
41
|
dev = [
|
|
39
42
|
"black>=24.3.0",
|
|
@@ -6,7 +6,7 @@ from datetime import date, datetime
|
|
|
6
6
|
|
|
7
7
|
from devopsdriver.azdo import Wiql
|
|
8
8
|
from devopsdriver.azdo import Ascending, Descending, Value
|
|
9
|
-
from devopsdriver.azdo import IsEmpty, IsNotEmpty, And, Or
|
|
9
|
+
from devopsdriver.azdo import IsEmpty, IsNotEmpty, And, Or, In, NotIn
|
|
10
10
|
from devopsdriver.azdo import GreaterThan, LessThan, Equal, NotEqual
|
|
11
11
|
from devopsdriver.azdo import GreaterThanOrEqual, LessThanOrEqual
|
|
12
12
|
|
|
@@ -65,7 +65,21 @@ def test_invalid_value_type() -> None:
|
|
|
65
65
|
pass
|
|
66
66
|
|
|
67
67
|
|
|
68
|
+
def test_in_and_not_in() -> None:
|
|
69
|
+
"""Test in and not in operators"""
|
|
70
|
+
builder = Wiql().where(
|
|
71
|
+
And(In("State", "New", "Ready for Development"), NotIn("Priority", 1, 2))
|
|
72
|
+
)
|
|
73
|
+
expected = (
|
|
74
|
+
"""SELECT [System.Id] FROM workitems WHERE [System.State] """
|
|
75
|
+
+ """IN ("New", "Ready for Development") AND [Microsoft.VSTS.Common.Priority] """
|
|
76
|
+
+ """NOT IN (1, 2)"""
|
|
77
|
+
)
|
|
78
|
+
assert str(builder) == expected, str(builder)
|
|
79
|
+
|
|
80
|
+
|
|
68
81
|
if __name__ == "__main__":
|
|
82
|
+
test_in_and_not_in()
|
|
69
83
|
test_invalid_value_type()
|
|
70
84
|
test_expressions()
|
|
71
85
|
test_no_params()
|
|
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
|