-
Notifications
You must be signed in to change notification settings - Fork 63
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
from __future__ import annotations | ||
|
||
import os | ||
import sys | ||
from pathlib import Path | ||
|
||
|
||
def main() -> None: | ||
cwd = os.path.dirname(__file__) | ||
package_dir = os.path.abspath(os.path.join(cwd, "..")) | ||
os.system(f"cookiecutter {package_dir}") # noqa: S605 | No injection, retrieving path in OS | ||
package_dir = Path(__file__).parent.parent.absolute() | ||
try: | ||
os.system(f"cookiecutter {package_dir}") # noqa: S605 | No injection, retrieving path in OS | ||
except KeyboardInterrupt: | ||
sys.exit(0) |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,25 @@ | ||
max_line_length = 120 | ||
max_line_length = 100 | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{py,rst,ini}] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.json] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[Makefile] | ||
indent_style = tab | ||
|
||
[default.conf] | ||
indent_style = space | ||
indent_size = 2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Main | ||
name: CI | ||
|
||
on: | ||
push: | ||
|
@@ -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 }} | ||
fail-fast: false | ||
defaults: | ||
run: | ||
|
@@ -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 commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't this be changed to the main python version? |
||
env: | ||
CODECOV_TOKEN: {% raw %}${{ secrets.CODECOV_TOKEN }}{% endraw %} | ||
{%- endif %} | ||
|
||
{%- if cookiecutter.mkdocs == "y" %} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
# {{cookiecutter.project_name}} | ||
|
||
[](https://img.shields.io/github/v/release/{{cookiecutter.author_github_handle}}/{{cookiecutter.project_name}}) | ||
[](https://github.com/{{cookiecutter.author_github_handle}}/{{cookiecutter.project_name}}/actions/workflows/main.yml?query=branch%3Amain) | ||
[](https://img.shields.io/github/commit-activity/m/{{cookiecutter.author_github_handle}}/{{cookiecutter.project_name}}) | ||
[](https://img.shields.io/github/license/{{cookiecutter.author_github_handle}}/{{cookiecutter.project_name}}) | ||
<p align="center">{{cookiecutter.project_description}}</p> | ||
|
||
{{cookiecutter.project_description}} | ||
--- | ||
|
||
<p align="center"> | ||
<a href="https://img.shields.io/github/v/release/{{cookiecutter.author_github_handle}}/{{cookiecutter.project_name}}"> | ||
<img src="https://img.shields.io/github/v/release/{{cookiecutter.author_github_handle}}/{{cookiecutter.project_name}}" alt="{{cookiecutter.project_name}} version"> | ||
</a> | ||
<a href="https://github.com/{{cookiecutter.author_github_handle}}/{{cookiecutter.project_name}}/actions/workflows/main.yml"> | ||
<img src="https://github.com/{{cookiecutter.author_github_handle}}/{{cookiecutter.project_name}}/actions/workflows/main.yml/badge.svg" alt="{{cookiecutter.project_name}} CI status"> | ||
</a> | ||
<a href="https://codecov.io/gh/{{cookiecutter.author_github_handle}}/{{cookiecutter.project_name}}"> | ||
<img src="https://codecov.io/gh/{{cookiecutter.author_github_handle}}/{{cookiecutter.project_name}}/branch/main/graph/badge.svg" alt="{{cookiecutter.project_name}} codecov"> | ||
</a> | ||
<a href="https://img.shields.io/github/license/{{cookiecutter.author_github_handle}}/{{cookiecutter.project_name}}"> | ||
<img src="https://img.shields.io/github/license/{{cookiecutter.author_github_handle}}/{{cookiecutter.project_name}}" alt="{{cookiecutter.project_name}} license"> | ||
</a> | ||
</p> |
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.