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

Use Conda-Forge's CSPICE Package in Tudat #225

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from

Conversation

geoffreygarrett
Copy link
Member

@geoffreygarrett geoffreygarrett commented Jul 17, 2024

Please review and merge, @DominicDirkx. With this update, we will no longer need to maintain our own cspice fork and can instead utilize the peer-reviewed package maintained by astrojuanlu and AndrewAnnex available at conda-forge/cspice-feedstock. This change is long overdue. Re-rendering our own cspice was causing issues, and switching to the conda-forge package has proven to be a much faster and more sustainable solution.

Testing Procedure

I followed these steps to ensure that the integration of the conda-forge cspice package works correctly with Tudat:

  1. Created a new conda environment using the environment.yaml provided in the Tudat repository.

    conda env create -f environment.yml
    conda activate tudat
  2. Set up the build directory and configured the project using CMake:

    mkdir build
    cd build
    cmake .. -DCMAKE_PREFIX_PATH=${CONDA_PREFIX}
  3. Built the specific test target and ran it using ctest:

    cmake --build . --target test_spice_SpiceInterface
    ctest -R test_spice_SpiceInterface

    Test Results:

    Test project /home/geoffrey/tudat/build
        Start 205: test_spice_SpiceInterface
    1/1 Test #205: test_spice_SpiceInterface ........   Passed    0.03 sec
    
    100% tests passed, 0 tests failed out of 1
    
    Total Test time (real) =   0.05 sec
    

These results confirm that the cspice library from conda-forge is compatible with our current Tudat setup and meets all our requirements. This switch should simplify our dependencies and reduce maintenance overhead.

@geoffreygarrett geoffreygarrett added the enhancement New feature or request label Jul 17, 2024
@geoffreygarrett geoffreygarrett marked this pull request as draft July 17, 2024 10:51
@geoffreygarrett
Copy link
Member Author

geoffreygarrett commented Jul 17, 2024

This works locally on my macbook so I'm not sure why it's failing on mac. Some of the failures seemed to suggest that the mac build was working with the wrong CMake files, but it doesn't seem to have been loading from the wrong build cache.

Local:

-- Found Boost: /Users/geoffreygarrett/mambaforge/envs/tudat/lib/cmake/Boost-1.85.0/BoostConfig.cmake (found suitable version "1.85.0", minimum required is "1.72.0") found components: filesystem system regex date_time thread chrono atomic unit_test_framework
-- Detected Boost version: 1.85.0
-- Boost include dirs: /Users/geoffreygarrett/mambaforge/envs/tudat/include
-- Checking for _GLIBCXX_USE_CXX11_ABI definition...
-- _GLIBCXX_USE_CXX11_ABI was not found.
/Users/geoffreygarrett/mambaforge/envs/tudat/lib/cmake/tudatresources/../../../include
-- Found CSpice: /Users/geoffreygarrett/mambaforge/envs/tudat/lib/libcspice.dylib (found version "67.0.0")
-- Found CSpice: /Users/geoffreygarrett/mambaforge/envs/tudat/include (found version 67.0.0)
-- Extended precision propagation disabled!
-- TUDAT_DATA_DIR_RELATIVE_TO_INSTALL_PREFIX: data/tudat
-- Configuring done (1.4s)
-- Generating done (1.1s)

@niketagrawal maybe you might have an opinion given you authored the test_and_build workflow.

@DominicDirkx
Copy link
Member

DominicDirkx commented Jul 17, 2024

Sounds great! Before merging this into develop, I think it's also crucial to test if all the builds on Azure of both tudat and tudatpy are still successful. When they are, I think this is great!

Listing required tasks before merging:

  • Make accompanying pull request on tudatpy
  • Make accompanying pull request on tudatpy-feedstock
  • Make accompanying pull request on tudat-feedstock
  • Make pull requests on relevant repositories (tudat-space, tudat-bundle) to modify dependencies in yaml files

@geoffreygarrett geoffreygarrett marked this pull request as ready for review July 17, 2024 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants