orchestrator-shell 0.1.0__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.
@@ -0,0 +1,12 @@
1
+ [bumpversion]
2
+ current_version = 0.1.0
3
+ commit = False
4
+ tag = False
5
+ parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(rc(?P<build>\d+))?
6
+ serialize =
7
+ {major}.{minor}.{patch}rc{build}
8
+ {major}.{minor}.{patch}
9
+
10
+ [bumpversion:file:wfoshell/__init__.py]
11
+ search = __version__ = "{current_version}"
12
+ replace = __version__ = "{new_version}"
@@ -0,0 +1,26 @@
1
+ name: Publish package on PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [created]
6
+
7
+ jobs:
8
+ deploy:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ - name: Set up Python
13
+ uses: actions/setup-python@v5
14
+ with:
15
+ python-version: '3.x'
16
+ - name: Install dependencies
17
+ run: |
18
+ python -m pip install --upgrade pip
19
+ pip install flit
20
+ env:
21
+ FLIT_ROOT_INSTALL: 1
22
+ - name: Build and publish
23
+ env:
24
+ FLIT_USERNAME: ${{ secrets.FLIT_USERNAME }}
25
+ FLIT_PASSWORD: ${{ secrets.FLIT_PASSWORD }}
26
+ run: flit publish
@@ -0,0 +1,5 @@
1
+ .idea/
2
+ .venv/
3
+ __pycache__/
4
+ .python-version
5
+ *.egg-info/
@@ -0,0 +1,202 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ Copyright [yyyy] [name of copyright owner]
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [2024] [Workflow Orchestrator Project]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,36 @@
1
+ Metadata-Version: 2.3
2
+ Name: orchestrator-shell
3
+ Version: 0.1.0
4
+ Summary: Shell for interacting with an orchestrator-core database.
5
+ Requires-Python: >=3.11,<3.14
6
+ Classifier: Intended Audience :: Information Technology
7
+ Classifier: Intended Audience :: System Administrators
8
+ Classifier: Operating System :: OS Independent
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python
11
+ Classifier: Topic :: Internet
12
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
13
+ Classifier: Topic :: Software Development :: Libraries
14
+ Classifier: Topic :: Software Development
15
+ Classifier: Typing :: Typed
16
+ Classifier: Development Status :: 5 - Production/Stable
17
+ Classifier: Environment :: Console
18
+ Classifier: Intended Audience :: Developers
19
+ Classifier: Intended Audience :: Telecommunications Industry
20
+ Classifier: License :: OSI Approved :: Apache Software License
21
+ Classifier: Programming Language :: Python :: 3 :: Only
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
26
+ Classifier: Topic :: Internet :: WWW/HTTP
27
+ Requires-Dist: cmd2
28
+ Requires-Dist: orchestrator-core
29
+ Requires-Dist: tabulate
30
+ Requires-Dist: mypy ; extra == "dev"
31
+ Requires-Dist: ruff ; extra == "dev"
32
+ Requires-Dist: types-tabulate ; extra == "dev"
33
+ Requires-Dist: bumpversion ; extra == "dev"
34
+ Project-URL: Documentation, https://workfloworchestrator.org/orchestrator-core/
35
+ Project-URL: Source, https://github.com/workfloworchestrator/wfoshell
36
+ Provides-Extra: dev
@@ -0,0 +1,225 @@
1
+ # wfoshell
2
+
3
+ The wfoshell (WorkFlow Orchestrator Shell) is an interactive shell to navigate
4
+ through subscriptions product blocks and resource types, and update
5
+ subscriptions and resource types directly in the database. The use of the GNU
6
+ Readline interface allows for command completion and history, as wel as command
7
+ line editing and search.
8
+
9
+ For various reasons, it sometimes happens that incorrect information ends up in
10
+ the WFO database. Those who know the database model can of course adjust this
11
+ information directly in the database with self-made SQL queries. For those who
12
+ prefer an easy way to navigate through the subscriptions, product blocks and
13
+ resource types to adjust incorrect information, can use the wfoshell.
14
+
15
+ ## Getting started
16
+
17
+ The wfoshell is tested with Python version 3.12.
18
+
19
+ Install the required Python modules:
20
+
21
+ ```shell
22
+ python -m venv venv
23
+ source venv/bin/activate
24
+ pip install orchestrator-shell
25
+ ```
26
+
27
+ And start the shell:
28
+
29
+ ```shell
30
+ python -m wfoshell
31
+ ```
32
+
33
+ ## Warning
34
+
35
+ The shell operates directly on the database, changes made are instantly
36
+ committed to the database. While using the shell, try to avoid other write
37
+ access to the database, or at least limit write access to the information you
38
+ are touching. Also note that none of the information that is updated in the
39
+ database is checked syntactically or in any other way, except for the insync,
40
+ start_date and end_date subscription fields, these fields will not allow
41
+ syntactically incorrect values. Updating information in the database with
42
+ unsupported values may brake things. Use this shell at your own risk.
43
+
44
+ Only scalar resource types are supported. All non-scalar resource types are
45
+ shown as `<unset or non-scalar>` while they can have a value in the database.
46
+ Optional yet unset resource types can be assigned a value with the
47
+ `resource_type update` command, but do not try to update non-scalar resource
48
+ types using the wfoshell.
49
+
50
+ ## Usage
51
+
52
+ ### Command overview
53
+
54
+ The following commands are supported. Each command has its own help on their
55
+ subcommands.
56
+
57
+ ```text
58
+ (wfo) help --verbose
59
+
60
+ Documented commands (use 'help -v' for verbose/'help <topic>' for details):
61
+ ======================================================================================================
62
+ exit Exit the application.
63
+ help List available commands or provide detailed help for a specific command
64
+ history View, run, edit, save, or clear previously entered commands
65
+ product_block List and select product blocks, show details, or follow depends on and in use by
66
+ product blocks.
67
+ quit Exit this application
68
+ resource_type List, select and update resource types, and show details.
69
+ set Set a settable parameter or show current settings of parameters
70
+ state Show state summary or details.
71
+ subscription List, search or select subscriptions, update fields, and show details.
72
+ ```
73
+
74
+ The `subscription`, `product_block` and `resource_type` commands are used
75
+ to navigate through the database and update information. All three commands
76
+ have `list`, `select` and `details` subcommands, and the `subscription`
77
+ and `resource_type` commands have an `update` subcommand. These subcommands
78
+ are used to list the specific type of information, select an item to work with,
79
+ show more detailed information, and update information in the database. In
80
+ addition, the `subscription` command has a case insensitive `search`
81
+ subcommand to quickly find a subscription, and the `product_block` command
82
+ has `depends_on` and `in_use_by` subcommands to navigate through product
83
+ blocks and therewith through subscriptions.
84
+
85
+ ### Configuration
86
+
87
+ Only little configuration is needed, and all is done through the shell
88
+ environment variables that are shown below together with their defaults:
89
+
90
+ ```text
91
+ DATABASE_URI=postgresql://nwa:nwa@localhost/orchestrator-core
92
+ WFOSHELL_HISTFILE=~/.wfoshell_history
93
+ WFOSHELL_HISTFILE_SIZE=1000
94
+ ```
95
+
96
+ ### Examples
97
+
98
+ #### Select subscription to update description
99
+
100
+ This example shows how to list and select a subscription, show subscription
101
+ details, and update the subscription description. When the description is
102
+ generated by a workflow and uses other information like resource types, then
103
+ make sure to match the description witch the associated information.
104
+
105
+ ```text
106
+ (wfo) subscription list
107
+ 0 core link 100G paris-1 ethernet-1/10 <-> ethernet-1/13 amsterdam-1 581a2251-d9cf-4a32-a5d7-1549eb3280e2
108
+ 1 node amsterdam-1 (active) bf5dacfa-0e89-4f5e-8b2f-d6e9327b21dc
109
+ 2 node paris-1 (active) 05b7198c-9d6e-4a97-9a3e-001e337110ee
110
+ 3 node rome-1 (active) b19ab933-48d6-4851-9687-41b72c0ab8b6
111
+ 4 port 10G paris-1 ethernet-1/5 data center connection fa6b26ed-fee1-48f6-a6ea-6baf39589be1
112
+ (wfo) subscription select 3
113
+ subscription node rome-1 (staged) b19ab933-48d6-4851-9687-41b72c0ab8b6
114
+ (wfo) subscription details
115
+ description node rome-1 (staged)
116
+ subscription_id b19ab933-48d6-4851-9687-41b72c0ab8b6
117
+ status active
118
+ product_id e537723f-6399-4ed3-b7ca-c54db4ff2c2a
119
+ customer_id bcaf232c-2f4c-476c-8c9b-c14542e3607d
120
+ insync False
121
+ start_date 2024-12-03 08:43:40.476615+00:00
122
+ end_date
123
+ note
124
+ product block(s) 0 name Node
125
+ resource types 0 ims_id 3
126
+ 1 ipv4_ipam_id 9
127
+ 2 ipv6_ipam_id 10
128
+ 3 node_description Rome international exchange
129
+ 4 node_name rome-1
130
+ 5 node_status staged
131
+ 6 nrm_id 3555
132
+ 7 role_id 2
133
+ 8 site_id 5
134
+ 9 type_id 7
135
+ (wfo) subscription update insync True
136
+ (wfo)
137
+ ```
138
+
139
+ #### Start with a port to find the node it is on
140
+
141
+ Search subscription by description and use the product block command to find
142
+ the associated node.
143
+
144
+ ```text
145
+ (wfo) subscription search "port 10g"
146
+ 0 port 10G paris-1 ethernet-1/5 data center connection fa6b26ed-fee1-48f6-a6ea-6baf39589be1
147
+ (wfo) subscription select 0
148
+ subscription port 10G paris-1 ethernet-1/5 data center connection fa6b26ed-fee1-48f6-a6ea-6baf39589be1
149
+ (wfo) subscription details --product_blocks_only
150
+ product block(s) 0 name Port
151
+ resource types 0 auto_negotiation False
152
+ 1 enabled True
153
+ 2 ims_id 12
154
+ 3 lldp False
155
+ 4 node <unset or non-scalar>
156
+ 5 nrm_id 33521
157
+ 6 port_description data center connection
158
+ 7 port_mode tagged
159
+ 8 port_name ethernet-1/5
160
+ 9 port_type 10gbase-x-xfp
161
+ (wfo) product_block select 0
162
+ subscription port 10G paris-1 ethernet-1/5 data center connection fa6b26ed-fee1-48f6-a6ea-6baf39589be1
163
+ product block Port 2918af3f-7dbb-4408-9fb1-ad71920487bc
164
+ (wfo) product_block details --depends_on_only
165
+ depends_on 0 name Node
166
+ resource types 0 ims_id 2
167
+ 1 ipv4_ipam_id 5
168
+ 2 ipv6_ipam_id 6
169
+ 3 node_description Paris 1
170
+ 4 node_name paris-1
171
+ 5 node_status staged
172
+ 6 nrm_id 47469
173
+ 7 role_id 2
174
+ 8 site_id 2
175
+ 9 type_id 5
176
+ (wfo) product_block depends_on 0
177
+ subscription node paris-1 (active) 05b7198c-9d6e-4a97-9a3e-001e337110ee
178
+ product block Node d097cf20-9c4c-4ba8-9008-701841933a45
179
+ (wfo)
180
+ ```
181
+
182
+ #### Select a resource type to update its value
183
+
184
+ Select a resource types on the currently selected product block to update its
185
+ value. New values are not syntactically checked. Any relation that this
186
+ resource type has with other information in the WFO database or any related
187
+ external administration, should eventually match the new value to avoid
188
+ unexpected results using the WFO.
189
+
190
+ ```text
191
+ (wfo) state summary
192
+ subscription node paris-1 (active) 05b7198c-9d6e-4a97-9a3e-001e337110ee
193
+ product block Node d097cf20-9c4c-4ba8-9008-701841933a45
194
+ (wfo) resource_type list
195
+ 0 ims_id 2
196
+ 1 ipv4_ipam_id 5
197
+ 2 ipv6_ipam_id 6
198
+ 3 node_description Paris 1
199
+ 4 node_name paris-1
200
+ 5 node_status staged
201
+ 6 nrm_id 47469
202
+ 7 role_id 2
203
+ 8 site_id 2
204
+ 9 type_id 5
205
+ (wfo) resource_type select 5
206
+ subscription node paris-1 (active) 05b7198c-9d6e-4a97-9a3e-001e337110ee
207
+ product block Node d097cf20-9c4c-4ba8-9008-701841933a45
208
+ resource_type node_status 75cc0264-f3f1-49ba-94ad-4bc0b96a5834
209
+ (wfo) resource_type update active
210
+ (wfo) resource_type details
211
+ resource_type node_status
212
+ value active
213
+ subscription_instance_value_id 75cc0264-f3f1-49ba-94ad-4bc0b96a5834
214
+ subscription_instance_id d097cf20-9c4c-4ba8-9008-701841933a45
215
+ resource_type_id 87a1523a-55d7-4431-804e-c70143330083
216
+ (wfo)
217
+ ```
218
+
219
+ ## Development
220
+
221
+ Install a Python venv as described at the top of this file, then run the following:
222
+ ```shell
223
+ pip install flit
224
+ flit install --deps develop --symlink --python venv/bin/python
225
+ ```
@@ -0,0 +1,130 @@
1
+ [build-system]
2
+ build-backend = "flit_core.buildapi"
3
+ requires = ["flit_core >=3.2,<4"]
4
+
5
+ [project]
6
+ name = "orchestrator-shell"
7
+ dynamic = ['version', 'description']
8
+ author = "SURF"
9
+ author-email = "automation-beheer@surf.nl"
10
+ home-page = "https://github.com/workfloworchestrator/wfoshell"
11
+ classifiers = [
12
+ "Intended Audience :: Information Technology",
13
+ "Intended Audience :: System Administrators",
14
+ "Operating System :: OS Independent",
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python",
17
+ "Topic :: Internet",
18
+ "Topic :: Software Development :: Libraries :: Python Modules",
19
+ "Topic :: Software Development :: Libraries",
20
+ "Topic :: Software Development",
21
+ "Typing :: Typed",
22
+ "Development Status :: 5 - Production/Stable",
23
+ "Environment :: Console",
24
+ "Intended Audience :: Developers",
25
+ "Intended Audience :: Telecommunications Industry",
26
+ "License :: OSI Approved :: Apache Software License",
27
+ "Programming Language :: Python :: 3 :: Only",
28
+ "Programming Language :: Python :: 3.13",
29
+ "Programming Language :: Python :: 3.12",
30
+ "Programming Language :: Python :: 3.11",
31
+ "Topic :: Internet :: WWW/HTTP :: HTTP Servers",
32
+ "Topic :: Internet :: WWW/HTTP",
33
+ ]
34
+ dependencies = [
35
+ "cmd2",
36
+ "orchestrator-core",
37
+ "tabulate",
38
+ ]
39
+
40
+ description-file = "README.md"
41
+ requires-python = ">=3.11,<3.14"
42
+
43
+ [project.urls]
44
+ Documentation = "https://workfloworchestrator.org/orchestrator-core/"
45
+ Source = "https://github.com/workfloworchestrator/wfoshell"
46
+
47
+ [project.optional-dependencies]
48
+ dev = [
49
+ "mypy",
50
+ "ruff",
51
+ "types-tabulate",
52
+ "bumpversion",
53
+ ]
54
+
55
+ [tool.flit.module]
56
+ name = "wfoshell"
57
+
58
+ [tool.black]
59
+ line-length = 120
60
+ target-version = ["py312", "py310"]
61
+ exclude = '''
62
+ (
63
+ /(
64
+ \.eggs # exclude a few common directories in the
65
+ | \.git # root of the project
66
+ | \.hg
67
+ | \.mypy_cache
68
+ | \.tox
69
+ | \.venv
70
+ | venv
71
+ | src
72
+ )/
73
+ )
74
+ '''
75
+
76
+ [tool.ruff]
77
+ lint.exclude = [
78
+ ".git",
79
+ ".cache",
80
+ ".eggs",
81
+ "__pycache__",
82
+ "venv",
83
+ ".venv",
84
+ "src",
85
+ ]
86
+ lint.ignore = [
87
+ "ANN101",
88
+ "ANN102",
89
+ "D100",
90
+ "D104",
91
+ "T201",
92
+ ]
93
+ line-length = 120
94
+ lint.select = [
95
+ "ANN",
96
+ "ARG",
97
+ "B",
98
+ "C",
99
+ "D",
100
+ "E",
101
+ "F",
102
+ "I",
103
+ "N",
104
+ "PGH",
105
+ "PTH",
106
+ "RET",
107
+ "RUF",
108
+ "S",
109
+ "T",
110
+ "W",
111
+ "Q",
112
+ ]
113
+ target-version = "py312"
114
+
115
+ [tool.ruff.lint.flake8-tidy-imports]
116
+ ban-relative-imports = "all"
117
+
118
+ [tool.ruff.lint.per-file-ignores]
119
+ "crm/api/*" = ["B008"]
120
+ "test/*" = ["S101"]
121
+
122
+ [tool.ruff.lint.pydocstyle]
123
+ convention = "google"
124
+
125
+ [tool.ruff.lint.isort]
126
+ known-first-party=["nwastdlib", "oauth2_lib"]
127
+
128
+ [tool.ruff.lint.mccabe]
129
+ # Explicitly set default to 7, so we can later lower this threshold once all 6+ issues are solved.
130
+ max-complexity = 7
@@ -0,0 +1,32 @@
1
+ [mypy]
2
+ exclude = (venv|test/unit_tests/cli/data/generate|orchestrator/vendor)
3
+ ignore_missing_imports = True
4
+ disallow_untyped_calls = True
5
+ disallow_untyped_defs = True
6
+ disallow_incomplete_defs = True
7
+ ;check_untyped_defs = True
8
+ disallow_untyped_decorators = True
9
+ no_implicit_optional = True
10
+ strict_optional = True
11
+ namespace_packages = true
12
+ warn_unused_ignores = True
13
+ warn_redundant_casts = True
14
+ ; Disable due to flaky results in mypy itself
15
+ ;warn_return_any = True
16
+ warn_no_return = True
17
+ warn_unreachable = True
18
+ implicit_reexport = False
19
+ strict_equality = True
20
+ show_error_codes = True
21
+ show_column_numbers = True
22
+ ;lineprecision_report = mypy-coverage
23
+ plugins = pydantic.mypy, strawberry.ext.mypy_plugin
24
+
25
+ ;Suppress "note: By default the bodies of untyped functions are not checked"
26
+ disable_error_code = annotation-unchecked
27
+
28
+ [pydantic-mypy]
29
+ init_forbid_extra = True
30
+ init_typed = True
31
+ warn_required_dynamic_aliases = True
32
+ warn_untyped_fields = True