-
Notifications
You must be signed in to change notification settings - Fork 838
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
Tests fail: invalid module name: 'pymatgen.io.vasp.inputs' #2275
Comments
You need to provide more details. That one liner does not give any information about your installation and there is no way we can diagnose where the problem lies. |
I am not sure what is happening, but it would appear your pymatgen install is not complete. Further, you seem to be installing to the OS python, which is highly discoouraged. I would recommend you redo the install within a proper virtual env or even better, use Miniconda to do the install. Please reopen the issue if you still encounter problems. |
I've came by this failure and have fixed it partially. The testing is set up properly now, but
At least 1 and 3 should be fixed in pymatgen code, so please reopen.
This is absolutely not possible for packaging. Additionally, miniconda is not available for FreeBSD.
|
Please be specific about what data is missing from the distribution. Note that the test files are deliberately not included within the usual pymatgen distribution. The test dir alone is several GB because it contains output files from electronic structure software. It is not possible to include this in an install file (and it is not common practice). If you want the full suite, you can download directly from the Github repo. For network access, you can exclude all tests in the pymatgen/ext folder (this is just using the --exclude options. As far as I know, pymatgen/ext is the only one that communicates on the network. |
The exhaustive log was attached, the files were mentioned right there. For instance,
This is understandable, but in this case not skipping tests if data files required for them are missing is the problem. |
For a code like pymatgen, most of the tests involve an external file of some sort. If we skip all tests that require things in test_files, we will be left with a tiny fraction of the code being tested. As I said before, testing is meant to be done from the Github full repository, which includes the test files. It is not meant to be done from the distributed wheels or the tar.gz source. |
This is expected, but it is better than nothing, and definitely better than failing for unrelated reason, and requiring investigation from a maintainer like in this case. If introducing proper test skips would be too much work, there probably are other solution, such as failing all the tests early with some informative message, or removing tests from the distribution as well. That would be consistent at the very least. |
The tests were never included in the distribution. Go ahead and download the tar.gz from https://pypi.org/project/pymatgen/ and see for yourself. Pretty sure there are no tests in there. |
Ok, that's true for the latest version. |
Describe the bug
python-3.8 -m pytest
fails:FreeBSD 13
The text was updated successfully, but these errors were encountered: