Closed fabcor-maxiv closed 1 month ago
My understanding is that pre-commit
uses venv
to install the tools needed but venv
needs the python interpreter to be installed (in this case Python 3.8). So for pre-commit
to work we need python 3.8 available so that venv
can use it.
It seems like its possible to configure pre-commit
to use conda and a conda-environment.yaml instead https://pre-commit.com/#conda. Maybe this would work better for us.
Is it still blocking someone?
I am now thinking about removing the default_language_version
entirely, and instead enforce checks against Python 3.8 (our lowest boundary) in a GitHub Actions workflow.
It seems like its possible to configure
pre-commit
to use conda and a conda-environment.yaml instead https://pre-commit.com/#conda. Maybe this would work better for us.
Can be tried. But as far as I understood it would not help, this is not what it is made for. If the hooks that we use are not made to work with conda (for example they do not have an environment.yml
file), then it will not work.
I see, thats how it works.
@HilbertCorsair did it work after you installed python 3.8, if its the case I suggest that we close this issue.
Is this still an issue ? :)
Ill close this for now, please feel free to reopen
I believe it is still an issue. But seems like it is not impacting anyone, or at least no one seems to be complaining.
As I already stated in https://github.com/mxcube/mxcubecore/issues/836#issuecomment-1896144709, it is not an issue for me, because I have the Python versions installed on my system anyway. So I am happy to leave things as they are for now.
Originally posted by @HilbertCorsair in https://github.com/mxcube/mxcubecore/issues/834#issuecomment-1891719681
There is a mismatch between the Python version installed by default when creating a new conda environment and the Python version required by the pre-commit hooks.
In
conda-environment-dev.yml
we havepython >=3.8,<3.11
, which means that we typically get Python 3.10. And in.pre-commit-config.yaml
we havedefault_language_version: python: python3.8
.