Skip to content

Commit 620b4e5

Browse files
committed
feat: initial public release of cislunar-sim
0 parents  commit 620b4e5

75 files changed

Lines changed: 23964 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Bug report
2+
description: Report a reproducible defect in cislunar-sim
3+
title: "[Bug]: "
4+
labels:
5+
- bug
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for taking the time to report a bug. Minimal, reproducible cases help a lot.
11+
- type: textarea
12+
id: summary
13+
attributes:
14+
label: Summary
15+
description: What went wrong?
16+
placeholder: A short description of the bug.
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: reproduce
21+
attributes:
22+
label: Reproduction
23+
description: Include the smallest code sample or command sequence that reproduces the problem.
24+
placeholder: |
25+
import numpy as np
26+
...
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: expected
31+
attributes:
32+
label: Expected behavior
33+
placeholder: What did you expect to happen instead?
34+
validations:
35+
required: true
36+
- type: textarea
37+
id: actual
38+
attributes:
39+
label: Actual behavior
40+
placeholder: Include traceback text, warnings, or surprising output.
41+
validations:
42+
required: true
43+
- type: input
44+
id: version
45+
attributes:
46+
label: cislunar-sim version
47+
placeholder: 1.0.0
48+
validations:
49+
required: true
50+
- type: input
51+
id: python
52+
attributes:
53+
label: Python version
54+
placeholder: "3.11.9"
55+
validations:
56+
required: true
57+
- type: input
58+
id: platform
59+
attributes:
60+
label: Platform
61+
placeholder: macOS 15, Ubuntu 24.04, Windows 11, ...
62+
validations:
63+
required: true
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Feature request
2+
description: Propose a new capability or improvement
3+
title: "[Feature]: "
4+
labels:
5+
- enhancement
6+
body:
7+
- type: textarea
8+
id: problem
9+
attributes:
10+
label: Problem or use case
11+
description: What mission-analysis or engineering problem are you trying to solve?
12+
placeholder: I want to model...
13+
validations:
14+
required: true
15+
- type: textarea
16+
id: proposal
17+
attributes:
18+
label: Proposed solution
19+
description: Describe the behavior, API, or workflow you would like to see.
20+
placeholder: Add a force model / guidance law / validation workflow that...
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: alternatives
25+
attributes:
26+
label: Alternatives considered
27+
description: Workarounds, adjacent libraries, or other designs you evaluated.
28+
- type: textarea
29+
id: references
30+
attributes:
31+
label: References
32+
description: Papers, mission docs, or datasets that support the request.

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: pip
5+
directory: /
6+
schedule:
7+
interval: weekly
8+
day: monday
9+
open-pull-requests-limit: 5
10+
groups:
11+
dev-deps:
12+
patterns: ["ruff", "pyright", "pre-commit"]
13+
14+
- package-ecosystem: github-actions
15+
directory: /
16+
schedule:
17+
interval: weekly
18+
day: monday
19+
open-pull-requests-limit: 5

.github/pull_request_template.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## What changed and why
2+
3+
<!-- One paragraph: what is this PR doing and what motivated it? -->
4+
5+
## How it was verified
6+
7+
<!-- Describe the test or benchmark that proves the change is correct.
8+
New force models: include the analytically known limit you checked.
9+
New guidance laws: describe the orbit scenario and convergence metric.
10+
Bug fixes: paste the before/after output. -->
11+
12+
## Checklist
13+
14+
- [ ] `make lint` passes (or `pre-commit run --all-files`)
15+
- [ ] `make test` passes on Python 3.11, 3.12, 3.13, and 3.14
16+
- [ ] New force model: at least one focused test in the relevant `tests/test_*.py` module with an analytically known limit
17+
- [ ] New guidance law: reproducible scenario demonstrating convergence is documented or tested
18+
- [ ] CHANGELOG.md updated under `[Unreleased]`
19+
- [ ] All quantities in SI units (or explicitly documented otherwise)

.github/workflows/publish.yml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: read
10+
id-token: write # required for Trusted Publisher (OIDC)
11+
12+
jobs:
13+
lint:
14+
name: Lint
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v6
18+
19+
- uses: actions/setup-python@v6
20+
with:
21+
python-version: "3.12"
22+
cache: pip
23+
24+
- name: Install dependencies
25+
run: pip install -e ".[dev]"
26+
27+
- name: Check lint
28+
run: ruff check .
29+
30+
- name: Check format
31+
run: ruff format --check .
32+
33+
typecheck:
34+
name: Type check
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v6
38+
39+
- uses: actions/setup-python@v6
40+
with:
41+
python-version: "3.12"
42+
cache: pip
43+
44+
- name: Install dependencies
45+
run: pip install -e ".[dev]"
46+
47+
- name: Run pyright
48+
run: pyright src
49+
50+
test:
51+
name: Test (Python ${{ matrix.python-version }})
52+
runs-on: ubuntu-latest
53+
needs: [lint, typecheck]
54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
python-version: ["3.11", "3.12", "3.13", "3.14"]
58+
59+
steps:
60+
- uses: actions/checkout@v6
61+
62+
- uses: actions/setup-python@v6
63+
with:
64+
python-version: ${{ matrix.python-version }}
65+
cache: pip
66+
67+
- name: Install dependencies
68+
run: pip install -e ".[dev]"
69+
70+
- name: Core test suite
71+
run: python -m pytest tests --ignore=tests/test_validation.py
72+
73+
- name: Validation tests
74+
run: python -m pytest tests/test_validation.py
75+
76+
build:
77+
name: Build distribution
78+
runs-on: ubuntu-latest
79+
needs: test
80+
81+
steps:
82+
- uses: actions/checkout@v6
83+
84+
- uses: actions/setup-python@v6
85+
with:
86+
python-version: "3.12"
87+
cache: pip
88+
89+
- name: Install dependencies
90+
run: pip install -e ".[dev]"
91+
92+
- name: Build sdist and wheel
93+
run: python -m build
94+
95+
- name: Upload distribution artifacts
96+
uses: actions/upload-artifact@v7
97+
with:
98+
name: dist
99+
path: dist/
100+
101+
publish:
102+
name: Publish to PyPI
103+
needs: build
104+
runs-on: ubuntu-latest
105+
environment:
106+
name: pypi
107+
url: https://pypi.org/p/cislunar-sim
108+
109+
steps:
110+
- name: Download distribution artifacts
111+
uses: actions/download-artifact@v8
112+
with:
113+
name: dist
114+
path: dist/
115+
116+
- name: Publish to PyPI
117+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/tests.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
pull_request:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
lint:
15+
name: Lint
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v6
19+
20+
- uses: actions/setup-python@v6
21+
with:
22+
python-version: "3.12"
23+
cache: pip
24+
25+
- name: Install ruff
26+
run: pip install "ruff>=0.4"
27+
28+
- name: Check lint
29+
run: ruff check .
30+
31+
- name: Check format
32+
run: ruff format --check .
33+
34+
typecheck:
35+
name: Type check
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v6
39+
40+
- uses: actions/setup-python@v6
41+
with:
42+
python-version: "3.12"
43+
cache: pip
44+
45+
- name: Install dependencies
46+
run: pip install -e ".[dev]"
47+
48+
- name: Run pyright
49+
run: pyright src
50+
51+
test:
52+
name: Test (Python ${{ matrix.python-version }})
53+
runs-on: ubuntu-latest
54+
needs: [lint, typecheck]
55+
56+
strategy:
57+
fail-fast: false
58+
matrix:
59+
python-version: ["3.11", "3.12", "3.13", "3.14"]
60+
61+
steps:
62+
- uses: actions/checkout@v6
63+
64+
- uses: actions/setup-python@v6
65+
with:
66+
python-version: ${{ matrix.python-version }}
67+
cache: pip
68+
69+
- name: Install dependencies
70+
run: pip install -e ".[dev]"
71+
72+
- name: Core test suite
73+
run: python -m pytest tests --ignore=tests/test_validation.py --cov=cislunar --cov-report=xml --cov-report=term-missing
74+
75+
- name: Validation tests
76+
run: python -m pytest tests/test_validation.py
77+
78+
- name: Upload coverage
79+
if: matrix.python-version == '3.12'
80+
uses: actions/upload-artifact@v7
81+
with:
82+
name: coverage-report
83+
path: coverage.xml
84+
85+
benchmark:
86+
name: Physics benchmarks
87+
runs-on: ubuntu-latest
88+
needs: test
89+
if: github.ref == 'refs/heads/main'
90+
91+
steps:
92+
- uses: actions/checkout@v6
93+
94+
- uses: actions/setup-python@v6
95+
with:
96+
python-version: "3.12"
97+
cache: pip
98+
99+
- name: Install dependencies
100+
run: pip install -e ".[dev]"
101+
102+
- name: Run benchmarks
103+
run: python -m cislunar.validation.physics_benchmark --extended

0 commit comments

Comments
 (0)