Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce docrs #287

Merged
merged 3 commits into from
Aug 13, 2024
Merged

Introduce docrs #287

merged 3 commits into from
Aug 13, 2024

Conversation

gwbres
Copy link
Collaborator

@gwbres gwbres commented Aug 4, 2024

Summary

Introduce docrs and document Almanac::until_2035

Signed-off-by: Guillaume W. Bres <[email protected]>
@ChristopherRabotin
Copy link
Member

There's a typo in your PR -- https://github.com/nyx-space/anise/actions/runs/10235622112/job/28318563141?pr=287#step:5:668:

error: unexpected `cfg` condition name: `docrs`
 --> anise/src/lib.rs:2:13
  |
2 | #![cfg_attr(docrs, feature(doc_cfg))]
  |             ^^^^^ help: there is a config with a similar name: `docsrs`
  |
  = help: consider using a Cargo feature instead

@gwbres
Copy link
Collaborator Author

gwbres commented Aug 6, 2024

hum, if I remember correctly, I used rinex/tools/builddoc.sh within your workspace, to try to test the proposal, without issues.

Having the doc step inside your CI can pick up that kind of issues also

@ChristopherRabotin
Copy link
Member

That's surprising because the CI reports the docrs feature as an error and recommends docsrs (with an extra s) instead. I'll try it out tonight but I've typically seen the CI be much stricter than my personal machines, not the other way around.

@ChristopherRabotin
Copy link
Member

I tried to make some changes to this branch, but I don't have permissions. Here is my review as a patch:

diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index fa62b68..950f819 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -58,11 +58,13 @@ jobs:
         run: sh dev-env-setup.sh && cd .. # Return to root
 
       - name: Test debug
+        if: secrets.LAGRANGE_BSP != ''
         env:
           LAGRANGE_BSP: ${{ secrets.LAGRANGE_BSP }}
         run: cargo test --workspace --exclude anise-gui --exclude anise-py
 
       - name: Test release
+        if: secrets.LAGRANGE_BSP != ''
         env:
           LAGRANGE_BSP: ${{ secrets.LAGRANGE_BSP }}
         run: cargo test --release --workspace --exclude anise-gui --exclude anise-py
@@ -131,6 +133,7 @@ jobs:
         run: RUST_BACKTRACE=1 cargo test validate_hermite_type13_ --features spkezr_validation --release --workspace --exclude anise-gui --exclude anise-py -- --nocapture --include-ignored --test-threads 1
 
       - name: Rust-SPICE Lagrange validation
+        if: secrets.LAGRANGE_BSP != ''
         env:
           LAGRANGE_BSP: ${{ secrets.LAGRANGE_BSP }}
         run: RUST_BACKTRACE=1 cargo test validate_lagrange_type9_with_varying_segment_sizes --features spkezr_validation --release --workspace --exclude anise-gui --exclude anise-py -- --nocapture --include-ignored --test-threads 1
@@ -205,7 +208,7 @@ jobs:
           cargo llvm-cov test --no-report validate_jplde_de440s_no_aberration --features spkezr_validation -- --nocapture --ignored
           cargo llvm-cov test --no-report validate_jplde_de440s_aberration_lt --features spkezr_validation -- --nocapture --ignored
           cargo llvm-cov test --no-report validate_hermite_type13_from_gmat --features spkezr_validation -- --nocapture --ignored
-          cargo llvm-cov test --no-report validate_lagrange_type9_with_varying_segment_sizes --features spkezr_validation -- --nocapture --ignored
+          [ -n "$LAGRANGE_BSP" ] && cargo llvm-cov test --no-report validate_lagrange_type9_with_varying_segment_sizes --features spkezr_validation -- --nocapture --ignored
           cargo llvm-cov test --no-report ut_embed --features embed_ephem
           cargo llvm-cov report --lcov > ../lcov.txt
 
diff --git a/anise/Cargo.toml b/anise/Cargo.toml
index 64b7a97..8591455 100644
--- a/anise/Cargo.toml
+++ b/anise/Cargo.toml
@@ -8,7 +8,7 @@ license = { workspace = true }
 repository = { workspace = true }
 description = "Core of the ANISE library"
 
-[package.metadata.doc.rs]
+[package.metadata.docs.rs]
 all-features = true
 rustdoc-ars = ["--cfg", "docrs", "--generate-link-to-definition"]
 
diff --git a/anise/src/lib.rs b/anise/src/lib.rs
index cba0337..7d1446f 100644
--- a/anise/src/lib.rs
+++ b/anise/src/lib.rs
@@ -1,5 +1,5 @@
 #![doc = include_str!("../README.md")]
-#![cfg_attr(docrs, feature(doc_cfg))]
+#![cfg_attr(docsrs, feature(doc_cfg))]
 /*
  * ANISE Toolkit
  * Copyright (C) 2021-onward Christopher Rabotin <[email protected]> et al. (cf. AUTHORS.md)

Signed-off-by: Guillaume W. Bres <[email protected]>
@gwbres
Copy link
Collaborator Author

gwbres commented Aug 13, 2024

Hello, applied (as is)

@ChristopherRabotin
Copy link
Member

Ah, I'm sorry, I merged your other PR and it introduced a conflict in this one. It should be a super simple fix, could you tackle that?

Signed-off-by: Guillaume W. Bres <[email protected]>
@ChristopherRabotin ChristopherRabotin merged commit 834c11b into nyx-space:master Aug 13, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants