Skip to content

Commit

Permalink
Merge branch 'main' into ariostas/rntuple_v1
Browse files Browse the repository at this point in the history
  • Loading branch information
ariostas authored Nov 18, 2024
2 parents 1cbfc13 + 3da59d0 commit 3b8973c
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 25 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -44,7 +44,9 @@ 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
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

dist:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -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) }}
6 changes: 2 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
10 changes: 5 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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
Expand All @@ -49,7 +49,7 @@ console_scripts =

[options.extras_require]
test =
pytest>=4.0.0
pytest>=6.0.0
pytest-cov

[tool:pytest]
Expand All @@ -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
Expand Down
7 changes: 1 addition & 6 deletions src/skhep_testdata/local_files.py
Original file line number Diff line number Diff line change
@@ -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")


Expand Down
7 changes: 1 addition & 6 deletions src/skhep_testdata/remote_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__))


Expand Down

0 comments on commit 3b8973c

Please sign in to comment.