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

Use pytest's tmp path instead of hard-codded ones #1058

Merged
merged 2 commits into from
Aug 7, 2023

Conversation

lucas-flexcompute
Copy link
Collaborator

Hard-codded paths can be an issue when tests are run in parallel or unordered, particularly in Windows. This commit removes all hard-codded paths from the test suite, replacing them with pytest's tmp_path fixture, which is also automatically cleaned after run.

A few ruff warnings were also cleaned up in the process: mostly unused imports and variables, and warnings caused by a large number of matplotlib figures being created.

Hard-codded paths can be an issue when tests are run in parallel or
unordered, particularly in Windows. This commit removes all hard-codded
paths from the test suite, replacing them with pytest's tmp_path
fixture, which is also automatically cleaned after run.

A few ruff warnings were also cleaned up in the process: mostly unused
imports and variables, and warnings caused by a large number of
matplotlib figures being created.

Signed-off-by: Lucas Heitzmann Gabrielli <lucas@flexcompute.com>
Signed-off-by: Lucas Heitzmann Gabrielli <lucas@flexcompute.com>
Copy link
Collaborator

@tylerflex tylerflex left a comment

Choose a reason for hiding this comment

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

really appreciate this @lucas-flexcompute ! just wondering about the difference between pylab and pyplot and want to make sure it doesn't change our plots in unexpected way, any thoughts on that? or what was the reasoning there?

@lucas-flexcompute
Copy link
Collaborator Author

really appreciate this @lucas-flexcompute ! just wondering about the difference between pylab and pyplot and want to make sure it doesn't change our plots in unexpected way, any thoughts on that? or what was the reasoning there?

We don't use any calls that are pylab-specific, so the changes should not cause any impact. I made the changes because the docs strongly discourage the use of pylab.

@tylerflex
Copy link
Collaborator

sounds good to me! can you squash the commits into one and then "Rebase and merge" this into 2.4? thanks!

@tylerflex tylerflex self-requested a review August 7, 2023 16:32
@lucas-flexcompute lucas-flexcompute merged commit be086a3 into pre/2.4 Aug 7, 2023
13 checks passed
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