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

Have coefficient compilation use relative path #1975

Merged
merged 2 commits into from
Aug 17, 2022

Conversation

Ericgig
Copy link
Member

@Ericgig Ericgig commented Aug 16, 2022

Description
A change in setuptools (pypa/setuptools#3521) raise a warning when compiling coefficient using absolute path, which breaks our tests for dev.major:

DeprecationWarning: Absolute path '/home/runner/.qutip/qutip_coeffs_1.1/qtcoeff_8208be2129365a87dda9c12028c457' is being replaced with a relative path 'home/runner/.qutip/qutip_coeffs_1.1/qtcoeff_8208be2129365a87dda9c12028c457' for outputs. This behavior is deprecated. If this behavior is desired, please comment in pypa/distutils#169.

This changes the path to be relative.

I change the path before creating the lock files, which otherwise were polluting the active directory.

@Ericgig Ericgig requested a review from hodgestar August 16, 2022 21:53
Copy link
Contributor

@hodgestar hodgestar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finding and fixing this.

@hodgestar hodgestar merged commit bc9b27f into qutip:dev.major Aug 17, 2022
@hodgestar
Copy link
Contributor

I assume we need a similar fix for master?

@Ericgig Ericgig deleted the fix_test_dist_update branch August 17, 2022 13:24
@Ericgig
Copy link
Member Author

Ericgig commented Aug 17, 2022

I don't think we need a fix for master, I haven't seen the test fail yet.
In master, we create the file in the active directory and use pyx import. So the absolute path should never be used.

@hodgestar
Copy link
Contributor

The last build on master failed with:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/runner/work/qutip/qutip/qutip/__init__.py", line 64, in <module>
    import qutip.cy.pyxbuilder as _pyxbuilder
  File "/home/runner/work/qutip/qutip/qutip/cy/__init__.py", line 1, in <module>
    from qutip.cy.spmatfuncs import *
ModuleNotFoundError: No module named 'qutip.cy.spmatfuncs'

While trying to run qutip.about(). See https://github.com/qutip/qutip/actions/runs/2843095517. I triggered rerunning the Python 3.9 default build to see it if was temporary.

@hodgestar
Copy link
Contributor

It looks like the Python 3.9 build managed to start running the tests, so hopefully we are good!

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

Successfully merging this pull request may close these issues.

None yet

2 participants