Skip to content

Commit

Permalink
Update BPC test for new file and fix artifact names
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherRabotin committed Feb 8, 2025
1 parent c319c34 commit e29cca7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 25 deletions.
20 changes: 3 additions & 17 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux
name: wheels-linux-${{ matrix.target }}
path: anise-py/dist

- name: pytest
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows
name: wheels-windows-${{ matrix.target }}
path: anise-py/dist

- name: pytest
Expand Down Expand Up @@ -244,21 +244,7 @@ jobs:
if: github.ref_type == 'tag'
needs: [linux, windows, macos-13, macos-14, sdist]
steps:
- uses: actions/download-artifact@v4
with:
name: wheels-sdist
- uses: actions/download-artifact@v4
with:
name: wheels-linux
- uses: actions/download-artifact@v4
with:
name: wheels-windows
- uses: actions/download-artifact@v4
with:
name: wheels-macos-13
- uses: actions/download-artifact@v4
with:
name: wheels-macos-14
- uses: actions/download-artifact@v4 # No `name` to download all artifacts.

- name: Publish to PyPI
uses: PyO3/maturin-action@v1
Expand Down
16 changes: 8 additions & 8 deletions anise/tests/orientations/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ fn test_single_bpc() {
"wrong start epoch"
);
assert!(
(end - Epoch::from_gregorian_utc_at_midnight(2023, 1, 11)).abs() < 50.0_f64.microseconds(),
"wrong end epoch"
(end - Epoch::from_gregorian_utc_at_midnight(2025, 5, 4)).abs() < 50.0_f64.microseconds(),
"wrong end epoch: {end:?}"
);

let epoch = Epoch::from_str("2019-03-01T04:02:51.0 ET").unwrap();
Expand Down Expand Up @@ -90,7 +90,7 @@ fn test_single_bpc() {
};

assert!(
(dcm.rot_mat - spice_dcm.rot_mat).norm() < 1e-9,
(dcm.rot_mat - spice_dcm.rot_mat).norm() < 2.9e-9,
"dcm error! got: {}want:{}err = {:.3e}: {:.3e}",
dcm.rot_mat,
spice_dcm.rot_mat,
Expand All @@ -100,7 +100,7 @@ fn test_single_bpc() {

// Check the derivative
assert!(
(dcm.rot_mat_dt.unwrap() - spice_dcm.rot_mat_dt.unwrap()).norm() < 1e-13,
(dcm.rot_mat_dt.unwrap() - spice_dcm.rot_mat_dt.unwrap()).norm() < 2.1e-13,
"derivative error! got: {}want:{}derivative err = {:.3e}: {:.3e}",
dcm.rot_mat_dt.unwrap(),
spice_dcm.rot_mat_dt.unwrap(),
Expand Down Expand Up @@ -150,7 +150,7 @@ fn test_itrf93_to_j2k() {
assert_eq!(dcm.to, J2000);

assert!(
(dcm.rot_mat - spice_dcm.rot_mat).norm() < 1e-9,
(dcm.rot_mat - spice_dcm.rot_mat).norm() < 2.9e-9,
"dcm error! got: {}want:{}err = {:.3e}: {:.3e}",
dcm.rot_mat,
spice_dcm.rot_mat,
Expand All @@ -160,7 +160,7 @@ fn test_itrf93_to_j2k() {

// Check the derivative
assert!(
(dcm.rot_mat_dt.unwrap() - spice_dcm.rot_mat_dt.unwrap()).norm() < 1e-13,
(dcm.rot_mat_dt.unwrap() - spice_dcm.rot_mat_dt.unwrap()).norm() < 2.1e-13,
"derivative error! got: {}want:{}derivative err = {:.3e}: {:.3e}",
dcm.rot_mat_dt.unwrap(),
spice_dcm.rot_mat_dt.unwrap(),
Expand Down Expand Up @@ -212,7 +212,7 @@ fn test_j2k_to_itrf93() {
assert_eq!(dcm.from, J2000);

assert!(
(dcm.rot_mat - spice_dcm.rot_mat).norm() < 1e-9,
(dcm.rot_mat - spice_dcm.rot_mat).norm() < 2.9e-9,
"dcm error! got: {}want:{}err = {:.3e}: {:.3e}",
dcm.rot_mat,
spice_dcm.rot_mat,
Expand All @@ -222,7 +222,7 @@ fn test_j2k_to_itrf93() {

// Check the derivative
assert!(
(dcm.rot_mat_dt.unwrap() - spice_dcm.rot_mat_dt.unwrap()).norm() < 1e-13,
(dcm.rot_mat_dt.unwrap() - spice_dcm.rot_mat_dt.unwrap()).norm() < 2.1e-13,
"derivative error! got: {}want:{}derivative err = {:.3e}: {:.3e}",
dcm.rot_mat_dt.unwrap(),
spice_dcm.rot_mat_dt.unwrap(),
Expand Down

0 comments on commit e29cca7

Please sign in to comment.