From 0caf9196b32e55066f1375f01e54b3d035c43e44 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 09:58:49 -0500 Subject: [PATCH 1/2] build(deps): bump codecov/codecov-action in the actions group (#165) Bumps the actions group with 1 update: [codecov/codecov-action](https://github.com/codecov/codecov-action). Updates `codecov/codecov-action` from 4 to 5 - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v4...v5) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e35099..1cb29fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: run: python -m pytest ./tests --cov=src/skhep_testdata --cov-report=xml - name: Test coverage with Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 dist: runs-on: ubuntu-latest From 3da59d04eb03c207c50bdc78a5e0f33c0e85b1a1 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Mon, 18 Nov 2024 11:57:34 -0500 Subject: [PATCH 2/2] chore: drop python 3.8 and test 3.13 (#163) * Drop Python 3.8 and test 3.13 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Pre-commit fixes * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fixed mypy * Added pass job * added codecov token to action --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 17 +++++++++++++++-- .pre-commit-config.yaml | 6 ++---- pyproject.toml | 2 +- setup.cfg | 10 +++++----- src/skhep_testdata/local_files.py | 7 +------ src/skhep_testdata/remote_files.py | 7 +------ 6 files changed, 25 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1cb29fa..e8a25e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,8 @@ jobs: fail-fast: false matrix: python-version: - - '3.8' - - '3.12' + - '3.9' + - '3.13' name: Check Python ${{ matrix.python-version }} steps: - uses: actions/checkout@v4 @@ -45,6 +45,8 @@ jobs: - name: Test coverage with Codecov uses: codecov/codecov-action@v5 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} dist: runs-on: ubuntu-latest @@ -72,3 +74,14 @@ jobs: user: __token__ password: ${{ secrets.pypi_password }} if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') + + pass: + if: always() + needs: [checks, dist] + runs-on: ubuntu-latest + timeout-minutes: 2 + steps: + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@release/v1 + with: + jobs: ${{ toJSON(needs) }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3803960..30d294d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,16 +26,14 @@ repos: rev: v2.5.0 hooks: - id: setup-cfg-fmt - args: [--include-version-classifiers, --max-py-version=3.11] + args: [--include-version-classifiers, --max-py-version=3.13] - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.11.2 hooks: - # 3.9 is broken due to https://github.com/python/typeshed/pull/5216 and https://github.com/python/typeshed/pull/5214 - id: mypy - name: mypy 3.8 files: src - args: [--python-version=3.8, --show-error-codes] + args: [--show-error-codes] additional_dependencies: - types-PyYAML - types-requests diff --git a/pyproject.toml b/pyproject.toml index 6c85fa3..4e63be8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ lint.extend-ignore = [ "E501", # Line too long "PT011", # Too broad of a match ] -target-version = "py37" +target-version = "py39" lint.typing-modules = ["mypackage._compat.typing"] src = ["src"] lint.unfixable = [ diff --git a/setup.cfg b/setup.cfg index c5f2699..1670268 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,10 +17,11 @@ classifiers = Natural Language :: English Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 + Programming Language :: Python :: 3.13 Programming Language :: Python :: Implementation :: CPython Typing :: Typed keywords = @@ -33,8 +34,7 @@ packages = find: install_requires = pyyaml requests - importlib-resources>=1.3;python_version<"3.9" -python_requires = >=3.8 +python_requires = >=3.9 package_dir = =src zip_safe = True @@ -49,7 +49,7 @@ console_scripts = [options.extras_require] test = - pytest>=4.0.0 + pytest>=6.0.0 pytest-cov [tool:pytest] @@ -58,7 +58,7 @@ norecursedirs = src [mypy] files = src -python_version = 3.7 +python_version = 3.9 warn_unused_configs = True disallow_any_generics = True disallow_subclassing_any = True diff --git a/src/skhep_testdata/local_files.py b/src/skhep_testdata/local_files.py index 1d50af5..58fb414 100644 --- a/src/skhep_testdata/local_files.py +++ b/src/skhep_testdata/local_files.py @@ -1,19 +1,14 @@ from __future__ import annotations -import sys import tempfile import zipfile +from importlib import resources from pathlib import Path import requests from . import data, remote_files -if sys.version_info < (3, 9): - import importlib_resources as resources # pragma: no cover -else: - from importlib import resources - __all__ = ("data_path", "download_all", "known_files") diff --git a/src/skhep_testdata/remote_files.py b/src/skhep_testdata/remote_files.py index d31ce83..7286de4 100644 --- a/src/skhep_testdata/remote_files.py +++ b/src/skhep_testdata/remote_files.py @@ -3,18 +3,13 @@ import errno import logging import os -import sys import tarfile +from importlib import resources from typing import ClassVar from urllib.request import urlretrieve import yaml -if sys.version_info < (3, 9): - import importlib_resources as resources # pragma: no cover -else: - from importlib import resources - _default_data_dir = os.path.realpath(os.path.dirname(__file__))