-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add prompt for main python version #27
base: main
Are you sure you want to change the base?
Conversation
@@ -50,9 +50,11 @@ jobs: | |||
run: uv run mypy | |||
|
|||
{% if cookiecutter.codecov == "y" %} | |||
- name: Upload coverage reports to Codecov with GitHub Action on Python 3.11 | |||
- name: Upload coverage reports to Codecov with GitHub Action on Python 3.12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be changed to the main python version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, let me update it.
uses: codecov/codecov-action@v4 | ||
if: {% raw %}${{ matrix.python-version == '3.11' }}{% endraw %} | ||
if: {% raw %}${{ matrix.python-version == '3.12' }}{% endraw %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be changed to the main python version?
@@ -29,7 +29,7 @@ jobs: | |||
runs-on: ubuntu-latest | |||
strategy: | |||
matrix: | |||
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |||
python-version: {{ cookiecutter._python_version_matrix }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tried it by selecting main_python_version 3.13, and I ended up with only 3.13? IMO we should still test for all current Python versions that are not EOL.
@@ -5,23 +5,24 @@ description = "{{cookiecutter.project_description}}" | |||
authors = [{ name = "{{cookiecutter.author}}", email = "{{cookiecutter.email}}" }] | |||
readme = "README.md" | |||
keywords = ['python'] | |||
requires-python = ">=3.9,<4.0" | |||
{%- set minor_version = cookiecutter.main_python_version.split('.')|map('int')|list %} | |||
requires-python = ">={{cookiecutter.main_python_version}},<4.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still should remain 3.9; not the main_python_version acts as a minimum python version. A good Python package should aim to support all currently supported Python versions.
At least, a package should start with this. If for some reason some versions need to be dropped, e.g. because some dependencies only support >=3.10, then it makes sense to update this manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I had no idea what you meant earlier by main python version. I thought it was supposed to be the minimum version. So, it should be ">=3.9,<3.13" if I select 3.12 as main_python_version
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still should remain 3.9; not the main_python_version acts as a minimum python version. A good Python package should aim to support all currently supported Python versions.
I get it, I add all supported versions in my packages. I just thought this version selection would be an interesting addition.
PR Checklist
docs
is updatedDescription of changes
.github
,tox.ini
andpyproject.toml
. Selected main version is applied toDockerfile
.