Page MenuHomePhabricator

[envvars-cli] move pytest from tox to pre-commit
Closed, ResolvedPublic

Description

  • move pytest into pre-commit
  • clean up tox.ini and remove unnecessary things

Event Timeline

Raymond_Ndibe changed the task status from Open to In Progress.Nov 17 2023, 12:35 AM

I think we might want to keep pytest outside of pre-commit, we kept it out for the reasons mentioned here: https://github.com/pre-commit/pre-commit-hooks/issues/291

There's also better control of the dependencies (versions of pytest, python, ...) from tox afaik

But I'm willing to change my mind, so send a patch if you think otherwise and we can check :)

I think we might want to keep pytest outside of pre-commit, we kept it out for the reasons mentioned here: https://github.com/pre-commit/pre-commit-hooks/issues/291

There's also better control of the dependencies (versions of pytest, python, ...) from tox afaik

But I'm willing to change my mind, so send a patch if you think otherwise and we can check :)

@dcaro I looked at the issue you linked and it seems to be talking about why their is not official pytest pre-commit hook (like the way we have black and flake8). Although it did mention the other issue of tests being slow, but I don't think that applies to us since our tests are not necessarily slow. I think they did recommended a way to add pytest to pre-commit (that you have to add yourself) which is kind of variation of the local approach. Will try out their approach too

Slst2020 changed the task status from Declined to Resolved.Jan 12 2024, 10:54 AM
Slst2020 reopened this task as In Progress.
Slst2020 closed this task as Declined.
Slst2020 moved this task from In Progress to Done on the Toolforge (Toolforge iteration 03) board.
Slst2020 moved this task from Done to In Progress on the Toolforge (Toolforge iteration 03) board.
dcaro changed the task status from Declined to Resolved.Jan 12 2024, 6:13 PM
dcaro moved this task from In Progress to Done on the Toolforge (Toolforge iteration 03) board.