I want to make this file reorganization before the...
# development
h
I want to make this file reorganization before the next alpha because it’s big API break, and we’re soon exposing a new plugin hook for
setup-py
. I don’t think it makes sense to have a
rules
folder anymore, like
backend/python/rules
. Plugins are basically only rules now - it’s a bit redundant Instead, I’m thinking something like this?
Copy code
python/
   /dependency_inference/
   /lint
       /black
       /isort
       ...
   / typecheck
       /mypy
   /util_rules
       /pex_environment.py
       /pex.py
       ...
   /goals (or goal_implementations/)
   /macros (e.g. `pipenv_requirements.py`)
   /subsystems
   /target_types.py
cc @aloof-angle-91616
h
looks good to me! Not sure we need
subsystems
even. Might make more sense to locate subsystems alongside the code that uses them.
💯 1
h
I tried moving inlining
subsystems
, but two issues: a) Causes some import cycles, e.g.
PyTest
being used in
target_types.py
so it can’t be defined in
pytest_runner.py
. Having
goals/pytest.py
seems worse than
subsystems/pytest.py
. b) Some subsystems are very generic, like
subprocess-environment
, and there’s no clear place where it should live I think this is fine as is. Will put up the PR as soon as https://github.com/pantsbuild/pants/pull/10721 lands