From ee836249b36aa466788cef85056bf93fc04d0f58 Mon Sep 17 00:00:00 2001 From: Christopher Rabotin Date: Fri, 2 Aug 2024 16:30:29 -0600 Subject: [PATCH] Fix plot paths --- .github/workflows/deploy-live-docs.yml | 16 +++++++++++++--- .github/workflows/deploy-staging-docs.yml | 16 +++++++++++++--- src/od/simulator/arc.rs | 4 ++-- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy-live-docs.yml b/.github/workflows/deploy-live-docs.yml index d2724222..4b270dbd 100644 --- a/.github/workflows/deploy-live-docs.yml +++ b/.github/workflows/deploy-live-docs.yml @@ -18,11 +18,21 @@ jobs: - run: cargo doc --no-deps --examples -Z rustdoc-scrape-examples - name: Copy plots directories run: | + declare -A example_map + example_map["01_orbit_prop"]="01_orbit_prop" + example_map["02_jwst_covar_monte_carlo"]="02_jwst" + example_map["03_geo_analysis"]="03_geo_raise" + for example_dir in examples/*; do + example_name=$(basename $example_dir) if [ -d "$example_dir/plots" ]; then - example_name=$(basename $example_dir) - mkdir -p target/doc/$example_name/plots - cp -r $example_dir/plots/* target/doc/$example_name/plots/ + doc_name=${example_map[$example_name]} + if [ -n "$doc_name" ]; then + mkdir -p target/doc/$doc_name/plots + cp -r $example_dir/plots/* target/doc/$doc_name/plots/ + else + echo "No mapping found for $example_name" + fi fi done - uses: FirebaseExtended/action-hosting-deploy@v0 diff --git a/.github/workflows/deploy-staging-docs.yml b/.github/workflows/deploy-staging-docs.yml index 2463cf10..1b9ad80a 100644 --- a/.github/workflows/deploy-staging-docs.yml +++ b/.github/workflows/deploy-staging-docs.yml @@ -16,11 +16,21 @@ jobs: - run: cargo doc --no-deps --examples -Z rustdoc-scrape-examples - name: Copy plots directories run: | + declare -A example_map + example_map["01_orbit_prop"]="01_orbit_prop" + example_map["02_jwst_covar_monte_carlo"]="02_jwst" + example_map["03_geo_analysis"]="03_geo_raise" + for example_dir in examples/*; do + example_name=$(basename $example_dir) if [ -d "$example_dir/plots" ]; then - example_name=$(basename $example_dir) - mkdir -p target/doc/$example_name/plots - cp -r $example_dir/plots/* target/doc/$example_name/plots/ + doc_name=${example_map[$example_name]} + if [ -n "$doc_name" ]; then + mkdir -p target/doc/$doc_name/plots + cp -r $example_dir/plots/* target/doc/$doc_name/plots/ + else + echo "No mapping found for $example_name" + fi fi done - uses: FirebaseExtended/action-hosting-deploy@v0 diff --git a/src/od/simulator/arc.rs b/src/od/simulator/arc.rs index 6b2aac78..22ea603a 100644 --- a/src/od/simulator/arc.rs +++ b/src/od/simulator/arc.rs @@ -294,8 +294,8 @@ impl TrackingArcSim { /// 5. Build each of these as "tracking strands" for this tracking device. /// 6. Organize all of the built tracking strands chronologically. /// 7. Iterate through all of the strands: - /// 7.a. if that tracker is marked as `Greedy` and it ends after the start of the next strand, change the start date of the next strand. - /// 7.b. if that tracker is marked as `Eager` and it ends after the start of the next strand, change the end date of the current strand. + /// 7.a. if that tracker is marked as `Greedy` and it ends after the start of the next strand, change the start date of the next strand. + /// 7.b. if that tracker is marked as `Eager` and it ends after the start of the next strand, change the end date of the current strand. pub fn generate_schedule( &self, almanac: Arc,