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

Convert jupyter notebooks to python files #72

Merged
merged 10 commits into from
Oct 20, 2024

Conversation

larshinueber
Copy link
Collaborator

This PR extends and updates the create_scripts.py utility to fix #22

Major changes include:

The script was applied to all notebooks in the repository, no python file was modified afterwards. No more syntax errors are present.

Before merging

Please check if the generated python files are as desired :)
If you want to try the script yourself, make sure to use the tudat-examples conda environment from environment.yaml, specifically the nbconvert version specified there, as there were some changes that are not backwards compatible.

@DominicDirkx
Copy link
Member

This all looks good to me. For the environment.yaml, is it important for all the package versions here:
https://github.com/tudat-team/tudatpy-examples/blob/master/environment.yaml
to be fixed? Ideally, we would have the conda environment we use for the examples to just be the same one people use for their tudat applications (linked to here: https://docs.tudat.space/en/latest/_src_getting_started/installation.html).

@larshinueber
Copy link
Collaborator Author

Great :)

Most of the package versions do not need to be fixed, I added them such that the example outputs are reproducible. Of course, with a new tudatpy version these would then have to be updated.
The only inherently important versions to be fixed are the boost-cpp and pygmo versions (will open a new issue from the Brightspace post of P&O), the nbconvert version due to the breaking changes across versions and the astroquery version, as per tudat-team/tudat-bundle#22.

I agree that having one single environment would be nice. On the other hand you could argue that the tudatpy-examples toolchain has some dependencies that a regular user probably won't be using, like nbconvert and tqdm (although tqdm is more a nice-to-have than a must), so including them in the main tudat-space environment.yaml seems a bit out of place?

@DominicDirkx
Copy link
Member

Looks good, thanks. Doing the conversion between .ipynb and .py indeed shouldn't be that relevant for the average user.

@DominicDirkx DominicDirkx merged commit 2ad2e4e into tudat-team:master Oct 20, 2024
@larshinueber larshinueber deleted the feature/create-scripts branch October 20, 2024 20:04
luigigisolfi pushed a commit to luigigisolfi/tudatpy-examples that referenced this pull request Dec 4, 2024
…ipts

Convert jupyter notebooks to python files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants