-
Notifications
You must be signed in to change notification settings - Fork 35
add in k vector tests #157
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
Conversation
pytest wants names beginning with test_
|
The tests were failing before because seekpath was not being installed; that has been addressed, at least for "smoke test". Also, when seekpath is not found, now tests are skipped and are marked "s" in the output. Now some of the tests are failing, with these errors (see logs for more details): |
|
Also, I don't know if there is a way so that a push to pull requests only generates one set of self tests (https://github.com/AdvancedPhotonSource/GSAS-II/blob/420d89118863f207184e08db084283f7bb18445c/.github/workflows/smoke_test.yml), but if you have advice, I'd be happy to try that. |
I will push some changes to fix this. |
This is the suggested change I got from github copilot, where I am not sure whether this will work but maybe we can give it a try? |
|
I am seeing failures about the |
Good question. It gets compiled as part of the self-test with the pixi install. There are some warnings there: https://github.com/AdvancedPhotonSource/GSAS-II/actions/runs/14004790689/job/39217191633?pr=157#step:4:357. It should be using this meson file: https://github.com/AdvancedPhotonSource/GSAS-II/blob/kvec_test/sources/k_vec_cython/meson.build to build. If you are getting different results, we should take a close look at how you are compiling and linking and compare that to what meson is doing. |
Here is what I do to compile the module locally. First, I have the source codes in the from setuptools import setup
from Cython.Build import cythonize
import numpy as np
setup(
ext_modules=cythonize("kvec_general.pyx"),
include_dirs=[np.get_include()]
)I have a conda environment with python setup.py build_ext --inplaceThis will create the compiled module file. On Windows, it ends with Maybe this will help identify what the issue is with the compiling in GitHub action? Please feel free to let me know if anything further you need from me. Thanks! |
|
I think I know what the problem is but not sure about the solution. In GitHub action when compiling the Do we need to insert |
|
I fixed the import problem (imports are now relative) and added some more detail when errors occur. Also added some code to prevent pytest from failing due to the warning generated by seekpath. The test is now failing because a different value is being computed: |
Thank you so much for your fix! I will take care of the failing test then. Also, maybe next time when we meet, I may need your help show me how to run the tests locally so I can test on my local machine before pushing codes. That will be super helpful. Thanks! |
briantoby
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tolerances seem pretty large. OTOH if the code runs and produces an answer that is already a pretty good test. I'm OK with this
No description provided.