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

Set ctx_closes when opening run using voview #375

Merged
merged 2 commits into from Jan 27, 2023

Conversation

cydanil
Copy link
Contributor

@cydanil cydanil commented Jan 26, 2023

This MR aims to close #374 in which it's shown how the context manager is not set correctly when using voview files.

The changes can be tested with the example shown in the ticket:

from extra_data import RunDirectory

with RunDirectory("/gpfs/exfel/exp/HED/202330/p900338/raw/r0052", "*S00000*") as fd:
    print(fd)

I updated the tests accordingly.

On an unrelated note, I found that psutil is required to run tests, but is not in the test requirements, which I suppose was not noticed because most have the docs requirements.

Thanks,
Cyril

@cydanil cydanil marked this pull request as ready for review January 26, 2023 17:04
Copy link
Member

@takluyver takluyver left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @cydanil !

@takluyver takluyver added this to the 1.13 milestone Jan 27, 2023
@takluyver takluyver added the bug Something isn't working label Jan 27, 2023
@cydanil
Copy link
Contributor Author

cydanil commented Jan 27, 2023

Thanks for the review!

@cydanil cydanil merged commit 9b4e5b7 into European-XFEL:master Jan 27, 2023
@cydanil cydanil deleted the fix/voview_context_manager branch January 27, 2023 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RunDirectory does not work as context manager when voview file present
2 participants