aei-workflow-runner 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.
- aei_workflow_runner-0.1.0/LICENSE +204 -0
- aei_workflow_runner-0.1.0/PKG-INFO +133 -0
- aei_workflow_runner-0.1.0/README.md +107 -0
- aei_workflow_runner-0.1.0/pyproject.toml +45 -0
- aei_workflow_runner-0.1.0/setup.cfg +4 -0
- aei_workflow_runner-0.1.0/src/aei_workflow/__init__.py +4 -0
- aei_workflow_runner-0.1.0/src/aei_workflow/__main__.py +5 -0
- aei_workflow_runner-0.1.0/src/aei_workflow/bounds.py +46 -0
- aei_workflow_runner-0.1.0/src/aei_workflow/cli.py +412 -0
- aei_workflow_runner-0.1.0/src/aei_workflow/compare.py +152 -0
- aei_workflow_runner-0.1.0/src/aei_workflow/csvsafe.py +46 -0
- aei_workflow_runner-0.1.0/src/aei_workflow/engine.py +105 -0
- aei_workflow_runner-0.1.0/src/aei_workflow/inputs.py +107 -0
- aei_workflow_runner-0.1.0/src/aei_workflow/locking.py +115 -0
- aei_workflow_runner-0.1.0/src/aei_workflow/logs.py +36 -0
- aei_workflow_runner-0.1.0/src/aei_workflow/report.py +221 -0
- aei_workflow_runner-0.1.0/src/aei_workflow/runner.py +161 -0
- aei_workflow_runner-0.1.0/src/aei_workflow/schedule.py +80 -0
- aei_workflow_runner-0.1.0/src/aei_workflow/schema.py +80 -0
- aei_workflow_runner-0.1.0/src/aei_workflow/service.py +398 -0
- aei_workflow_runner-0.1.0/src/aei_workflow/store.py +296 -0
- aei_workflow_runner-0.1.0/src/aei_workflow/workflow.py +178 -0
- aei_workflow_runner-0.1.0/src/aei_workflow_runner.egg-info/PKG-INFO +133 -0
- aei_workflow_runner-0.1.0/src/aei_workflow_runner.egg-info/SOURCES.txt +39 -0
- aei_workflow_runner-0.1.0/src/aei_workflow_runner.egg-info/dependency_links.txt +1 -0
- aei_workflow_runner-0.1.0/src/aei_workflow_runner.egg-info/entry_points.txt +2 -0
- aei_workflow_runner-0.1.0/src/aei_workflow_runner.egg-info/requires.txt +4 -0
- aei_workflow_runner-0.1.0/src/aei_workflow_runner.egg-info/top_level.txt +1 -0
- aei_workflow_runner-0.1.0/tests/test_automation_compare.py +119 -0
- aei_workflow_runner-0.1.0/tests/test_automation_compat.py +39 -0
- aei_workflow_runner-0.1.0/tests/test_automation_engine.py +64 -0
- aei_workflow_runner-0.1.0/tests/test_automation_inputs.py +99 -0
- aei_workflow_runner-0.1.0/tests/test_automation_report.py +141 -0
- aei_workflow_runner-0.1.0/tests/test_automation_runner.py +203 -0
- aei_workflow_runner-0.1.0/tests/test_automation_store.py +240 -0
- aei_workflow_runner-0.1.0/tests/test_cli.py +272 -0
- aei_workflow_runner-0.1.0/tests/test_contract.py +40 -0
- aei_workflow_runner-0.1.0/tests/test_schedule.py +94 -0
- aei_workflow_runner-0.1.0/tests/test_service.py +441 -0
- aei_workflow_runner-0.1.0/tests/test_web_interop.py +54 -0
- aei_workflow_runner-0.1.0/tests/tests_result.py +2 -0
|
@@ -0,0 +1,204 @@
|
|
|
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
|
|
44
|
+
purposes of this License, Derivative Works shall not include works
|
|
45
|
+
that remain separable from, or merely link (or bind by name) to the
|
|
46
|
+
interfaces of, the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including the
|
|
49
|
+
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
|
|
52
|
+
owner or by an individual or Legal Entity authorized to submit on
|
|
53
|
+
behalf of the copyright owner. For the purposes of this definition,
|
|
54
|
+
"submitted" means any form of electronic, verbal, or written
|
|
55
|
+
communication sent to the Licensor or its representatives,
|
|
56
|
+
including but not limited to communication on electronic mailing
|
|
57
|
+
lists, source code control systems, and issue tracking systems that
|
|
58
|
+
are managed by, or on behalf of, the Licensor for the purpose of
|
|
59
|
+
discussing and improving the Work, but excluding communication that
|
|
60
|
+
is conspicuously marked or otherwise designated in writing by the
|
|
61
|
+
copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have
|
|
78
|
+
made, use, offer to sell, sell, import, and otherwise transfer the
|
|
79
|
+
Work, where such license applies only to those patent claims
|
|
80
|
+
licensable by such Contributor that are necessarily infringed by
|
|
81
|
+
their Contribution(s) alone or by combination of their
|
|
82
|
+
Contribution(s) with the Work to which such Contribution(s) was
|
|
83
|
+
submitted. If You institute patent litigation against any entity
|
|
84
|
+
(including a cross-claim or counterclaim in a lawsuit) alleging
|
|
85
|
+
that the Work or a Contribution incorporated within the Work
|
|
86
|
+
constitutes direct or contributory patent infringement, then any
|
|
87
|
+
patent licenses granted to You under this License for that Work
|
|
88
|
+
shall terminate as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or Derivative
|
|
96
|
+
Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing
|
|
142
|
+
the origin of the Work and reproducing the content of the NOTICE
|
|
143
|
+
file.
|
|
144
|
+
|
|
145
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
146
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
147
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
148
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
149
|
+
implied, including, without limitation, any warranties or
|
|
150
|
+
conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS
|
|
151
|
+
FOR A PARTICULAR PURPOSE. You are solely responsible for
|
|
152
|
+
determining the appropriateness of using or redistributing the
|
|
153
|
+
Work and assume any risks associated with Your exercise of
|
|
154
|
+
permissions under this License.
|
|
155
|
+
|
|
156
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
157
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
158
|
+
unless required by applicable law (such as deliberate and grossly
|
|
159
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
160
|
+
liable to You for damages, including any direct, indirect, special,
|
|
161
|
+
incidental, or consequential damages of any character arising as a
|
|
162
|
+
result of this License or out of the use or inability to use the
|
|
163
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
164
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
165
|
+
other commercial damages or losses), even if such Contributor
|
|
166
|
+
has been advised of the possibility of such damages.
|
|
167
|
+
|
|
168
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
169
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
170
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
171
|
+
or other liability obligations and/or rights consistent with this
|
|
172
|
+
License. However, in accepting such obligations, You may act only
|
|
173
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
174
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
175
|
+
defend, and hold each Contributor harmless for any liability
|
|
176
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
177
|
+
of your accepting any such warranty or additional liability.
|
|
178
|
+
|
|
179
|
+
END OF TERMS AND CONDITIONS
|
|
180
|
+
|
|
181
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
182
|
+
|
|
183
|
+
To apply the Apache License to your work, attach the following
|
|
184
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
185
|
+
replaced with your own identifying information. (Don't include
|
|
186
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
187
|
+
comment syntax for the file format. We also recommend that a
|
|
188
|
+
file or class name and description of purpose be included on the
|
|
189
|
+
same "printed page" as the copyright notice for easier
|
|
190
|
+
identification within third-party archives.
|
|
191
|
+
|
|
192
|
+
Copyright 2026 AID Edge Inc.
|
|
193
|
+
|
|
194
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
195
|
+
you may not use this file except in compliance with the License.
|
|
196
|
+
You may obtain a copy of the License at
|
|
197
|
+
|
|
198
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
199
|
+
|
|
200
|
+
Unless required by applicable law or agreed to in writing, software
|
|
201
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
202
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
203
|
+
See the License for the specific language governing permissions and
|
|
204
|
+
limitations under the License.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: aei-workflow-runner
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Local-first workflow runner for Velorona: validated link workflows, per-link Path Clearance runs, crash-safe run history, comparison, evidence export, and a scheduler-friendly CLI. Shared by Velorona Web and the Velorona QGIS plugin.
|
|
5
|
+
Author: AID Edge Inc.
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/AIDEdgeInc-Lab/aei-workflow-runner
|
|
8
|
+
Project-URL: Repository, https://github.com/AIDEdgeInc-Lab/aei-workflow-runner
|
|
9
|
+
Project-URL: Issues, https://github.com/AIDEdgeInc-Lab/aei-workflow-runner/issues
|
|
10
|
+
Keywords: microwave,path-clearance,workflow,scheduler,local-first
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Telecommunications Industry
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering
|
|
19
|
+
Requires-Python: >=3.9
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: aei-link-clearance[elevation]>=0.1.0
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# aei-workflow-runner
|
|
28
|
+
|
|
29
|
+
The product-neutral core of Velorona's workflow automation, plus a headless CLI, `velorona-run`, for **unattended local
|
|
30
|
+
runs started by your own operating-system scheduler**.
|
|
31
|
+
|
|
32
|
+
* **Shared by two independent products.** The Velorona QGIS plugin uses this package as a library. Velorona Web (the browser Map)
|
|
33
|
+
cannot run Python, so it implements the same versioned documents in JavaScript and is held to them by tests. Neither product
|
|
34
|
+
needs the other, and neither needs this CLI to work.
|
|
35
|
+
* **Local-first.** Everything is written to a folder you choose. No AID Edge server, account, database, cloud service or
|
|
36
|
+
telemetry is involved, and none is required.
|
|
37
|
+
* **Scope today: terrestrial Path Clearance** on your own link list (CSV). It is read-only analysis and decision support. It does
|
|
38
|
+
**not** poll SNMP, ingest operator telemetry, predict outages, or change any network equipment.
|
|
39
|
+
|
|
40
|
+
Status: 0.1.0, first public release (alpha). It is offered as-is under the Apache License 2.0; see the limitations below for what has and has not been tested.
|
|
41
|
+
|
|
42
|
+
## What it is not (read this first)
|
|
43
|
+
|
|
44
|
+
* **Not a monitoring system.** A scheduled run re-analyses your link list against terrain data. Repeated runs give you a history of
|
|
45
|
+
*analysis results*, not telemetry samples over time, and not a replay of past conditions (terrain is a static model).
|
|
46
|
+
* **Not an always-on service.** It runs when your OS scheduler starts it. If the computer is off or asleep, nothing runs; the next
|
|
47
|
+
run records that occurrence as **missed** (it never pretends it ran). Use an always-on machine or server for overnight jobs.
|
|
48
|
+
* **Not a bundled data source.** Every link analysis asks the Open-Meteo elevation service for terrain. **Open-Meteo's free tier
|
|
49
|
+
is for non-commercial use only** (its terms: fewer than 10,000 calls/day, 5,000/hour, 600/minute, CC-BY 4.0 attribution;
|
|
50
|
+
checked 2026-09-26 at open-meteo.com/en/terms). A commercial operator needs its own Open-Meteo commercial subscription and
|
|
51
|
+
pays for it directly. This package has **no API-key or alternative-provider support yet** (NOT IMPLEMENTED), so a commercial
|
|
52
|
+
plan cannot be used through it today.
|
|
53
|
+
|
|
54
|
+
## Install
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
python3 -m pip install aei-workflow-runner # Python 3.9+; installs aei-link-clearance[elevation] and its dependencies
|
|
58
|
+
velorona-run --version
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
For development: `python3 -m pip install -e ".[dev]"` from a clone of this repository, then `pytest`.
|
|
62
|
+
|
|
63
|
+
Tested with Python 3.9.6 and 3.12.11 on macOS (Apple silicon). Linux is expected to work (POSIX code paths, cron/systemd
|
|
64
|
+
templates) but was **not tested by the maintainers**. Windows is **not supported** in this release: lock-liveness checks and Task
|
|
65
|
+
Scheduler setup were not implemented or tested.
|
|
66
|
+
|
|
67
|
+
## Verified local run
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
export VELORONA_STORE="$HOME/velorona-data" # YOUR folder; there is deliberately no default location
|
|
71
|
+
velorona-run init --name "Nightly check" --links "$HOME/links/latest.csv" --out nightly.json
|
|
72
|
+
velorona-run validate nightly.json # checks the workflow and the CSV, runs nothing
|
|
73
|
+
velorona-run install nightly.json # puts it in the store
|
|
74
|
+
velorona-run run --workflow-id <id printed by init> # one manual run
|
|
75
|
+
velorona-run status # last run, errors, next due, lock state
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
`--links` may be a CSV file, or a folder (the newest `*.csv` in it is used each run, so a nightly export dropped in that folder
|
|
79
|
+
is picked up automatically). Required CSV columns are exactly those of `aei_link_clearance.batch`:
|
|
80
|
+
`link_id, site_a_lat, site_a_lon, site_a_height_m, site_b_lat, site_b_lon, site_b_height_m, frequency_ghz`.
|
|
81
|
+
|
|
82
|
+
## Verified recurring run (via your OS scheduler)
|
|
83
|
+
|
|
84
|
+
See `docs/SCHEDULING.md`. In short: give the workflow a schedule when you create it
|
|
85
|
+
(`--daily 02:00 --timezone America/Toronto`), install it, and have cron / launchd / systemd run `velorona-run tick` every 5
|
|
86
|
+
minutes. `velorona-run schedule-template --kind launchd|cron|systemd --store DIR` prints ready-to-use text; it installs nothing.
|
|
87
|
+
Verified end to end on macOS with launchd (see the handoff).
|
|
88
|
+
|
|
89
|
+
## Where things are stored
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
<store>/workflows/<id>.json workflow definitions (older versions kept in workflows/_history/)
|
|
93
|
+
<store>/runs/<run_id>/run.json the immutable-in-practice record of each run (also missed occurrences)
|
|
94
|
+
<store>/runs/<run_id>/evidence/ report.md, results.csv, links.geojson, input_links.csv, run.json, manifest.json (SHA-256)
|
|
95
|
+
<store>/_pruned/<run_id>/ runs moved aside by YOUR retention settings (never deleted by this program)
|
|
96
|
+
<store>/logs/<workflow_id>.jsonl structured log: ids, statuses, counts, timings only (no link ids, coordinates, paths, errors)
|
|
97
|
+
<store>/locks/, <store>/schedule/ one-run-at-a-time lock; scheduler state
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Writes are atomic (temp file, fsync, rename). Nothing is overwritten silently: a new run has a new id, an existing workflow
|
|
101
|
+
needs `--replace` and a higher `workflow_version`, backups and exports refuse to overwrite an existing file or folder.
|
|
102
|
+
|
|
103
|
+
## Retention
|
|
104
|
+
|
|
105
|
+
Set by you per workflow: `--retain-runs N` (keep the newest N) and/or `--retain-hours H` (keep runs finished in the last H hours,
|
|
106
|
+
e.g. 1, 2, 10, 24, or 720). With neither, **everything is kept**. Runs outside your window are *moved* to `_pruned/`, together with
|
|
107
|
+
their evidence; this program never deletes them. Delete `_pruned/` yourself when you decide to. Logs are not rotated or removed.
|
|
108
|
+
|
|
109
|
+
## What leaves your machine
|
|
110
|
+
|
|
111
|
+
Only the terrain request, per link: `GET https://api.open-meteo.com/v1/elevation?latitude=<50 values>&longitude=<50 values>`,
|
|
112
|
+
the coordinates of 50 points along the straight path between the two endpoints. Not sent: link IDs, antenna heights, frequencies,
|
|
113
|
+
file names, workflow names, CSV contents, run results. The request goes directly from your machine to Open-Meteo (they see your IP
|
|
114
|
+
address and what any HTTP client sends); Velorona does not control how they log or keep it. Nothing is sent to AID Edge.
|
|
115
|
+
The test suite checks that the runner opens no other network connection (every socket connect is an error in the CLI tests).
|
|
116
|
+
|
|
117
|
+
## Backup, restore, interoperability
|
|
118
|
+
|
|
119
|
+
`velorona-run backup --out FILE.zip` / `restore FILE.zip` use the same zip layout as the QGIS plugin and Velorona Web
|
|
120
|
+
(`docs/CONTRACT.md`): a backup from any of the three restores in the other two, tested in both directions. Restore never
|
|
121
|
+
overwrites an existing record and validates every file (schema version, checksum, names). `import-doc` imports a single
|
|
122
|
+
`run.json` or workflow file. Browser-local storage (IndexedDB) and this folder are different storage systems: nothing syncs
|
|
123
|
+
between them; you move data explicitly with backup/restore.
|
|
124
|
+
|
|
125
|
+
## Known limitations
|
|
126
|
+
|
|
127
|
+
* Cancel (Ctrl-C / SIGTERM) takes effect between links; a request in flight finishes first (15 s timeout).
|
|
128
|
+
* A crash or `kill -9` leaves the run `running` on disk, with finished links saved (checkpoint at most every 2 s). The next run of
|
|
129
|
+
that workflow, or `status`/QGIS opening the store, relabels it `interrupted`.
|
|
130
|
+
* Lock liveness uses the process id on the same host; a lock from another host or an unreadable lock is treated as held and needs
|
|
131
|
+
`velorona-run unlock --workflow-id ID --force`. A store on a network share is not recommended.
|
|
132
|
+
* Retry is a fixed delay, not adaptive back-off; use `--pause-seconds` to stay under a provider's rate limit.
|
|
133
|
+
* Only `.csv` inputs up to 50 MB are read, whatever a workflow file says.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# aei-workflow-runner
|
|
2
|
+
|
|
3
|
+
The product-neutral core of Velorona's workflow automation, plus a headless CLI, `velorona-run`, for **unattended local
|
|
4
|
+
runs started by your own operating-system scheduler**.
|
|
5
|
+
|
|
6
|
+
* **Shared by two independent products.** The Velorona QGIS plugin uses this package as a library. Velorona Web (the browser Map)
|
|
7
|
+
cannot run Python, so it implements the same versioned documents in JavaScript and is held to them by tests. Neither product
|
|
8
|
+
needs the other, and neither needs this CLI to work.
|
|
9
|
+
* **Local-first.** Everything is written to a folder you choose. No AID Edge server, account, database, cloud service or
|
|
10
|
+
telemetry is involved, and none is required.
|
|
11
|
+
* **Scope today: terrestrial Path Clearance** on your own link list (CSV). It is read-only analysis and decision support. It does
|
|
12
|
+
**not** poll SNMP, ingest operator telemetry, predict outages, or change any network equipment.
|
|
13
|
+
|
|
14
|
+
Status: 0.1.0, first public release (alpha). It is offered as-is under the Apache License 2.0; see the limitations below for what has and has not been tested.
|
|
15
|
+
|
|
16
|
+
## What it is not (read this first)
|
|
17
|
+
|
|
18
|
+
* **Not a monitoring system.** A scheduled run re-analyses your link list against terrain data. Repeated runs give you a history of
|
|
19
|
+
*analysis results*, not telemetry samples over time, and not a replay of past conditions (terrain is a static model).
|
|
20
|
+
* **Not an always-on service.** It runs when your OS scheduler starts it. If the computer is off or asleep, nothing runs; the next
|
|
21
|
+
run records that occurrence as **missed** (it never pretends it ran). Use an always-on machine or server for overnight jobs.
|
|
22
|
+
* **Not a bundled data source.** Every link analysis asks the Open-Meteo elevation service for terrain. **Open-Meteo's free tier
|
|
23
|
+
is for non-commercial use only** (its terms: fewer than 10,000 calls/day, 5,000/hour, 600/minute, CC-BY 4.0 attribution;
|
|
24
|
+
checked 2026-09-26 at open-meteo.com/en/terms). A commercial operator needs its own Open-Meteo commercial subscription and
|
|
25
|
+
pays for it directly. This package has **no API-key or alternative-provider support yet** (NOT IMPLEMENTED), so a commercial
|
|
26
|
+
plan cannot be used through it today.
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
python3 -m pip install aei-workflow-runner # Python 3.9+; installs aei-link-clearance[elevation] and its dependencies
|
|
32
|
+
velorona-run --version
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
For development: `python3 -m pip install -e ".[dev]"` from a clone of this repository, then `pytest`.
|
|
36
|
+
|
|
37
|
+
Tested with Python 3.9.6 and 3.12.11 on macOS (Apple silicon). Linux is expected to work (POSIX code paths, cron/systemd
|
|
38
|
+
templates) but was **not tested by the maintainers**. Windows is **not supported** in this release: lock-liveness checks and Task
|
|
39
|
+
Scheduler setup were not implemented or tested.
|
|
40
|
+
|
|
41
|
+
## Verified local run
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
export VELORONA_STORE="$HOME/velorona-data" # YOUR folder; there is deliberately no default location
|
|
45
|
+
velorona-run init --name "Nightly check" --links "$HOME/links/latest.csv" --out nightly.json
|
|
46
|
+
velorona-run validate nightly.json # checks the workflow and the CSV, runs nothing
|
|
47
|
+
velorona-run install nightly.json # puts it in the store
|
|
48
|
+
velorona-run run --workflow-id <id printed by init> # one manual run
|
|
49
|
+
velorona-run status # last run, errors, next due, lock state
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`--links` may be a CSV file, or a folder (the newest `*.csv` in it is used each run, so a nightly export dropped in that folder
|
|
53
|
+
is picked up automatically). Required CSV columns are exactly those of `aei_link_clearance.batch`:
|
|
54
|
+
`link_id, site_a_lat, site_a_lon, site_a_height_m, site_b_lat, site_b_lon, site_b_height_m, frequency_ghz`.
|
|
55
|
+
|
|
56
|
+
## Verified recurring run (via your OS scheduler)
|
|
57
|
+
|
|
58
|
+
See `docs/SCHEDULING.md`. In short: give the workflow a schedule when you create it
|
|
59
|
+
(`--daily 02:00 --timezone America/Toronto`), install it, and have cron / launchd / systemd run `velorona-run tick` every 5
|
|
60
|
+
minutes. `velorona-run schedule-template --kind launchd|cron|systemd --store DIR` prints ready-to-use text; it installs nothing.
|
|
61
|
+
Verified end to end on macOS with launchd (see the handoff).
|
|
62
|
+
|
|
63
|
+
## Where things are stored
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
<store>/workflows/<id>.json workflow definitions (older versions kept in workflows/_history/)
|
|
67
|
+
<store>/runs/<run_id>/run.json the immutable-in-practice record of each run (also missed occurrences)
|
|
68
|
+
<store>/runs/<run_id>/evidence/ report.md, results.csv, links.geojson, input_links.csv, run.json, manifest.json (SHA-256)
|
|
69
|
+
<store>/_pruned/<run_id>/ runs moved aside by YOUR retention settings (never deleted by this program)
|
|
70
|
+
<store>/logs/<workflow_id>.jsonl structured log: ids, statuses, counts, timings only (no link ids, coordinates, paths, errors)
|
|
71
|
+
<store>/locks/, <store>/schedule/ one-run-at-a-time lock; scheduler state
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Writes are atomic (temp file, fsync, rename). Nothing is overwritten silently: a new run has a new id, an existing workflow
|
|
75
|
+
needs `--replace` and a higher `workflow_version`, backups and exports refuse to overwrite an existing file or folder.
|
|
76
|
+
|
|
77
|
+
## Retention
|
|
78
|
+
|
|
79
|
+
Set by you per workflow: `--retain-runs N` (keep the newest N) and/or `--retain-hours H` (keep runs finished in the last H hours,
|
|
80
|
+
e.g. 1, 2, 10, 24, or 720). With neither, **everything is kept**. Runs outside your window are *moved* to `_pruned/`, together with
|
|
81
|
+
their evidence; this program never deletes them. Delete `_pruned/` yourself when you decide to. Logs are not rotated or removed.
|
|
82
|
+
|
|
83
|
+
## What leaves your machine
|
|
84
|
+
|
|
85
|
+
Only the terrain request, per link: `GET https://api.open-meteo.com/v1/elevation?latitude=<50 values>&longitude=<50 values>`,
|
|
86
|
+
the coordinates of 50 points along the straight path between the two endpoints. Not sent: link IDs, antenna heights, frequencies,
|
|
87
|
+
file names, workflow names, CSV contents, run results. The request goes directly from your machine to Open-Meteo (they see your IP
|
|
88
|
+
address and what any HTTP client sends); Velorona does not control how they log or keep it. Nothing is sent to AID Edge.
|
|
89
|
+
The test suite checks that the runner opens no other network connection (every socket connect is an error in the CLI tests).
|
|
90
|
+
|
|
91
|
+
## Backup, restore, interoperability
|
|
92
|
+
|
|
93
|
+
`velorona-run backup --out FILE.zip` / `restore FILE.zip` use the same zip layout as the QGIS plugin and Velorona Web
|
|
94
|
+
(`docs/CONTRACT.md`): a backup from any of the three restores in the other two, tested in both directions. Restore never
|
|
95
|
+
overwrites an existing record and validates every file (schema version, checksum, names). `import-doc` imports a single
|
|
96
|
+
`run.json` or workflow file. Browser-local storage (IndexedDB) and this folder are different storage systems: nothing syncs
|
|
97
|
+
between them; you move data explicitly with backup/restore.
|
|
98
|
+
|
|
99
|
+
## Known limitations
|
|
100
|
+
|
|
101
|
+
* Cancel (Ctrl-C / SIGTERM) takes effect between links; a request in flight finishes first (15 s timeout).
|
|
102
|
+
* A crash or `kill -9` leaves the run `running` on disk, with finished links saved (checkpoint at most every 2 s). The next run of
|
|
103
|
+
that workflow, or `status`/QGIS opening the store, relabels it `interrupted`.
|
|
104
|
+
* Lock liveness uses the process id on the same host; a lock from another host or an unreadable lock is treated as held and needs
|
|
105
|
+
`velorona-run unlock --workflow-id ID --force`. A store on a network share is not recommended.
|
|
106
|
+
* Retry is a fixed delay, not adaptive back-off; use `--pause-seconds` to stay under a provider's rate limit.
|
|
107
|
+
* Only `.csv` inputs up to 50 MB are read, whatever a workflow file says.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "aei-workflow-runner"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Local-first workflow runner for Velorona: validated link workflows, per-link Path Clearance runs, crash-safe run history, comparison, evidence export, and a scheduler-friendly CLI. Shared by Velorona Web and the Velorona QGIS plugin."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = "Apache-2.0"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [{ name = "AID Edge Inc." }]
|
|
14
|
+
keywords = ["microwave", "path-clearance", "workflow", "scheduler", "local-first"]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 3 - Alpha",
|
|
17
|
+
"Intended Audience :: Telecommunications Industry",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Programming Language :: Python :: 3.9",
|
|
20
|
+
"Programming Language :: Python :: 3.10",
|
|
21
|
+
"Programming Language :: Python :: 3.11",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Topic :: Scientific/Engineering",
|
|
24
|
+
]
|
|
25
|
+
# The analysis itself stays in aei-link-clearance (unmodified); this package only orchestrates, validates, stores and reports.
|
|
26
|
+
# "elevation" brings `requests`, which the terrain lookup needs. Nothing else: no server, no database, no account.
|
|
27
|
+
dependencies = ["aei-link-clearance[elevation]>=0.1.0"]
|
|
28
|
+
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://github.com/AIDEdgeInc-Lab/aei-workflow-runner"
|
|
31
|
+
Repository = "https://github.com/AIDEdgeInc-Lab/aei-workflow-runner"
|
|
32
|
+
Issues = "https://github.com/AIDEdgeInc-Lab/aei-workflow-runner/issues"
|
|
33
|
+
|
|
34
|
+
[project.optional-dependencies]
|
|
35
|
+
dev = ["pytest>=7.0"]
|
|
36
|
+
|
|
37
|
+
[project.scripts]
|
|
38
|
+
velorona-run = "aei_workflow.cli:main"
|
|
39
|
+
|
|
40
|
+
[tool.setuptools.packages.find]
|
|
41
|
+
where = ["src"]
|
|
42
|
+
|
|
43
|
+
[tool.pytest.ini_options]
|
|
44
|
+
pythonpath = ["src", "tests"]
|
|
45
|
+
testpaths = ["tests"]
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""Terrestrial Path Clearance input bounds and their stated basis -- the single source of truth.
|
|
2
|
+
|
|
3
|
+
Product-neutral: no QGIS, no browser. The QGIS plugin builds its parameter dialog from this list, the runner
|
|
4
|
+
validates every input row against it, and the Web Map's evidence.js TERRESTRIAL_BOUNDS is held equal to it by
|
|
5
|
+
tests/test_bounds_contract.py (against contract/terrestrial_bounds.json) and by the Map repo's own copy of that file.
|
|
6
|
+
|
|
7
|
+
An out-of-range value is refused, never clamped.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
# Bounds carry their own basis, because an out-of-range value is accepted,
|
|
11
|
+
# computed and exported typed "Calculated" -- a physically meaningless number
|
|
12
|
+
# wearing the same authority as a real one. Each "basis" below says where the
|
|
13
|
+
# limit comes from; where no citable source exists it says so explicitly
|
|
14
|
+
# rather than presenting an engineering judgment as derived.
|
|
15
|
+
TERRESTRIAL_PARAM_SPEC = [
|
|
16
|
+
{"key": "site_a_height_m", "label": "Site A antenna height", "type": "float",
|
|
17
|
+
"default": 30.0, "suffix": " m", "min": 0.1, "max": 1000.0,
|
|
18
|
+
"basis": "Conservative engineering limit, not a derived bound: no library or "
|
|
19
|
+
"standard constrains antenna height. 1000 m clears the CN Tower (553 m) "
|
|
20
|
+
"and the tallest guyed mast (~628 m) with margin."},
|
|
21
|
+
{"key": "site_b_height_m", "label": "Site B antenna height", "type": "float",
|
|
22
|
+
"default": 30.0, "suffix": " m", "min": 0.1, "max": 1000.0,
|
|
23
|
+
"basis": "Conservative engineering limit, not a derived bound: no library or "
|
|
24
|
+
"standard constrains antenna height. 1000 m clears the CN Tower (553 m) "
|
|
25
|
+
"and the tallest guyed mast (~628 m) with margin."},
|
|
26
|
+
{"key": "frequency_ghz", "label": "Frequency", "type": "float",
|
|
27
|
+
"default": 7.0, "suffix": " GHz", "min": 0.1, "max": 100.0,
|
|
28
|
+
"basis": "Lower bound derived: aei_link_clearance.fresnel.fresnel_radius_m and "
|
|
29
|
+
"terrain.py both raise ValueError for a non-positive frequency. The "
|
|
30
|
+
"0.1-100 GHz envelope is a conservative engineering limit, not a model "
|
|
31
|
+
"range -- Fresnel geometry has no frequency ceiling. It brackets the "
|
|
32
|
+
"loaded ISED Fixed Service data (915.1 MHz to 85.75 GHz) so it cannot "
|
|
33
|
+
"exclude a real record."},
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def bounds() -> dict:
|
|
38
|
+
"""{key: (min, max)} for every bounded parameter."""
|
|
39
|
+
return {p["key"]: (p["min"], p["max"]) for p in TERRESTRIAL_PARAM_SPEC if "min" in p}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def contract() -> dict:
|
|
43
|
+
"""The machine-readable form written to contract/terrestrial_bounds.json (labels and units, no prose)."""
|
|
44
|
+
return {"schema": "velorona.terrestrial-bounds", "version": 1,
|
|
45
|
+
"bounds": {p["key"]: {"min": p["min"], "max": p["max"], "label": p["label"], "suffix": p.get("suffix", "").strip()}
|
|
46
|
+
for p in TERRESTRIAL_PARAM_SPEC if "min" in p}}
|