Skip to content

Commit 6a2d249

Browse files
Merge pull request #488 from nyx-space/feat/export-spk-summary-datatype
Pull request for issue #487
2 parents 500f45d + 58c5178 commit 6a2d249

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ resolver = "2"
33
members = ["anise", "anise-cli", "anise-gui", "anise-py", "anise/fuzz"]
44

55
[workspace.package]
6-
version = "0.6.5"
6+
version = "0.6.6"
77
edition = "2021"
88
authors = ["Christopher Rabotin <[email protected]>"]
99
description = "ANISE provides a toolkit and files for Attitude, Navigation, Instrument, Spacecraft, and Ephemeris data. It's a modern replacement of NAIF SPICE file."
@@ -47,7 +47,7 @@ numpy = "0.25"
4747
ndarray = ">= 0.15, < 0.17"
4848
rayon = "1.10.0"
4949

50-
anise = { version = "0.6.5", path = "anise", default-features = false }
50+
anise = { version = "0.6.6", path = "anise", default-features = false }
5151

5252
[profile.bench]
5353
debug = true

anise-py/tests/test_almanac.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ def test_state_transformation():
136136
# Cannot pickle across module boundaries =(
137137
# pickle.loads(pickle.dumps(paris)) == paris
138138

139+
# Test that we can get the SPK data type
140+
assert int(almanac.spk_summaries(301)[0].datatype()) == 2, "not shown as type 2"
141+
139142
# Function export test
140143
for fname in [
141144
"transform",
@@ -149,6 +152,8 @@ def test_state_transformation():
149152
"occultation",
150153
"line_of_sight_obstructed",
151154
"azimuth_elevation_range_sez",
155+
"spk_domains",
156+
"spk_summaries",
152157
]:
153158
assert hasattr(almanac, fname)
154159

anise/src/naif/spk/summary.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ impl SPKSummaryRecord {
6666
Frame::from(self.center_frame_uid())
6767
}
6868

69+
/// Returns the data type of this SPK Summary
70+
#[cfg(feature = "python")]
71+
pub fn datatype(&self) -> Result<DafDataType, <Self as NAIFSummaryRecord>::Error> {
72+
<Self as NAIFSummaryRecord>::data_type(self)
73+
}
74+
6975
/// Returns the start epoch of this SPK Summary
7076
#[cfg(feature = "python")]
7177
pub fn start_epoch(&self) -> Epoch {

0 commit comments

Comments
 (0)