Skip to content
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

Update python version #11

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions {{ cookiecutter.package_name }}/.github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ on:

jobs:
build-and-publish:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9
- name: Verify versioning
run: |
[ "$(poetry version -s)" == "${GITHUB_REF#refs/tags/v}" ]
Expand Down
10 changes: 5 additions & 5 deletions {{ cookiecutter.package_name }}/.github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:
test:
strategy:
matrix:
os: [ 'ubuntu-20.04' ]
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
os: ["ubuntu-24.04", "windows-2022", "macos-14"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
runs-on: {{ '${{ matrix.os }}' }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: {{ '${{ matrix.python-version }}' }}
- name: Install dependencies
Expand All @@ -30,7 +30,7 @@ jobs:
run: poetry run python print-coverage.py >> $GITHUB_ENV
- name: Create coverage badge
if: {{ '${{' }} github.repository == '{{ cookiecutter.github_account }}/{{ cookiecutter.package_name }}' && github.event_name == 'push' && runner.os == 'Linux' }}
uses: schneegans/dynamic-badges-action@v1.1.0
uses: schneegans/dynamic-badges-action@1.7.0
with:
auth: {{ '${{ secrets.GIST_SECRET }}' }}
gistID: {{ cookiecutter.coverage_gist }}
Expand Down
4 changes: 2 additions & 2 deletions {{ cookiecutter.package_name }}/print-coverage.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Prints code testing coverage as percentage for badge generation.
import xml.etree.ElementTree as et
from defusedxml.ElementTree import parse

tree = et.parse("cov.xml")
tree = parse("cov.xml")
root = tree.getroot()
coverage = float(root.attrib["line-rate"]) * 100
print(f"COVERAGE={coverage:3.4}%")
Expand Down
5 changes: 3 additions & 2 deletions {{ cookiecutter.package_name }}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ packages = [
]

[tool.poetry.dependencies]
python = "^3.8"
python = "^3.9"

[tool.poetry.dev-dependencies]
defusedxml = "^0.7"

[build-system]
requires = ["poetry-core>=1.0.0"]
requires = ["poetry-core>=1.8.1"]
build-backend = "poetry.core.masonry.api"
Loading