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

Cannot run the example/test notebooks #11

Closed
simonrp84 opened this issue May 1, 2024 · 7 comments
Closed

Cannot run the example/test notebooks #11

simonrp84 opened this issue May 1, 2024 · 7 comments
Assignees

Comments

@simonrp84
Copy link

Hello,
I have installed Pythonic-DISORT by cloning the repo and running pip install -r all_optional_dependencies.txt

I then tried to run the example notebook 1a_test but get this error:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[1], line 2
      1 import PythonicDISORT
----> 2 import disort
      3 import numpy as np
      4 import matplotlib.pyplot as plt

ModuleNotFoundError: No module named 'disort'

The installation went smoothly, so I am unsure why I get this ModuleNotFoundError. Could you please look into it?

@simonrp84 simonrp84 changed the title Cannot run the example notebooks Cannot run the example/test notebooks May 1, 2024
@dhjx1996 dhjx1996 self-assigned this May 1, 2024
@dhjx1996
Copy link
Collaborator

dhjx1996 commented May 1, 2024

The disort module is the Python-wrapped DISORT. Unfortunately, installation of that module is system-dependent and users will need to separately install FORTRAN compilers. Thus, it is not installed with PythonicDISORT and is in fact not part of PythonicDISORT. If you would like to get that running, however, I will most certainly be happy to help.

The test reference solutions from DISORT have been saved in .npz files in the pydisotest directory though, and so you can run pytest in that directory without needing the disort module.

@RobertPincus
Copy link

@simonrp84, @dhjx1996 and I discussed this further, and he may split the notebooks into those doing validation against the Fortran code and those demonstrating the use of PythonicDisort more generally.

@simonrp84
Copy link
Author

Yes, I think that would be a good idea - it wasn't immediately clear to me that those notebooks were for testing rather than as examples for users.

@dhjx1996
Copy link
Collaborator

dhjx1996 commented May 3, 2024

Sounds good! I will revamp the current test notebooks into examples for users and remove disort4.0.99_f2py and all references to the disort module to avoid licensing issues. I may make some changes to how the tests are conducted but there will still be automated tests at the very least.

@dhjx1996
Copy link
Collaborator

dhjx1996 commented Jun 4, 2024

I have removed disort4.0.99_f2py from both the repository and the entire repository history. I have kept the .npz reference solutions in the repository but greatly reduced their size. These changes are not final, but at least now the Jupyter Notebooks should all run regardless of whether a F2py-wrapped Stamnes' DISORT is installed.

@dhjx1996 dhjx1996 closed this as completed Aug 6, 2024
@dhjx1996
Copy link
Collaborator

dhjx1996 commented Aug 6, 2024

The test suite may undergo further changes but the initial problem has been resolved.

@simonrp84
Copy link
Author

Apologies for not closing this myself, thanks for the work on it.

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

No branches or pull requests

3 participants