You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The basic idea is to start ruff in a mode where it monitors file changes and runs something whenever
it detects changes. Primarily, a user should be able to provide a command to be run, for instance, pytest.
This would allow users to run ruff analyze live --cmd -- pytest, which would then run pytest on all impacted tests whenever a file is changed, while considering transitive dependencies; it could also
be used to understand how broad the scope of your changes might be (by just showing transitively
impacted files on each change), to monitor cyclic dependencies to see in real-time to check whether your
changes impact them, probably a ton more ideas others might have.
ruff analyze live -- pytest to run all impacted tests
ruff analyze live --paths tests/test_a.py,tests/test_b.py -- pytest to only run specific tests if
they are impacted
ruff analyze live: (unimplemented in the PR) could print certain code health/analysis on each change,
like a list of impacted files, whether cyclic dependencies will be introduced, etc. For instance, if a repo
is configured with data/config files in its include-dependencies, this could show how much might change if
a seemingly simple JSON is edited. Depending on how useful this could be made, it could end up being
something that's constantly running on the side and offering information and possibly aid.
The text was updated successfully, but these errors were encountered:
The basic idea is to start
ruff
in a mode where it monitors file changes and runs something wheneverit detects changes. Primarily, a user should be able to provide a command to be run, for instance,
pytest
.This would allow users to run
ruff analyze live --cmd -- pytest
, which would then runpytest
onall impacted tests whenever a file is changed, while considering transitive dependencies; it could also
be used to understand how broad the scope of your changes might be (by just showing transitively
impacted files on each change), to monitor cyclic dependencies to see in real-time to check whether your
changes impact them, probably a ton more ideas others might have.
I have an MVP/WIP implementation in #15178.
Example uses:
ruff analyze live -- pytest
to run all impacted testsruff analyze live --paths tests/test_a.py,tests/test_b.py -- pytest
to only run specific tests ifthey are impacted
ruff analyze live
: (unimplemented in the PR) could print certain code health/analysis on each change,like a list of impacted files, whether cyclic dependencies will be introduced, etc. For instance, if a repo
is configured with data/config files in its
include-dependencies
, this could show how much might change ifa seemingly simple JSON is edited. Depending on how useful this could be made, it could end up being
something that's constantly running on the side and offering information and possibly aid.
The text was updated successfully, but these errors were encountered: