Closed soininen closed 1 month ago
I tried to install Toolbox dev-requirements.txt to Conductor's Python environment, but it did not help.
This is bit of a stickler in Python. These kind of tools are independent of the code base, but since they are implemented in python, they end up being installed in the project's venv. So running the tool starts depending on the dev environment, when there's no need. I think the clean way to solve this is to install these kinds of tools globally, e.g. with pipx
(just like the conductor
itself).
That said, maybe it's possible to have another config like: tools.conductor.dev-venv
(or a CLI flag). But I don't know if this will be straightforward or messy to implement, because we've to customise PATH
for the execution environment of git
which is a couple of layers deep.
It would probably be OK to skip the pre-commit hooks with git commit --no-verify
(or whatever) since the release commits usually include changes just in pyproject.toml
and CHANGELOG.md
so there is no need to run black or isort.
Good point, conductor
can even check if any Python files have been modified. How about this:
Check which files were modified.
--no-verify
Sounds good!
I have installed Git's precommit hooks for Toolbox which run
black
andisort
. This leads to failure when trying to create release tags because Conductor's Python environment is missing both programs. Traceback: