pycg-dtn 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.
- pycg_dtn-0.1.0/.github/workflows/ci.yml +46 -0
- pycg_dtn-0.1.0/.gitignore +34 -0
- pycg_dtn-0.1.0/CONTRIBUTING.md +42 -0
- pycg_dtn-0.1.0/LICENSE +674 -0
- pycg_dtn-0.1.0/PKG-INFO +201 -0
- pycg_dtn-0.1.0/README.md +170 -0
- pycg_dtn-0.1.0/examples/mercury_mars.py +18 -0
- pycg_dtn-0.1.0/pyproject.toml +74 -0
- pycg_dtn-0.1.0/src/pycg_dtn/__init__.py +31 -0
- pycg_dtn-0.1.0/src/pycg_dtn/celestials.py +115 -0
- pycg_dtn-0.1.0/src/pycg_dtn/cli.py +171 -0
- pycg_dtn-0.1.0/src/pycg_dtn/geometry.py +261 -0
- pycg_dtn-0.1.0/src/pycg_dtn/graph.py +288 -0
- pycg_dtn-0.1.0/src/pycg_dtn/kernels.py +219 -0
- pycg_dtn-0.1.0/src/pycg_dtn/linkbudget.py +166 -0
- pycg_dtn-0.1.0/src/pycg_dtn/plan.py +139 -0
- pycg_dtn-0.1.0/tests/test_celestials.py +70 -0
- pycg_dtn-0.1.0/tests/test_geometry.py +74 -0
- pycg_dtn-0.1.0/tests/test_graph.py +116 -0
- pycg_dtn-0.1.0/tests/test_kernels.py +116 -0
- pycg_dtn-0.1.0/tests/test_linkbudget.py +110 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: ${{ matrix.python-version }}
|
|
22
|
+
cache: pip
|
|
23
|
+
|
|
24
|
+
- name: Install
|
|
25
|
+
run: pip install -e ".[dev]"
|
|
26
|
+
|
|
27
|
+
- name: Lint
|
|
28
|
+
run: ruff check .
|
|
29
|
+
|
|
30
|
+
- name: Test
|
|
31
|
+
# Network tests download kernels from NAIF; kept out of the matrix so a
|
|
32
|
+
# NAIF outage cannot fail every job.
|
|
33
|
+
run: pytest -m "not network" -q
|
|
34
|
+
|
|
35
|
+
network-test:
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
continue-on-error: true
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v4
|
|
40
|
+
- uses: actions/setup-python@v5
|
|
41
|
+
with:
|
|
42
|
+
python-version: "3.12"
|
|
43
|
+
cache: pip
|
|
44
|
+
- run: pip install -e ".[dev]"
|
|
45
|
+
- name: Verify kernel registry against NAIF
|
|
46
|
+
run: pytest -m network -q
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# SPICE kernels -- large binaries, fetched on demand from NAIF
|
|
2
|
+
kernels/
|
|
3
|
+
*.bsp
|
|
4
|
+
*.tls
|
|
5
|
+
*.tpc
|
|
6
|
+
*.part
|
|
7
|
+
|
|
8
|
+
# generated contact plans
|
|
9
|
+
out/
|
|
10
|
+
contactGraph.csv
|
|
11
|
+
contactGraph.json
|
|
12
|
+
summary.json
|
|
13
|
+
|
|
14
|
+
# python
|
|
15
|
+
__pycache__/
|
|
16
|
+
*.py[cod]
|
|
17
|
+
*.egg-info/
|
|
18
|
+
.eggs/
|
|
19
|
+
build/
|
|
20
|
+
dist/
|
|
21
|
+
.venv/
|
|
22
|
+
venv/
|
|
23
|
+
|
|
24
|
+
# tooling
|
|
25
|
+
.pytest_cache/
|
|
26
|
+
.ruff_cache/
|
|
27
|
+
.coverage
|
|
28
|
+
htmlcov/
|
|
29
|
+
.mypy_cache/
|
|
30
|
+
|
|
31
|
+
# editors / os
|
|
32
|
+
.vscode/
|
|
33
|
+
.idea/
|
|
34
|
+
.DS_Store
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Contributing to PyCG-DTN
|
|
2
|
+
|
|
3
|
+
Thanks for your interest. Bug reports, kernel-registry updates and new geometry
|
|
4
|
+
features are all welcome.
|
|
5
|
+
|
|
6
|
+
## Getting set up
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
git clone https://github.com/shaanzie/pycg-dtn.git
|
|
10
|
+
cd pycg-dtn
|
|
11
|
+
python -m venv .venv && source .venv/bin/activate
|
|
12
|
+
pip install -e ".[dev]"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Running the tests
|
|
16
|
+
|
|
17
|
+
Most tests are pure logic and run in well under a second:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pytest -m "not network"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Tests marked `network` download kernels from NAIF and are slower. Run them before
|
|
24
|
+
opening a PR that touches `kernels.py`:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pytest -m network
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Pull requests
|
|
31
|
+
|
|
32
|
+
- Keep the public API in the existing `PascalCase` style (`AddCelestial`,
|
|
33
|
+
`GetLinkBudget`, `GenerateContactGraph`); internal helpers stay `snake_case`.
|
|
34
|
+
- New configuration values get a `Get*`/`Set*` pair with validation, and go into
|
|
35
|
+
the relevant `AsDict()` so they land in output metadata.
|
|
36
|
+
- Add a test that would have failed before your change.
|
|
37
|
+
- Cite a source in a comment for any physical constant or model parameter.
|
|
38
|
+
|
|
39
|
+
## License
|
|
40
|
+
|
|
41
|
+
By contributing you agree that your contributions are licensed under the
|
|
42
|
+
GNU General Public License v3.0 or later, the same terms as the project.
|