alan-turing-institute / python-project-template

15 stars 3 forks source link

Ask for minimum supported Python version instead of a range + trim down pre-commit config #22

Closed phinate closed 9 months ago

phinate commented 9 months ago

It's a bit tricky to meaningfully parse a version range and extract the minimum supported version for CI and linting/checking purposes. This PR replaces the version range question with just the minimum Python version, and will by default support Python versions equal to or greater than this version. A nice perk of this is the simple extraction of the version number to run mypy and test CI with.

This PR also removes some of the pre-commit hooks that are not specific to a Python project. I realized myself that I wouldn't necessarily want my markdown/yaml files to be prose-wrapped or things like this in my Python project.