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

Fix temp file removal #2251

Merged
merged 2 commits into from Oct 27, 2023
Merged

Fix temp file removal #2251

merged 2 commits into from Oct 27, 2023

Conversation

Ericgig
Copy link
Member

@Ericgig Ericgig commented Oct 24, 2023

Description
Properly remove temp pyx files.

Related issues or PRs
fix #2231

@coveralls
Copy link

coveralls commented Oct 24, 2023

Coverage Status

coverage: 70.419%. remained the same when pulling 2d3e551 on Ericgig:fixes_4.7_pxy into d8eef4d on qutip:qutip-4.7.X.

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.

Is it possible to add a tiny test for this?

@Ericgig
Copy link
Member Author

Ericgig commented Oct 26, 2023

Not sure how to make a test for this. The file name is random and it's not always reliable when the __del__ is called which is where the file is erased.

@hodgestar
Copy link
Contributor

Not sure how to make a test for this. The file name is random and it's not always reliable when the __del__ is called which is where the file is erased.

You could create a coefficient and check that the last entry of coeff_files.file_list looks correct and exists. The wouldn't check the deletion but would check that the filename is correct.

You can do del qutip.qobjevo.coeff_files to trigger the clean-up of the object, but that is a bit GC dependent and implementing it properly would require calling gc.collect(). Not sure if that is worth the hassle.

@Ericgig Ericgig merged commit 94d5ab5 into qutip:qutip-4.7.X Oct 27, 2023
12 checks passed
@Ericgig Ericgig deleted the fixes_4.7_pxy branch October 27, 2023 13:35
@HarshBabla99
Copy link

Hi, thanks for fixing this issue.
However, its release seems to be stalled because of other incomplete features in v4.7.3.
Is there something I can to fix this issue for myself locally, while we wait for v4.7.3 to be released publicly?

Thanks,
Harsh.

@Ericgig
Copy link
Member Author

Ericgig commented Feb 21, 2024

v4.7.5 was released a few weeks ago.
It's available on both conda and pypi.

@HarshBabla99
Copy link

Thanks

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

4 participants