simurg-ppp 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.
- simurg_ppp-0.1.0/CHANGELOG.md +13 -0
- simurg_ppp-0.1.0/CONTRIBUTING.md +48 -0
- simurg_ppp-0.1.0/LICENSE +21 -0
- simurg_ppp-0.1.0/PKG-INFO +177 -0
- simurg_ppp-0.1.0/README.md +151 -0
- simurg_ppp-0.1.0/docs/release.md +62 -0
- simurg_ppp-0.1.0/pyproject.toml +93 -0
- simurg_ppp-0.1.0/src/ppp_client/__init__.py +29 -0
- simurg_ppp-0.1.0/src/ppp_client/__main__.py +7 -0
- simurg_ppp-0.1.0/src/ppp_client/api.py +53 -0
- simurg_ppp-0.1.0/src/ppp_client/cli.py +789 -0
- simurg_ppp-0.1.0/src/ppp_client/cli_entry.py +33 -0
- simurg_ppp-0.1.0/src/ppp_client/config.py +258 -0
- simurg_ppp-0.1.0/src/ppp_client/plotting.py +78 -0
- simurg_ppp-0.1.0/src/ppp_client/results.py +64 -0
- simurg_ppp-0.1.0/src/ppp_client/rinex.py +337 -0
- simurg_ppp-0.1.0/src/ppp_client/simurg.py +109 -0
- simurg_ppp-0.1.0/src/ppp_client/simurg_plugin.py +9 -0
- simurg_ppp-0.1.0/src/ppp_client/storage.py +364 -0
- simurg_ppp-0.1.0/src/ppp_client/tools/__init__.py +1 -0
- simurg_ppp-0.1.0/src/ppp_client/tools/external.py +145 -0
- simurg_ppp-0.1.0/src/ppp_client/tools/hatanaka.py +207 -0
- simurg_ppp-0.1.0/src/ppp_client/tools/rtklib.py +78 -0
- simurg_ppp-0.1.0/src/ppp_client/tui/__init__.py +2 -0
- simurg_ppp-0.1.0/src/ppp_client/tui/app.py +528 -0
- simurg_ppp-0.1.0/src/ppp_client/tui/date_range_selection.py +120 -0
- simurg_ppp-0.1.0/src/ppp_client/tui/date_selection.py +99 -0
- simurg_ppp-0.1.0/src/ppp_client/tui/group_selection.py +333 -0
- simurg_ppp-0.1.0/src/ppp_client/tui/input.py +49 -0
- simurg_ppp-0.1.0/src/ppp_client/tui/paste_site_selection.py +208 -0
- simurg_ppp-0.1.0/src/ppp_client/tui/site_cache.py +82 -0
- simurg_ppp-0.1.0/src/ppp_client/tui/site_selection.py +300 -0
- simurg_ppp-0.1.0/src/ppp_client/tui/startup.py +267 -0
- simurg_ppp-0.1.0/src/ppp_client/tui/workflow_progress.py +326 -0
- simurg_ppp-0.1.0/src/ppp_client/tui/workflow_runner.py +345 -0
- simurg_ppp-0.1.0/src/ppp_client/workflow.py +1243 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable user-facing changes should be documented in this file.
|
|
4
|
+
|
|
5
|
+
This project uses semantic versioning while the public API is small and evolving.
|
|
6
|
+
|
|
7
|
+
## 0.1.0 - 2026-08-31
|
|
8
|
+
|
|
9
|
+
- Package the project for PyPI as `simurg-ppp`.
|
|
10
|
+
- Add the installed `simurg-ppp` console command.
|
|
11
|
+
- Expose the future SIMURG plugin entry point `simurg.commands = ppp`.
|
|
12
|
+
- Keep compatibility wrappers for `python -m ppp_client`, `python ppp_client.py`, and `ppp_tui.py`.
|
|
13
|
+
- Include workflow, RINEX, PPP task, plotting, storage, and TUI functionality.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
## Development Setup
|
|
4
|
+
|
|
5
|
+
Use Python 3.10 or newer.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
python -m venv .venv
|
|
9
|
+
. .venv/bin/activate
|
|
10
|
+
pip install -e .
|
|
11
|
+
pip install pytest twine build
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Poetry can also be used for release workflows:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
poetry install
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Checks
|
|
21
|
+
|
|
22
|
+
Run the full test suite before submitting changes:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
python -m pytest -q
|
|
26
|
+
poetry check
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Build and inspect release artifacts before uploading:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
poetry build
|
|
33
|
+
python -m twine check dist/*
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Project Layout
|
|
37
|
+
|
|
38
|
+
- `src/ppp_client/` contains installable runtime code.
|
|
39
|
+
- `src/ppp_client/tui/` contains the terminal UI workflow.
|
|
40
|
+
- `src/ppp_client/tools/` contains adapters for external RINEX tools.
|
|
41
|
+
- `tests/` contains regression coverage for CLI, packaging, workflow, storage, and parsing behavior.
|
|
42
|
+
- `docs/` contains user and maintainer-facing documentation assets.
|
|
43
|
+
- `usecases/` contains runnable examples for manual workflow exploration.
|
|
44
|
+
|
|
45
|
+
## Release Notes
|
|
46
|
+
|
|
47
|
+
Update `CHANGELOG.md` for every user-facing change. Keep the package version in
|
|
48
|
+
`pyproject.toml` aligned with the next release entry.
|
simurg_ppp-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SIMURG PPP maintainers
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: simurg-ppp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: SIMURG PPP client and workflow tools
|
|
5
|
+
License: MIT
|
|
6
|
+
Keywords: gnss,ppp,precise-point-positioning,rinex,simurg
|
|
7
|
+
Author: SIMURG PPP maintainers
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering
|
|
22
|
+
Requires-Dist: matplotlib
|
|
23
|
+
Requires-Dist: requests
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# SIMURG PPP
|
|
27
|
+
|
|
28
|
+
SIMURG PPP is a Python client for running Precise Point Positioning workflows with SIMURG RINEX sources and a PPP processing service. It provides small command-line commands for individual PPP tasks, workflow commands for site/date processing, and an interactive terminal UI for selecting SIMURG sites and running batches.
|
|
29
|
+
|
|
30
|
+
The package is published as `simurg-ppp` and imports as `ppp_client`.
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pip install simurg-ppp
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## TUI
|
|
37
|
+
|
|
38
|
+
Run `simurg-ppp` with no subcommand to launch the interactive terminal UI:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
simurg-ppp
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The TUI guides the SIMURG PPP workflow from the terminal. It can check service availability, verify external RINEX tools, select stored groups, choose dates, load processed SIMURG sites, select sites manually or from pasted input, and run workflow batches while showing progress and logs. Launching the TUI also creates config automatically on first run when no standard config exists; feel free to change it if needed.
|
|
45
|
+
|
|
46
|
+
Useful TUI options:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
simurg-ppp --skip-startup
|
|
50
|
+
simurg-ppp --date 2025-11-11
|
|
51
|
+
simurg-ppp --storage-root workflow-data
|
|
52
|
+
simurg-ppp --select-only
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
For non-interactive site/date processing, use workflow commands:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
simurg-ppp workflow start irkj 2025-11-11
|
|
59
|
+
simurg-ppp workflow proceed irkj 2025-11-11
|
|
60
|
+
simurg-ppp workflow status irkj 2025-11-11
|
|
61
|
+
simurg-ppp workflow report irkj 2025-11-11
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## CLI
|
|
65
|
+
|
|
66
|
+
Use the atomic commands when you already have a local RINEX file or a PPP task id.
|
|
67
|
+
|
|
68
|
+
Create configuration first if it is fresh installation and you didn't run TUI app.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
simurg-ppp config init
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
`config init` creates the runtime config file and workflow storage layout in
|
|
75
|
+
standard system locations when permissions allow it, or in standard per-user
|
|
76
|
+
locations otherwise. Use `--storage-root` when you need a one-off storage
|
|
77
|
+
override.
|
|
78
|
+
|
|
79
|
+
### Atomic Commands
|
|
80
|
+
|
|
81
|
+
Create a PPP task from a RINEX file:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
simurg-ppp calculate irkj3150.25o
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Check a PPP task status:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
simurg-ppp check 0934dd49-0e75-47c9-a447-3728094929d7
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Plot XYZ result series to a PNG:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
simurg-ppp plot 0934dd49-0e75-47c9-a447-3728094929d7 results.png --xyz
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Python Usage (API)
|
|
100
|
+
|
|
101
|
+
Run a single SIMURG site/date workflow from Python:
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
from pathlib import Path
|
|
105
|
+
|
|
106
|
+
from ppp_client.tui.workflow_runner import (
|
|
107
|
+
WorkflowRunOptions,
|
|
108
|
+
configure_logging,
|
|
109
|
+
run_site_date_workflow,
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
configure_logging()
|
|
113
|
+
result = run_site_date_workflow(
|
|
114
|
+
"irkj",
|
|
115
|
+
"2025-11-11",
|
|
116
|
+
WorkflowRunOptions(
|
|
117
|
+
storage_root=Path("workflow-data"),
|
|
118
|
+
force_start=False,
|
|
119
|
+
poll_seconds=60.0,
|
|
120
|
+
timeout_seconds=3600.0,
|
|
121
|
+
),
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
if not result.ok:
|
|
125
|
+
raise RuntimeError(result.error)
|
|
126
|
+
|
|
127
|
+
print(result.report)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Use lower-level helpers directly when you want to compose your own flow:
|
|
131
|
+
|
|
132
|
+
```python
|
|
133
|
+
from ppp_client import check_task, create_task, plot_xyz_result_points
|
|
134
|
+
from ppp_client.results import collect_result_points
|
|
135
|
+
|
|
136
|
+
task = create_task("irkj3150.25o")
|
|
137
|
+
details = check_task(task["id"])
|
|
138
|
+
points = collect_result_points(details)
|
|
139
|
+
plot_xyz_result_points(points, "results.png")
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## SIMURG Ecosystem
|
|
143
|
+
|
|
144
|
+
This package does not install a root `simurg` command. It exposes a future plugin entry point named `ppp`, so a later umbrella package can provide:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
simurg ppp
|
|
148
|
+
simurg ppp workflow status irkj 2025-11-11
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Development
|
|
152
|
+
|
|
153
|
+
Install the package in editable mode, then install development tools:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
python -m venv .venv
|
|
157
|
+
. .venv/bin/activate
|
|
158
|
+
pip install -e .
|
|
159
|
+
pip install pytest twine build
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Run checks:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
python -m pytest -q
|
|
166
|
+
poetry check
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Build release artifacts:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
poetry build
|
|
173
|
+
python -m twine check dist/*
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) and [docs/release.md](docs/release.md) for maintainer workflows.
|
|
177
|
+
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# SIMURG PPP
|
|
2
|
+
|
|
3
|
+
SIMURG PPP is a Python client for running Precise Point Positioning workflows with SIMURG RINEX sources and a PPP processing service. It provides small command-line commands for individual PPP tasks, workflow commands for site/date processing, and an interactive terminal UI for selecting SIMURG sites and running batches.
|
|
4
|
+
|
|
5
|
+
The package is published as `simurg-ppp` and imports as `ppp_client`.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install simurg-ppp
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## TUI
|
|
12
|
+
|
|
13
|
+
Run `simurg-ppp` with no subcommand to launch the interactive terminal UI:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
simurg-ppp
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The TUI guides the SIMURG PPP workflow from the terminal. It can check service availability, verify external RINEX tools, select stored groups, choose dates, load processed SIMURG sites, select sites manually or from pasted input, and run workflow batches while showing progress and logs. Launching the TUI also creates config automatically on first run when no standard config exists; feel free to change it if needed.
|
|
20
|
+
|
|
21
|
+
Useful TUI options:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
simurg-ppp --skip-startup
|
|
25
|
+
simurg-ppp --date 2025-11-11
|
|
26
|
+
simurg-ppp --storage-root workflow-data
|
|
27
|
+
simurg-ppp --select-only
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
For non-interactive site/date processing, use workflow commands:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
simurg-ppp workflow start irkj 2025-11-11
|
|
34
|
+
simurg-ppp workflow proceed irkj 2025-11-11
|
|
35
|
+
simurg-ppp workflow status irkj 2025-11-11
|
|
36
|
+
simurg-ppp workflow report irkj 2025-11-11
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## CLI
|
|
40
|
+
|
|
41
|
+
Use the atomic commands when you already have a local RINEX file or a PPP task id.
|
|
42
|
+
|
|
43
|
+
Create configuration first if it is fresh installation and you didn't run TUI app.
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
simurg-ppp config init
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
`config init` creates the runtime config file and workflow storage layout in
|
|
50
|
+
standard system locations when permissions allow it, or in standard per-user
|
|
51
|
+
locations otherwise. Use `--storage-root` when you need a one-off storage
|
|
52
|
+
override.
|
|
53
|
+
|
|
54
|
+
### Atomic Commands
|
|
55
|
+
|
|
56
|
+
Create a PPP task from a RINEX file:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
simurg-ppp calculate irkj3150.25o
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Check a PPP task status:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
simurg-ppp check 0934dd49-0e75-47c9-a447-3728094929d7
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Plot XYZ result series to a PNG:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
simurg-ppp plot 0934dd49-0e75-47c9-a447-3728094929d7 results.png --xyz
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Python Usage (API)
|
|
75
|
+
|
|
76
|
+
Run a single SIMURG site/date workflow from Python:
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
from pathlib import Path
|
|
80
|
+
|
|
81
|
+
from ppp_client.tui.workflow_runner import (
|
|
82
|
+
WorkflowRunOptions,
|
|
83
|
+
configure_logging,
|
|
84
|
+
run_site_date_workflow,
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
configure_logging()
|
|
88
|
+
result = run_site_date_workflow(
|
|
89
|
+
"irkj",
|
|
90
|
+
"2025-11-11",
|
|
91
|
+
WorkflowRunOptions(
|
|
92
|
+
storage_root=Path("workflow-data"),
|
|
93
|
+
force_start=False,
|
|
94
|
+
poll_seconds=60.0,
|
|
95
|
+
timeout_seconds=3600.0,
|
|
96
|
+
),
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
if not result.ok:
|
|
100
|
+
raise RuntimeError(result.error)
|
|
101
|
+
|
|
102
|
+
print(result.report)
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Use lower-level helpers directly when you want to compose your own flow:
|
|
106
|
+
|
|
107
|
+
```python
|
|
108
|
+
from ppp_client import check_task, create_task, plot_xyz_result_points
|
|
109
|
+
from ppp_client.results import collect_result_points
|
|
110
|
+
|
|
111
|
+
task = create_task("irkj3150.25o")
|
|
112
|
+
details = check_task(task["id"])
|
|
113
|
+
points = collect_result_points(details)
|
|
114
|
+
plot_xyz_result_points(points, "results.png")
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## SIMURG Ecosystem
|
|
118
|
+
|
|
119
|
+
This package does not install a root `simurg` command. It exposes a future plugin entry point named `ppp`, so a later umbrella package can provide:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
simurg ppp
|
|
123
|
+
simurg ppp workflow status irkj 2025-11-11
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Development
|
|
127
|
+
|
|
128
|
+
Install the package in editable mode, then install development tools:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
python -m venv .venv
|
|
132
|
+
. .venv/bin/activate
|
|
133
|
+
pip install -e .
|
|
134
|
+
pip install pytest twine build
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Run checks:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
python -m pytest -q
|
|
141
|
+
poetry check
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Build release artifacts:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
poetry build
|
|
148
|
+
python -m twine check dist/*
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) and [docs/release.md](docs/release.md) for maintainer workflows.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Release Process
|
|
2
|
+
|
|
3
|
+
This project publishes the distribution name `simurg-ppp` and imports as
|
|
4
|
+
`ppp_client`.
|
|
5
|
+
|
|
6
|
+
## Preflight
|
|
7
|
+
|
|
8
|
+
1. Confirm the project license file exists and `pyproject.toml` exposes license
|
|
9
|
+
metadata for the PyPI project page.
|
|
10
|
+
2. Confirm `pyproject.toml` contains the intended version.
|
|
11
|
+
3. Confirm `CHANGELOG.md` contains an entry for that version.
|
|
12
|
+
4. Run checks:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
make check
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Build
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
make build
|
|
22
|
+
python -m twine check dist/*
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
For a local release preflight that checks the built artifacts and runs Poetry's
|
|
26
|
+
upload dry-run without requiring a license decision yet:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
make release-preflight
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
For public PyPI publication, the stricter release gate must pass:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
make release-check
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Install Smoke Test
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
python -m venv /tmp/simurg-ppp-release
|
|
42
|
+
/tmp/simurg-ppp-release/bin/pip install dist/simurg_ppp-0.1.0-py3-none-any.whl
|
|
43
|
+
/tmp/simurg-ppp-release/bin/simurg-ppp --help
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The installed distribution must not create a root `simurg` executable.
|
|
47
|
+
|
|
48
|
+
## Publish
|
|
49
|
+
|
|
50
|
+
Use TestPyPI first for a release candidate:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
export TEST_PYPI_TOKEN=pypi-...
|
|
54
|
+
make upload-testpypi
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Publish to PyPI after the TestPyPI package installs cleanly:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
export PYPI_TOKEN=pypi-...
|
|
61
|
+
make upload-pypi
|
|
62
|
+
```
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["poetry-core>=2.0.0"]
|
|
3
|
+
build-backend = "poetry.core.masonry.api"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "simurg-ppp"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "SIMURG PPP client and workflow tools"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "SIMURG PPP maintainers" },
|
|
14
|
+
]
|
|
15
|
+
maintainers = [
|
|
16
|
+
{ name = "SIMURG PPP maintainers" },
|
|
17
|
+
]
|
|
18
|
+
keywords = [
|
|
19
|
+
"gnss",
|
|
20
|
+
"ppp",
|
|
21
|
+
"precise-point-positioning",
|
|
22
|
+
"rinex",
|
|
23
|
+
"simurg",
|
|
24
|
+
]
|
|
25
|
+
classifiers = [
|
|
26
|
+
"Development Status :: 3 - Alpha",
|
|
27
|
+
"Environment :: Console",
|
|
28
|
+
"Intended Audience :: Developers",
|
|
29
|
+
"Intended Audience :: Science/Research",
|
|
30
|
+
"License :: OSI Approved :: MIT License",
|
|
31
|
+
"Operating System :: OS Independent",
|
|
32
|
+
"Programming Language :: Python :: 3",
|
|
33
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
34
|
+
"Programming Language :: Python :: 3.10",
|
|
35
|
+
"Programming Language :: Python :: 3.11",
|
|
36
|
+
"Programming Language :: Python :: 3.12",
|
|
37
|
+
"Topic :: Scientific/Engineering",
|
|
38
|
+
]
|
|
39
|
+
dependencies = [
|
|
40
|
+
"requests",
|
|
41
|
+
"matplotlib",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[project.scripts]
|
|
45
|
+
simurg-ppp = "ppp_client.cli_entry:main"
|
|
46
|
+
|
|
47
|
+
[project.entry-points."simurg.commands"]
|
|
48
|
+
ppp = "ppp_client.simurg_plugin:main"
|
|
49
|
+
|
|
50
|
+
[tool.poetry]
|
|
51
|
+
name = "simurg-ppp"
|
|
52
|
+
version = "0.1.0"
|
|
53
|
+
description = "SIMURG PPP client and workflow tools"
|
|
54
|
+
readme = "README.md"
|
|
55
|
+
authors = ["SIMURG PPP maintainers"]
|
|
56
|
+
license = "MIT"
|
|
57
|
+
keywords = [
|
|
58
|
+
"gnss",
|
|
59
|
+
"ppp",
|
|
60
|
+
"precise-point-positioning",
|
|
61
|
+
"rinex",
|
|
62
|
+
"simurg",
|
|
63
|
+
]
|
|
64
|
+
classifiers = [
|
|
65
|
+
"Development Status :: 3 - Alpha",
|
|
66
|
+
"Environment :: Console",
|
|
67
|
+
"Intended Audience :: Developers",
|
|
68
|
+
"Intended Audience :: Science/Research",
|
|
69
|
+
"License :: OSI Approved :: MIT License",
|
|
70
|
+
"Operating System :: OS Independent",
|
|
71
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
72
|
+
"Topic :: Scientific/Engineering",
|
|
73
|
+
]
|
|
74
|
+
packages = [
|
|
75
|
+
{ include = "ppp_client", from = "src" },
|
|
76
|
+
]
|
|
77
|
+
include = [
|
|
78
|
+
{ path = "CHANGELOG.md", format = "sdist" },
|
|
79
|
+
{ path = "CONTRIBUTING.md", format = "sdist" },
|
|
80
|
+
{ path = "LICENSE", format = "sdist" },
|
|
81
|
+
{ path = "docs/release.md", format = "sdist" },
|
|
82
|
+
]
|
|
83
|
+
|
|
84
|
+
[tool.poetry.dependencies]
|
|
85
|
+
python = ">=3.10"
|
|
86
|
+
requests = "*"
|
|
87
|
+
matplotlib = "*"
|
|
88
|
+
|
|
89
|
+
[tool.poetry.scripts]
|
|
90
|
+
simurg-ppp = "ppp_client.cli_entry:main"
|
|
91
|
+
|
|
92
|
+
[tool.poetry.plugins."simurg.commands"]
|
|
93
|
+
ppp = "ppp_client.simurg_plugin:main"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Public PPP client helpers."""
|
|
2
|
+
|
|
3
|
+
from .api import BASE_URL, check_task, create_task
|
|
4
|
+
from .cli import build_parser, main
|
|
5
|
+
from .plotting import plot_xyz_result_points
|
|
6
|
+
from .results import PPPResultPoint, collect_result_points
|
|
7
|
+
from .rinex import (
|
|
8
|
+
date_from_rinex_filename,
|
|
9
|
+
date_from_rinex_short_filename,
|
|
10
|
+
prepare_rinex_file,
|
|
11
|
+
)
|
|
12
|
+
from .simurg import download_processed_file, list_processed_sites
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
__all__ = [
|
|
16
|
+
"BASE_URL",
|
|
17
|
+
"PPPResultPoint",
|
|
18
|
+
"build_parser",
|
|
19
|
+
"check_task",
|
|
20
|
+
"collect_result_points",
|
|
21
|
+
"create_task",
|
|
22
|
+
"date_from_rinex_filename",
|
|
23
|
+
"date_from_rinex_short_filename",
|
|
24
|
+
"download_processed_file",
|
|
25
|
+
"list_processed_sites",
|
|
26
|
+
"main",
|
|
27
|
+
"plot_xyz_result_points",
|
|
28
|
+
"prepare_rinex_file",
|
|
29
|
+
]
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from typing import Any
|
|
5
|
+
|
|
6
|
+
import requests
|
|
7
|
+
|
|
8
|
+
from .config import ClientConfig, DEFAULT_PPP_SERVICE_BASE_URL
|
|
9
|
+
from .rinex import date_from_rinex_filename
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
BASE_URL = DEFAULT_PPP_SERVICE_BASE_URL
|
|
13
|
+
|
|
14
|
+
#TODO add models for response so the user should not rely on plains strings as keys
|
|
15
|
+
|
|
16
|
+
def create_task(
|
|
17
|
+
file_path: str | Path,
|
|
18
|
+
date: str | None = None,
|
|
19
|
+
config: ClientConfig | None = None,
|
|
20
|
+
) -> dict[str, Any]:
|
|
21
|
+
"""Upload a RINEX file and create a PPP task."""
|
|
22
|
+
path = Path(file_path)
|
|
23
|
+
task_date = date if date is not None else date_from_rinex_filename(path)
|
|
24
|
+
base_url = _base_url(config)
|
|
25
|
+
with path.open("rb") as rinex_file:
|
|
26
|
+
response = requests.post(
|
|
27
|
+
f"{base_url}/tasks",
|
|
28
|
+
headers={"accept": "application/json"},
|
|
29
|
+
files={"rinex_file": (path.name, rinex_file)},
|
|
30
|
+
data={"date": task_date},
|
|
31
|
+
timeout=60,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
response.raise_for_status()
|
|
35
|
+
return response.json()
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def check_task(task_id: str, config: ClientConfig | None = None) -> dict[str, Any]:
|
|
39
|
+
"""Return the current PPP task details."""
|
|
40
|
+
base_url = _base_url(config)
|
|
41
|
+
response = requests.get(
|
|
42
|
+
f"{base_url}/tasks/{task_id}",
|
|
43
|
+
headers={"accept": "application/json"},
|
|
44
|
+
timeout=60,
|
|
45
|
+
)
|
|
46
|
+
response.raise_for_status()
|
|
47
|
+
return response.json()
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _base_url(config: ClientConfig | None) -> str:
|
|
51
|
+
if config is None:
|
|
52
|
+
return BASE_URL
|
|
53
|
+
return config.ppp_service_base_url
|