You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
python3 -m venv venv
. venv/bin/activate
pip install linfa-vi
python -m unittest linfa.linfa_test_suite.trivial_example
# ModuleNotFoundError: No module named 'linfa.models'
I can see that linfa.models exists in the repository itself, and the tests run successfully on GitHub CI. The cause appears to be that linfa.models isn't being included in the wheel or sdist. However, because the repository has a "flat layout", linfa.models can be imported from the source directory when running the CI tests.
The packages can be fixed by making the following changes to pyproject.toml:
If you would like to ensure that the CI tests are being run against the built package, you could switch to a "src layout" (move linfa to src/linfa), and install the built package before running the tests. It's a little fiddlier, and a tool such as tox or nox can be helpful for this kind of thing. This is just a thought, I'm not suggesting you should do this as part of the JOSS review.
The text was updated successfully, but these errors were encountered:
Thank you for your comments, I have fixed this issue as you suggested by adding "linfa.models" to the list of packages. Thank you also for the interesting suggestion to change the layout and use additional tools. I'll take a look at tox/nox.
Hi @daneschi, I've started my JOSS review and encountered the following issue:
I can see that
linfa.models
exists in the repository itself, and the tests run successfully on GitHub CI. The cause appears to be thatlinfa.models
isn't being included in the wheel or sdist. However, because the repository has a "flat layout",linfa.models
can be imported from the source directory when running the CI tests.The packages can be fixed by making the following changes to
pyproject.toml
:or. to avoid having to manually list each sub-package:
If you would like to ensure that the CI tests are being run against the built package, you could switch to a "src layout" (move
linfa
tosrc/linfa
), and install the built package before running the tests. It's a little fiddlier, and a tool such as tox or nox can be helpful for this kind of thing. This is just a thought, I'm not suggesting you should do this as part of the JOSS review.The text was updated successfully, but these errors were encountered: