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

Flute can't load its data file when in editable install #67

Open
robtaylor opened this issue Oct 14, 2023 · 3 comments
Open

Flute can't load its data file when in editable install #67

robtaylor opened this issue Oct 14, 2023 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@robtaylor
Copy link
Collaborator

When coriolis is installed as editable (pip3 install -e) flute can't find POWV9.dat and POST9.dat.

@jpc-lip6
Copy link
Collaborator

FLUTE should try to open POWV9.dat and POST9.dat in the coriolis_top directory. To see what's wrong we need to know where they are in the packages and what value is guessed for coriolis_top.

@robtaylor
Copy link
Collaborator Author

This ie due the the logic loading it from coriolis_top, which doesn't seem to exist in a editable install.
May be that eventually we need to reorganise into a standard python layout... any ideas for fixing greatly welcomed.

@robtaylor robtaylor added bug Something isn't working help wanted Extra attention is needed labels Oct 14, 2023
@robtaylor
Copy link
Collaborator Author

robtaylor commented Oct 14, 2023

Did some research. Basically the fix here is to change all usage of 'coriolis_top' etc (any data file or source loads from within the package) to using importlib.resources. We can use importlib.resources.as_file to get filenames to pull in from C++.

This is also related some what to #66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants