Skip to content

Commit

Permalink
DX: only support Python 3.12 (#90)
Browse files Browse the repository at this point in the history
* MAINT: remove GitPod configuration
  • Loading branch information
redeboer authored Oct 14, 2024
1 parent 2da3a3f commit b8c669c
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 51 deletions.
1 change: 0 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"**/.cspell.json",
".editorconfig",
".gitignore",
".gitpod.*",
".pre-commit-config.yaml",
".prettierignore",
".vscode/*",
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ jobs:
secrets:
token: ${{ secrets.PAT }}
uses: ComPWA/actions/.github/workflows/pre-commit.yml@v1
with:
python-version: "3.12"
32 changes: 0 additions & 32 deletions .gitpod.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ repos:
args:
- --allow-deprecated-workflows
- --dependabot=update
- --dev-python-version=3.12
- --keep-pr-linting
- --no-gitpod
- --no-notebooks
- --no-prettierrc
- --no-pypi
Expand Down
7 changes: 5 additions & 2 deletions create-pytest-matrix/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
import os
from argparse import ArgumentParser
from configparser import ConfigParser
from typing import Sequence
from typing import TYPE_CHECKING

import toml

if TYPE_CHECKING:
from collections.abc import Sequence


def main(argv: Sequence[str] | None = None) -> int:
parser = ArgumentParser(__doc__)
Expand Down Expand Up @@ -54,7 +57,7 @@ def create_job_matrix( # noqa: C901
msg = (
f"Selected Python {coverage_python_version} for the coverage job, but"
" the package only supports Python"
f" {', '.join(supported_python_versions)}"
f" {", ".join(supported_python_versions)}"
)
raise ValueError(msg)
if coverage_python_version in python_versions:
Expand Down
2 changes: 0 additions & 2 deletions create-python-version-matrix/main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""Print job matrix for a GitHub Actions workflow that runs `pytest`."""

from __future__ import annotations

import json
import os
from configparser import ConfigParser
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: compwa-actions
channels:
- defaults
dependencies:
- python==3.9.*
- python==3.12.*
- pip
- pip:
- -e .[dev]
Expand Down
2 changes: 0 additions & 2 deletions get-pre-commit-taplo-version/main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""Print job matrix for a GitHub Actions workflow that runs `pytest`."""

from __future__ import annotations

import os

import yaml
Expand Down
2 changes: 0 additions & 2 deletions get-pypi-name/main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""Print job matrix for a GitHub Actions workflow that runs `pytest`."""

from __future__ import annotations

import os
from configparser import ConfigParser

Expand Down
2 changes: 0 additions & 2 deletions get-skipped-pre-commit-hooks/main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""Print job matrix for a GitHub Actions workflow that runs `pytest`."""

from __future__ import annotations

import os

import yaml
Expand Down
10 changes: 3 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,15 @@ classifiers = [
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python",
]
dependencies = ["toml"]
description = "Python scripts used by the ComPWA/actions repository"
dynamic = ["version"]
license = {text = "License :: OSI Approved :: MIT License"}
name = "compwa-actions"
requires-python = ">=3.7"
requires-python = ">=3.12"

[project.optional-dependencies]
dev = [
Expand Down Expand Up @@ -55,7 +51,7 @@ typeCheckingMode = "strict"
[tool.ruff]
preview = true
show-fixes = true
target-version = "py37"
target-version = "py312"

[tool.ruff.format]
docstring-code-format = true
Expand Down

0 comments on commit b8c669c

Please sign in to comment.