Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 19 additions & 0 deletions .github/actions/checkout-unpublished/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check out unpublished Cargo dependencies
description: Populate sibling directories referenced by the temporary Cargo patches
runs:
using: composite
steps:
- uses: actions/checkout@v4
with:
repository: Siderust/archive
ref: 5ec0343d4623b84ffbe5f990d15f0d48986b425d
path: .ci-deps/archive
persist-credentials: false
- uses: actions/checkout@v4
with:
repository: Siderust/tempoch
ref: 1a28a91de777b21caf3499b4d5f950545381f0f1
path: .ci-deps/tempoch
persist-credentials: false
- shell: bash
run: mv .ci-deps/archive .ci-deps/tempoch ..
40 changes: 31 additions & 9 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/checkout-unpublished
- uses: dtolnay/rust-toolchain@stable
- run: cargo check --workspace $CARGO_CI_TARGETS --all-features

Expand All @@ -39,6 +40,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout-unpublished
- uses: dtolnay/rust-toolchain@stable
- name: Build API docs with docs.rs features and strict links
env:
Expand All @@ -50,24 +52,35 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout-unpublished
- uses: dtolnay/rust-toolchain@stable
with:
targets: thumbv7em-none-eabihf
- run: cargo check -p siderust --lib --no-default-features
- run: cargo check -p siderust --lib --no-default-features --features serde
- run: cargo check -p siderust --lib --target thumbv7em-none-eabihf --no-default-features
- run: cargo check -p siderust --lib --target thumbv7em-none-eabihf --no-default-features --features serde
- run: cargo check -p siderust --lib --no-default-features --features atmosphere
- run: cargo check -p siderust --lib --no-default-features --features atmosphere,serde
- run: cargo check -p siderust --lib --target thumbv7em-none-eabihf --no-default-features --features atmosphere
- run: cargo check -p siderust --lib --target thumbv7em-none-eabihf --no-default-features --features atmosphere,serde
- run: cargo test -p siderust --test observatory_catalog_no_default --no-default-features --features std
- run: cargo check --locked -p siderust --lib --target thumbv7em-none-eabihf --no-default-features --features embedded-compact
- name: Verify compact Archive feature isolation
run: |
cargo tree --locked -p siderust --no-default-features --features embedded-compact -e features -i siderust-archive > archive-features.txt
cat archive-features.txt
if grep -E 'siderust-archive feature "(vsop|elp|nutation|fetch|std)"' archive-features.txt; then
exit 1
fi
- run: cargo test --locked -p siderust --test compact_ephemeris --no-default-features --features embedded-compact
- run: cargo check -p siderust --lib --no-default-features --features full-ephemeris,full-nutation
- run: cargo check -p siderust --lib --no-default-features --features full-ephemeris,full-nutation,serde
- run: cargo check -p siderust --lib --target thumbv7em-none-eabihf --no-default-features --features full-ephemeris,full-nutation
- run: cargo check -p siderust --lib --target thumbv7em-none-eabihf --no-default-features --features full-ephemeris,full-nutation,serde
- run: cargo check -p siderust --lib --no-default-features --features full-ephemeris,full-nutation,atmosphere
- run: cargo check -p siderust --lib --no-default-features --features full-ephemeris,full-nutation,atmosphere,serde
- run: cargo check -p siderust --lib --target thumbv7em-none-eabihf --no-default-features --features full-ephemeris,full-nutation,atmosphere
- run: cargo check -p siderust --lib --target thumbv7em-none-eabihf --no-default-features --features full-ephemeris,full-nutation,atmosphere,serde
- run: cargo test -p siderust --test observatory_catalog_no_default --no-default-features --features full-ephemeris,full-nutation,std

release-preflight:
name: Release preflight
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout-unpublished
- uses: dtolnay/rust-toolchain@stable
- run: cargo test -p siderust-release
- run: cargo build -p siderust-release
Expand All @@ -80,6 +93,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/checkout-unpublished
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
Expand All @@ -92,6 +106,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/checkout-unpublished
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
Expand All @@ -104,6 +119,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/checkout-unpublished
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --workspace $CARGO_CI_TARGETS --all-features
- run: cargo test --doc --workspace --all-features
Expand All @@ -113,6 +129,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout-unpublished
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --features pod

Expand All @@ -121,6 +138,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout-unpublished
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --features spice

Expand All @@ -129,6 +147,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout-unpublished
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --features runtime-data

Expand All @@ -137,6 +156,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout-unpublished
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --features pod-parquet

Expand All @@ -145,6 +165,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout-unpublished
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --features pod-doris

Expand All @@ -159,6 +180,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/checkout-unpublished

- name: Set up Rust (nightly + llvm-tools)
uses: dtolnay/rust-toolchain@v1
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/checkout-unpublished

- uses: dtolnay/rust-toolchain@stable

Expand Down Expand Up @@ -61,8 +62,9 @@ jobs:
RUSTDOCFLAGS: "-D rustdoc::broken_intra_doc_links -D rustdoc::invalid_html_tags"
run: cargo doc -p siderust --all-features --no-deps

- name: Dry-run publishable package
run: bash scripts/publish-changed.sh --dry-run
# Restore the dry run once the pinned dependencies are on crates.io.
- name: Verify locked dependency resolution
run: cargo metadata --locked --format-version 1 > /dev/null

publish:
name: cargo publish
Expand All @@ -79,6 +81,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/checkout-unpublished

- uses: dtolnay/rust-toolchain@stable

Expand All @@ -105,6 +108,7 @@ jobs:
contents: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/checkout-unpublished

- uses: dtolnay/rust-toolchain@stable

Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.19.0]

### Added

- Opt-in compact VSOP87E and ELP2000-82B backend for offline observations in 2020–2050.
- Lunar phase and bright-limb geometry from precomputed topocentric positions.

### Changed

- Builds that disable defaults must explicitly select `full-ephemeris` or `embedded-compact`. Add `full-nutation` to retain the IAU 2006A default when disabling defaults.
- Topocentric lunar phase uses the selected ephemeris for both directions and distances.

- Correct the Earth rotation sign for observer parallax and align the CIO rotation with SOFA.

## [0.18.1] - 2026-10-31

### Fixed
Expand Down
21 changes: 7 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 24 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ broken_intra_doc_links = "deny"

[package]
name = "siderust"
version = "0.18.1"
version = "0.19.0"
edition = "2021"
authors = ["VPRamon <vallespuigramon@gmail.com>"]
description = "High-precision astronomy and satellite mechanics in Rust."
Expand Down Expand Up @@ -65,7 +65,13 @@ path = "tests/spice_context.rs"
required-features = ["spice"]

[features]
default = ["std", "serde"]
default = ["std", "serde", "full-ephemeris", "full-nutation"]
## Full VSOP87A/E and ELP2000-82B ephemerides.
full-ephemeris = ["siderust-archive/vsop", "siderust-archive/elp", "dep:paste", "dep:wide"]
## IAU 2000A and IAU 2006A nutation models.
full-nutation = ["siderust-archive/nutation"]
## Checked compact VSOP87E and ELP2000-82B positions for 2020–2050.
embedded-compact = ["siderust-archive/vsop-compact", "siderust-archive/elp-compact"]
## Enable the Rust standard library (filesystem, OS I/O, `Utc::now`, etc.).
## Without `std`, the crate builds as `no_std` + `alloc`.
std = [
Expand All @@ -84,7 +90,7 @@ std = [
"serde_json?/std",
"toml?/std",
"thiserror/std",
"wide/std",
"wide?/std",
]
lagrange-centers = ["serde", "siderust-archive/lagrange"]
## Runtime dataset download/cache via `siderust-archive`. Requires `std`.
Expand Down Expand Up @@ -122,18 +128,18 @@ keplerian = { version = "0.5.1", default-features = false, features = ["alloc"]
optica = { version = "0.5", default-features = false, features = ["alloc"] }
principia = { version = "0.7", default-features = false, features = ["alloc"] }
qtty = { version = "0.8", default-features = false, features = ["alloc", "astro", "density", "frequency", "radiometry", "satellite"] }
tempoch = { version = "0.11", default-features = false, features = ["alloc"] }
siderust-archive = { version = "0.1.5", default-features = false, features = ["jpl", "vsop", "elp", "nutation", "gravity", "atmosphere", "pluto", "time"] }
tempoch = { version = "0.11.3", default-features = false, features = ["alloc"] }
siderust-archive = { version = "0.2.0", default-features = false, features = ["jpl", "nutation-2000b", "gravity", "atmosphere", "pluto", "time"] }

thiserror = { version = "2", default-features = false }
chrono = { version = "0.4", default-features = false, features = ["alloc"] }
paste = "1.0"
paste = { version = "1.0", optional = true }
quick-xml = { version = "0.41", default-features = false, optional = true }
serde = { version = "1.0", default-features = false, features = ["derive", "alloc"], optional = true }
serde_json = { version = "1.0", default-features = false, features = ["alloc"], optional = true }
toml = { version = "1.1", default-features = false, features = ["parse", "serde", "display"], optional = true }
sha2 = { version = "0.11", default-features = false, optional = true }
wide = { version = "1.7", default-features = false }
wide = { version = "1.7", default-features = false, optional = true }
hashbrown = { version = "0.15", default-features = false, features = ["default-hasher", "inline-more"] }
spin = { version = "0.10", default-features = false, features = ["once"] }

Expand Down Expand Up @@ -220,3 +226,14 @@ harness = false
[[example]]
name = "24_spice_lunar"
required-features = ["spice"]

# Temporary while the upstream versions are unpublished.
[patch.crates-io]
siderust-archive = { path = "../archive" }
tempoch = { path = "../tempoch/tempoch" }
tempoch-core = { path = "../tempoch/tempoch-core" }
tempoch-ffi = { path = "../tempoch/tempoch-ffi" }

[[example]]
name = "25_embedded_compact"
required-features = ["embedded-compact"]
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,3 +456,5 @@ representations for leap instants and explicit snapshots for reproducibility.
Public geometry and mechanics dependencies (`affn` 0.12, `principia` 0.7,
`keplerian`, `optica`, and related crates) resolve from crates.io without Git
patches.

For offline embedded use, see the [compact ephemeris profile](doc/embedded_compact.md).
Loading
Loading