Skip to content

Commit 2c4facb

Browse files
Merge pull request #191 from nyx-space/189-mean-motion-based-propagation-for-n-objects-in-parallel
Mean motion based propagation from Python
2 parents 657eb6e + 174d0a6 commit 2c4facb

File tree

17 files changed

+570
-68
lines changed

17 files changed

+570
-68
lines changed

.github/workflows/daily.yaml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Daily Workflow
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' # Run at midnight every day
6+
7+
jobs:
8+
full-coverage:
9+
name: Unit test and integration test coverage analysis
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
16+
- name: Install stable toolchain
17+
uses: dtolnay/rust-toolchain@master
18+
with:
19+
toolchain: stable
20+
components: rustfmt, clippy
21+
22+
- name: Install cargo-grcov
23+
run: |
24+
rustup component add llvm-tools-preview
25+
cargo install grcov
26+
27+
- name: Generate coverage report for unit tests
28+
env:
29+
RUSTFLAGS: "-Cinstrument-coverage"
30+
LLVM_PROFILE_FILE: "target/coverage/nyx_space-%p-%m.profraw"
31+
run: |
32+
cargo test --lib
33+
grcov . --binary-path ./target/debug/ -t lcov -s . --keep-only 'src/*' > lcov-lib.txt
34+
35+
- name: Generate coverage report for doc tests
36+
env:
37+
RUSTFLAGS: "-Cinstrument-coverage"
38+
LLVM_PROFILE_FILE: "target/coverage/nyx_space-%p-%m.profraw"
39+
run: |
40+
cargo test --doc
41+
grcov . --binary-path ./target/debug/ -t lcov -s . --keep-only 'src/*' > lcov-lib.txt
42+
43+
- name: Generate coverage report for cosmic integr. tests
44+
env:
45+
RUSTFLAGS: "-Cinstrument-coverage"
46+
LLVM_PROFILE_FILE: "target/coverage/nyx_space-%p-%m.profraw"
47+
run: |
48+
cargo test -- cosmic mission_design orbit_determination propulsion test_monte_carlo_epoch
49+
grcov . --binary-path ./target/debug/ -t lcov -s . --keep-only 'src/*' > lcov-cosmic.txt
50+
51+
- name: Generate coverage report for mission_design integr. tests
52+
env:
53+
RUSTFLAGS: "-Cinstrument-coverage"
54+
LLVM_PROFILE_FILE: "target/coverage/nyx_space-%p-%m.profraw"
55+
run: |
56+
cargo test -- cosmic mission_design orbit_determination propulsion test_monte_carlo_epoch
57+
grcov . --binary-path ./target/debug/ -t lcov -s . --keep-only 'src/*' > lcov-mission_design.txt
58+
59+
- name: Generate coverage report for OD integr. tests
60+
env:
61+
RUSTFLAGS: "-Cinstrument-coverage"
62+
LLVM_PROFILE_FILE: "target/coverage/nyx_space-%p-%m.profraw"
63+
run: |
64+
cargo test -- orbit_determination
65+
grcov . --binary-path ./target/debug/ -t lcov -s . --keep-only 'src/*' > lcov-od.txt
66+
67+
- name: Generate coverage report for propulsion integr. tests
68+
env:
69+
RUSTFLAGS: "-Cinstrument-coverage"
70+
LLVM_PROFILE_FILE: "target/coverage/nyx_space-%p-%m.profraw"
71+
run: |
72+
cargo test -- propulsion
73+
grcov . --binary-path ./target/debug/ -t lcov -s . --keep-only 'src/*' > lcov-prop.txt
74+
75+
- name: Generate coverage report for monte carlo integr. tests
76+
env:
77+
RUSTFLAGS: "-Cinstrument-coverage"
78+
LLVM_PROFILE_FILE: "target/coverage/nyx_space-%p-%m.profraw"
79+
run: |
80+
cargo test -- test_monte_carlo_epoch
81+
grcov . --binary-path ./target/debug/ -t lcov -s . --keep-only 'src/*' > lcov-mc.txt
82+
83+
- name: Upload coverage report
84+
uses: codecov/codecov-action@v3
85+
with:
86+
token: ${{ secrets.CODECOV_TOKEN }}
87+
files: ./lcov-*.txt

.github/workflows/python.yml

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
# This file is autogenerated by maturin v0.14.16
2-
# To update, run
3-
#
4-
# maturin generate-ci --pytest -o .github/workflows/python.yml github
5-
#
61
name: Python
72
on:
83
push:
@@ -22,12 +17,12 @@ jobs:
2217
runs-on: ubuntu-latest
2318
strategy:
2419
matrix:
25-
target: [x86_64, x86, aarch64]
20+
target: [x86_64]
2621
steps:
2722
- uses: actions/checkout@v3
2823
- uses: actions/setup-python@v4
2924
with:
30-
python-version: "3.10"
25+
python-version: "3.11"
3126

3227
- name: Build wheels
3328
uses: PyO3/maturin-action@v1
@@ -45,29 +40,13 @@ jobs:
4540

4641
- name: pytest x86_64
4742
if: ${{ matrix.target == 'x86_64' }}
48-
shell: bash
4943
run: |
5044
set -e
51-
pip install nyx_space --find-links dist --force-reinstall
45+
ls -lh dist
46+
pip install nyx_space --find-links dist --force-reinstall -v --no-cache-dir
5247
pip install pytest numpy pandas plotly pyarrow scipy
5348
pytest
5449
55-
- name: pytest
56-
if: ${{ !startsWith(matrix.target, 'x86') && matrix.target != 'ppc64' && matrix.target != 'aarch64' }}
57-
uses: uraimo/run-on-arch-action@v2.5.0
58-
with:
59-
arch: ${{ matrix.target }}
60-
distro: ubuntu22.04
61-
githubToken: ${{ github.token }}
62-
install: |
63-
apt-get update
64-
apt-get install -y --no-install-recommends python3 python3-pip python3-numpy python3-dev python3-pandas python-pyarrow python3-scipy
65-
pip3 install -U pip pytest plotly
66-
run: |
67-
set -e
68-
pip3 install nyx_space --find-links dist --force-reinstall
69-
pytest
70-
7150
- name: Upload python tests HTMLs
7251
uses: actions/upload-artifact@v3
7352
with:
@@ -83,7 +62,7 @@ jobs:
8362
- uses: actions/checkout@v3
8463
- uses: actions/setup-python@v4
8564
with:
86-
python-version: "3.10"
65+
python-version: "3.11"
8766
architecture: ${{ matrix.target }}
8867
- name: Build wheels
8968
uses: PyO3/maturin-action@v1
@@ -96,12 +75,13 @@ jobs:
9675
with:
9776
name: wheels
9877
path: dist
78+
9979
- name: pytest
100-
if: ${{ !startsWith(matrix.target, 'aarch64') }}
10180
shell: bash
10281
run: |
10382
set -e
104-
pip install nyx_space --find-links dist --force-reinstall
83+
ls -lh dist
84+
pip install --find-links dist --force-reinstall nyx_space
10585
pip install pytest numpy pandas plotly pyarrow
10686
pytest
10787
@@ -114,24 +94,27 @@ jobs:
11494
- uses: actions/checkout@v3
11595
- uses: actions/setup-python@v4
11696
with:
117-
python-version: "3.10"
97+
python-version: "3.11"
11898
- name: Build wheels
11999
uses: PyO3/maturin-action@v1
120100
with:
121101
target: ${{ matrix.target }}
122102
args: --release --out dist --find-interpreter -F python
123103
sccache: 'true'
104+
124105
- name: Upload wheels
125106
uses: actions/upload-artifact@v3
126107
with:
127108
name: wheels
128109
path: dist
110+
129111
- name: pytest
130112
if: ${{ !startsWith(matrix.target, 'aarch64') }}
131113
shell: bash
132114
run: |
133115
set -e
134-
pip install nyx_space --find-links dist --force-reinstall
116+
ls -lh dist
117+
pip install --find-links dist --force-reinstall nyx_space
135118
pip install pytest numpy pandas plotly pyarrow
136119
pytest
137120

.github/workflows/tests.yaml renamed to .github/workflows/rust.yaml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
matrix:
3838
os: [ubuntu-latest, macos-latest, windows-latest]
3939
rust:
40-
- { version: "1.67", name: MSRV }
40+
- { version: "1.70", name: MSRV }
4141
- { version: stable, name: stable }
4242

4343
runs-on: ${{ matrix.os }}
@@ -112,8 +112,8 @@ jobs:
112112
- name: Audit code
113113
run: cargo audit
114114

115-
coverage:
116-
name: Coverage
115+
ut-coverage:
116+
name: Coverage (unit tests only)
117117
runs-on: ubuntu-latest
118118
needs: [tests]
119119

@@ -132,22 +132,19 @@ jobs:
132132
rustup component add llvm-tools-preview
133133
cargo install grcov
134134
135-
- name: Generate coverage report
135+
- name: Generate coverage report for unit tests
136136
env:
137137
RUSTFLAGS: "-Cinstrument-coverage"
138-
LLVM_PROFILE_FILE: "nyx_space-%p-%m.profraw"
139-
# grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing -o ./target/debug/coverage/ # Export as HTML
138+
LLVM_PROFILE_FILE: "target/coverage/nyx_space-%p-%m.profraw"
140139
run: |
141140
cargo test --lib
142-
grcov . --binary-path ./target/debug/ -t lcov -s . > lcov-lib.txt
143-
cargo test -- cosmic mission_design orbit_determination propulsion test_monte_carlo_epoch
144-
grcov . --binary-path ./target/debug/ -t lcov -s . > lcov-integ.txt
141+
grcov . --binary-path ./target/debug/ -t lcov -s . --keep-only 'src/*' > lcov-lib.txt
145142
146143
- name: Upload coverage report
147144
uses: codecov/codecov-action@v3
148145
with:
149146
token: ${{ secrets.CODECOV_TOKEN }}
150-
files: ./lcov-lib.txt, ./lcov-integ.txt
147+
files: ./lcov-*.txt
151148

152149
release:
153150
name: Release

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "nyx-space"
33
build = "build.rs"
4-
version = "2.0.0-alpha.2"
4+
version = "2.0.0-beta-dev"
55
edition = "2021"
66
authors = ["Christopher Rabotin <christopher.rabotin@gmail.com>"]
77
description = "A high-fidelity space mission toolkit, with orbit propagation, estimation and some systems engineering"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["maturin>=0.14,<0.15"]
2+
requires = ["maturin>=1.1,<1.2"]
33
build-backend = "maturin"
44

55
[project]

0 commit comments

Comments
 (0)