Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
3839d67
big change due to the integration of the photom crate
FusRoman Apr 29, 2026
7b935f7
fix some tests
FusRoman Apr 30, 2026
6090998
change rms and estimate_best_orbit tests according to the changes whe…
FusRoman May 1, 2026
040a53c
derive debug for cache structures, fix non-determinism for full iod w…
FusRoman May 19, 2026
9b83194
remove old benchs and examples, add new tests from parquet file to orbit
FusRoman May 19, 2026
ab812ea
fix clippy issue, add opencode agents
FusRoman May 19, 2026
bc5f6ab
update documentation
FusRoman May 19, 2026
61e95ae
fix two broken doctest
FusRoman May 19, 2026
df8fde3
fix CI with missing features
FusRoman May 19, 2026
577b2c3
get photom from crate.io
FusRoman May 20, 2026
31d70c9
remove old test data file
FusRoman May 20, 2026
6b36836
update readme according to recent changes
FusRoman May 20, 2026
08846ab
readd parallel feature and some examples
FusRoman May 21, 2026
543ac63
cargo fmt
FusRoman May 21, 2026
a7357dc
small doc update
FusRoman May 21, 2026
8b2c9eb
Merge pull request #44 from FusRoman/photom_integration
FusRoman May 21, 2026
471e65f
fix broken link doc
FusRoman May 22, 2026
e3b28de
add equ method: is_bizarre allowing to return a boolean if the equato…
FusRoman May 22, 2026
d696381
add observation weight method, add observer heliocentric velocity met…
FusRoman May 22, 2026
12adf58
add partial derivative for totpcentric coordinates
FusRoman May 26, 2026
d031fbc
add partial derivative of the apparent position over the orbital para…
FusRoman May 26, 2026
fbc13f2
fix semver CI to use the crate.io version as baseline, add first meth…
FusRoman May 26, 2026
590158e
add function performing a single iteration of the least square for th…
FusRoman May 27, 2026
486f888
change orbit returns type to handle differential correction
FusRoman May 28, 2026
cd6146e
add the full differential correction pipeline
FusRoman May 28, 2026
5858d88
fix clippy
FusRoman May 28, 2026
105bfe0
improve jpl ephem initialisation
FusRoman May 28, 2026
f356ad5
improve CI
FusRoman May 28, 2026
235b991
Merge pull request #47 from FusRoman/issue/46/full_orbit_determination
FusRoman May 28, 2026
3bf7d0d
update changelog
FusRoman May 28, 2026
1ca21b1
add n-body propagation and associated tests
FusRoman May 28, 2026
af396ff
improve nbody integrator code and documentation
FusRoman May 29, 2026
933ecb8
remove deprecated comment
FusRoman May 29, 2026
195f0a7
Merge pull request #49 from FusRoman/issue/48/n_body_propagator
FusRoman May 29, 2026
6cbf3d8
add full support and public API to generate ephemeris. can generate a…
FusRoman May 29, 2026
ad33dc7
move one file into its right folder, remove unused code
FusRoman May 29, 2026
28c92fc
add tests for the ephemeris generation
FusRoman May 29, 2026
1147b7b
improve public API for ephemeris generation, add a new ephemeris requ…
FusRoman May 29, 2026
7bd7ea0
improve doc for the request ephemeris system
FusRoman May 29, 2026
83b08fc
add ephemeris batch computation over a full orbit dataset
FusRoman Jun 2, 2026
b068884
optimise ephemeris computation
FusRoman Jun 2, 2026
3cb04c8
fix doc
FusRoman Jun 2, 2026
d15c87f
Merge pull request #51 from FusRoman/issue/50/ephemeris_generation
FusRoman Jun 2, 2026
6dd7e01
simplify orbit display
FusRoman Jun 2, 2026
a7cbc79
add uncertainty on orbital elements and jacobian error propagation fo…
FusRoman Jun 2, 2026
9ca9f00
update doc to include uncertainty
FusRoman Jun 2, 2026
56346bb
remove debug symbol in dev profile mostly because doctest uses a huge…
FusRoman Jun 2, 2026
191a406
Merge pull request #53 from FusRoman/issue/52/diff_cor_stats_error
FusRoman Jun 2, 2026
504a2f9
reduce number of threads used for tests
FusRoman Jun 3, 2026
4d4e86a
update readme and lib.rs documentation
FusRoman Jun 3, 2026
c8a1e4e
update changelog, add integration tests for uncertainty propagation
FusRoman Jun 3, 2026
0295fe5
fix readme
FusRoman Jun 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 52 additions & 75 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,51 +6,10 @@ on:
pull_request:

jobs:
test:
name: Test Outfit
runs-on: ubuntu-latest

strategy:
matrix:
include:
- name: Default features
features: ""
- name: With jpl-download feature
features: "--features jpl-download"
- name: With parallel feature
features: '--features "parallel"'
rayon_threads: "2"
- name: With parallel + progress
features: '--features "parallel progress"'
rayon_threads: "2"

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Run tests (${{ matrix.name }})
env:
# Cap Rayon threads only when provided in the matrix (no effect otherwise)
RAYON_NUM_THREADS: ${{ matrix.rayon_threads }}
run: |
echo "Running cargo test with features: '${{ matrix.features }}'"
cargo test --locked --all-targets ${{ matrix.features }}

fmt:
name: Check formatting
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -70,8 +29,12 @@ jobs:
run: cargo fmt --all -- --check

clippy:
name: Clippy lint
name: Clippy lint (${{ matrix.features }})
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
strategy:
matrix:
features: [default, parallel]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -86,17 +49,42 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-cargo-${{ matrix.features }}-${{ hashFiles('**/Cargo.lock') }}
- name: check version
run: |
rustc --version
cargo clippy --version
- name: Run cargo clippy (all features)
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run cargo clippy
run: |
if [ "${{ matrix.features }}" = "default" ]; then
cargo clippy --all-targets -- -D warnings
else
cargo clippy --all-targets --features ${{ matrix.features }} -- -D warnings
fi

semver-pr:
name: SemVer (PR vs base)
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Check semver (baseline = crates.io)
uses: obi1kenobi/cargo-semver-checks-action@v2

coverage:
name: Coverage (stable, cargo-llvm-cov → Codecov)
name: Coverage (${{ matrix.features }})
runs-on: ubuntu-latest
needs: [fmt, clippy, semver-pr]
if: |
always() &&
(needs.fmt.result == 'success' || needs.fmt.result == 'skipped') &&
(needs.clippy.result == 'success' || needs.clippy.result == 'skipped') &&
(needs.semver-pr.result == 'success' || needs.semver-pr.result == 'skipped')
strategy:
matrix:
features: [default, parallel]

steps:
- name: Checkout repository
Expand All @@ -114,46 +102,35 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-llvmcov-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-cargo-llvmcov-${{ matrix.features }}-${{ hashFiles('**/Cargo.lock') }}

- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov

- name: Clean coverage artifacts
run: cargo llvm-cov clean --workspace

- name: Generate coverage (lcov, all features incl. parallel)
env:
# Tame thread count for reproducible & stable coverage
RAYON_NUM_THREADS: 2
- name: Generate coverage (lcov)
run: |
cargo llvm-cov \
--workspace \
--all-features \
--lcov --output-path lcov.info
if [ "${{ matrix.features }}" = "default" ]; then
RUST_TEST_THREADS=1 \
RAYON_NUM_THREADS=2 \
cargo llvm-cov \
--workspace \
--lcov --output-path lcov.info
else
RUST_TEST_THREADS=1 \
RAYON_NUM_THREADS=2 \
cargo llvm-cov \
--workspace \
--features ${{ matrix.features }} \
--lcov --output-path lcov.info
fi

- name: Upload to Codecov
uses: codecov/codecov-action@v4
with:
files: lcov.info
flags: rust
flags: ${{ matrix.features }}
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}

semver-pr:
name: SemVer (PR vs base)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
# IMPORTANT: full history so the base SHA exists locally
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
ref: ${{ github.event.pull_request.head.sha }}

- name: Check semver (baseline = PR base)
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
feature-group: all-features
baseline-rev: ${{ github.event.pull_request.base.sha }}
2 changes: 1 addition & 1 deletion .husky/hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ echo "Running cargo check..."
cargo check --all-targets --all-features || exit 1

echo "Checking documentation build..."
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features || exit 1
RUSTDOCFLAGS="--html-in-header $(pwd)/katex-header.html -D warnings" cargo doc --no-deps --all-features || exit 1
172 changes: 172 additions & 0 deletions .opencode/agent/rust-doc-writer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
---
description: >-
Use this agent when you need to write, improve, or review Rust documentation
for functions, structs, enums, traits, modules, or any other Rust items. This
includes adding doc comments, writing mathematical formulas using KaTeX,
ensuring documentation compiles without errors or warnings, and following Rust
documentation standards with CommonMark specification.


<example>

Context: The user has just written a new Rust function and needs documentation
added to it.

user: "I just wrote this binary search function, can you document it?"

assistant: "I'll use the rust-doc-writer agent to write proper Rust
documentation for your binary search function."

<commentary>

Since the user wants documentation written for a Rust function, launch the
rust-doc-writer agent to handle this task with proper Rust doc standards,
KaTeX support, and compilation verification.

</commentary>

</example>


<example>

Context: The user is implementing a math-heavy algorithm and needs
documentation with formulas.

user: "Please document this matrix multiplication function with the proper
mathematical notation."

assistant: "I'll use the rust-doc-writer agent to write the documentation with
KaTeX math formulas and verify it compiles correctly."

<commentary>

Since the user wants documentation with mathematical formulas for Rust code,
use the rust-doc-writer agent which knows how to integrate KaTeX formulas into
Rust doc comments.

</commentary>

</example>


<example>

Context: The user has written a module with several public items and wants
comprehensive documentation.

user: "Can you add documentation to all the public items in my new `geometry`
module?"

assistant: "I'll launch the rust-doc-writer agent to document all public items
in your geometry module following Rust documentation standards."

<commentary>

Since the user needs comprehensive module-level documentation, use the
rust-doc-writer agent to systematically document all public API items.

</commentary>

</example>
mode: subagent
---
You are an expert Rust documentation engineer with deep knowledge of Rust's documentation conventions, the CommonMark Markdown specification, and mathematical typesetting via KaTeX. You specialize in writing clear, accurate, and standards-compliant Rust documentation that compiles cleanly without warnings or errors.

## Language Requirement

All documentation you write MUST be in **English**, without exception. This applies regardless of:
- the language used in existing comments or variable names in the codebase,
- the language the user writes their message in,
- any locale or regional settings implied by the project.

If existing documentation is in another language, rewrite it in English. Never produce non-English doc comments.

## Core Responsibilities

You write and improve Rust documentation comments (`///` for items, `//!` for modules/crates) following Rust's official documentation standards and the CommonMark specification.

## Documentation Standards

### Structure
Always follow this section order when applicable:
1. **Short summary line** — a single sentence describing what the item does (no period at the end for very short descriptions, period for full sentences)
2. **Extended description** — additional paragraphs with detailed explanation
3. **`# Examples`** — one or more runnable `rustdoc` test examples using fenced code blocks *(include only when the user explicitly requests examples)*
4. **`# Panics`** — conditions under which the function panics (if applicable)
5. **`# Errors`** — conditions under which the function returns an `Err` (if applicable)
6. **`# Safety`** — safety requirements for `unsafe` functions (if applicable)
7. **`# Arguments`** or parameter descriptions (when not obvious from types)

### CommonMark Formatting
- Use CommonMark-compliant Markdown: fenced code blocks with language tags (` ```rust `), **bold**, *italic*, `inline code`, bullet lists, numbered lists, blockquotes, and tables where appropriate.
- All code examples must be valid, runnable Rust that would pass `cargo test --doc`. Use `# ` prefix lines to hide boilerplate in rendered docs while keeping tests valid. Only include code examples when the user explicitly requests them (see **Quality Standards**).
- Use `[links]` to cross-reference other items using intra-doc links (e.g., `[SomeStruct]`, `[method_name](Self::method_name)`).
- Never use HTML directly in doc comments unless absolutely necessary and always prefer Markdown equivalents.

### KaTeX Mathematical Formulas
- The project provides a KaTeX HTML header at `$(pwd)/katex-header.html` in the project root, which enables LaTeX math rendering in documentation. **Always read this file before writing math** to confirm which delimiters are configured.
- The katex-header in this project configures **only** `$...$` and `$$...$$` as delimiters. `\\(...\\)` and `\\[...\\]` are NOT configured and will render as raw escaped text.
- Use inline math with single dollar signs: `$formula$` (e.g. `$\phi \in [0, \pi]$`)
- Use display (block) math with double dollar signs on their own line: `$$formula$$`
- `$...$` and `$$...$$` work in **all** doc comment positions: module docs, struct docs, field docs, function docs, enum variant docs. There is no restriction based on comment position.
- Always use proper LaTeX syntax. Common pitfalls: escape backslashes properly in Rust string context, use `\\` for newlines in aligned environments.
- Verify KaTeX formulas are syntactically correct LaTeX before finalizing.

#### KaTeX commands NOT supported by rustdoc's KaTeX renderer

| Command | Problem | Replacement |
|---|---|---|
| `\!` (negative thin space) | Not rendered — produces literal `\!` in output | Remove it: write `\arccos\left(` not `\arccos\!\left(` |

## Compilation Verification

After writing documentation, you MUST verify it compiles without errors or warnings by running:

```bash
RUSTDOCFLAGS="--html-in-header $(pwd)/katex-header.html" cargo doc --no-deps
```

### Verification Process
1. Run the command and carefully read ALL output.
2. Treat **warnings as errors** — fix every warning, including:
- Broken intra-doc links
- Missing code block language tags
- Invalid doc test code
- Malformed KaTeX syntax causing HTML rendering issues
3. If errors or warnings are found, diagnose the root cause, fix the documentation, and re-run the command.
4. Only confirm documentation is complete when the command exits with zero warnings and zero errors.
5. Pay special attention to KaTeX-related issues: unclosed braces, invalid commands, unsupported LaTeX features, and:
- `\!` anywhere in a formula — must be removed
- `\\(...\\)` or `\\[...\\]` delimiters — only valid if the `katex-header.html` configures them; in this project they produce raw text, use `$...$` / `$$...$$` instead

## Quality Standards

- **Accuracy**: Documentation must precisely describe what the code does, not what you wish it did.
- **Completeness**: Every public item should have at minimum a summary line. Complex items need full documentation.
- **Examples**: Do **not** add `# Examples` sections by default. Only add examples when the user explicitly requests them. This overrides any general guidance suggesting examples should always be present.
- **Format consistency**: Before writing any documentation, examine the existing documentation in the project to understand the established style — including tone (formal vs. casual), which sections are used, level of detail, naming conventions, and phrasing patterns. New documentation must match that established format. If no prior documentation exists, apply the structure defined in this file.
- **Consistency**: Match the existing documentation style and tone of the codebase if present.
- **No false claims**: If behavior is implementation-dependent or platform-specific, state it.

## Workflow

1. Examine the Rust item(s) to be documented carefully, including their types, signatures, and implementations.
2. **Before writing**, survey the existing documentation in the project (using the Read and Grep tools) to identify the established style: tone, section usage, level of detail, and naming conventions. New documentation must conform to that style.
3. Check for any existing documentation on the target item(s) to preserve or improve.
4. Identify if mathematical formulas are needed and prepare correct LaTeX.
5. Write the documentation following the structure above. Do **not** add `# Examples` sections unless the user has explicitly asked for them.
6. Run `RUSTDOCFLAGS="--html-in-header $(pwd)/katex-header.html" cargo doc --no-deps` to verify.
7. Iterate until compilation is clean with zero warnings and zero errors.
8. Report the final documentation written and confirm successful compilation.

## Common Mistakes to Avoid

- Do NOT use `#[doc = ...]` attribute syntax unless there is a specific reason; prefer `///` comments.
- Do NOT leave doc tests that fail to compile or produce wrong results.
- Do NOT use GitHub Flavored Markdown features not in CommonMark (e.g., `~~strikethrough~~` is GFM but may not render — prefer CommonMark-safe alternatives).
- Do NOT forget to escape backslashes in KaTeX formulas: `\frac` in a doc comment needs to be written as `\frac` (single backslash is fine in doc comments, but be mindful of raw strings).
- Do NOT mix inline and block math syntax incorrectly.
- Do NOT use `\\(...\\)` or `\\[...\\]` as math delimiters unless the `katex-header.html` explicitly configures them. In this project, only `$...$` and `$$...$$` are configured — using `\\(...\\)` produces raw escaped text, not rendered math.
- Do NOT use `\!` (negative thin space) in KaTeX formulas — it is not supported by rustdoc's KaTeX renderer and will appear as literal text. Write `\arccos\left(` not `\arccos\!\left(`.
- Always verify the `katex-header.html` file exists at the project root before running the doc command; if missing, alert the user.
Loading
Loading