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
Replace tmpdir
usage with tmp_path
in our tests
#16188
Comments
Happy to contribute to this issue if no one has been assigned to it! |
Hello, @yhl48 are you still working on this? I'm planning to work on this, would love to have your input on this. Thanks |
@carmocca, in which file tmpdir with tmp_path should be replaced |
in all files :) |
All files of lightning-AI, can I work on it. |
1 similar comment
All files of lightning-AI, can I work on it. |
Let's split is per topic:
|
May I do the above 4 files. |
@Borda Got it, replacements have to be done on tests file, I'm starting working on tests files. |
@Borda will you please check my pull request and the changes I have done. |
I think it would be easier/faster if you create a PR per check item here: #16188 (comment) |
@Borda , what we should do files, give me a idea |
Let's create another PR and perform replacement just for one sub folder as listed in comment/check-list above... |
@Borda what replacement do we need to perform and on which sub-folder |
Could you please ping me on slack, would be easier to explain =) |
@Borda , yaa sure tell me your slack Id |
You can find me as Jirka :)
|
@Borda ok, will do that. |
@Borda is this still open for contribution, I would love to work on it 😊 |
great, I can still see many places where this would need to be replaced :) |
Outline & Motivation
tmpdir
is considered legacy:(from https://docs.pytest.org/en/7.1.x/how-to/tmp_path.html#the-tmpdir-and-tmpdir-factory-fixtures)
Pitch
Run pytest with
pytest -p no:legacypath
as the link above suggests and replace all occurrences.This can be added in https://github.com/Lightning-AI/lightning/blob/94e6d52b7e2f2a9ffc21f7e11e087808666fe710/setup.cfg#L28-L32
addopts = --strict-markers --doctest-modules --color=yes --disable-pytest-warnings --ignore=legacy/checkpoints + -p no:legacypath
Replace all
tmpdir
usagesAdditional context
No response
cc @Borda
The text was updated successfully, but these errors were encountered: