diff --git a/.github/dependabot.yml b/.github/dependabot.yml index bad6ba3..bd72c5b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,3 +5,7 @@ updates: schedule: # Check for updates once a week interval: 'weekly' + groups: + actions: + patterns: + - "*" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 65d6976..82c89ff 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,7 +33,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.9', '3.10', '3.11', '3.12'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v5 - uses: conda-incubator/setup-miniconda@v3 diff --git a/pyproject.toml b/pyproject.toml index 3d0427a..029d703 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.black] line-length = 100 -target-version = ['py38'] +target-version = ['py39'] skip-string-normalization = true [tool.check-manifest] diff --git a/pythia_datasets/__init__.py b/pythia_datasets/__init__.py index 2332e4a..0e02a2f 100644 --- a/pythia_datasets/__init__.py +++ b/pythia_datasets/__init__.py @@ -1,12 +1,12 @@ #!/usr/bin/env python3 # flake8: noqa """Top-level module for pythia-datasets .""" -from pkg_resources import DistributionNotFound, get_distribution +from importlib.metadata import version as _version from .datasets import DATASETS, locate try: - __version__ = get_distribution(__name__).version -except DistributionNotFound: # pragma: no cover + __version__ = _version(__name__) +except Exception: # pragma: no cover # package is not installed __version__ = 'unknown' # pragma: no cover diff --git a/pythia_datasets/datasets.py b/pythia_datasets/datasets.py index fa41fe3..7615483 100644 --- a/pythia_datasets/datasets.py +++ b/pythia_datasets/datasets.py @@ -1,4 +1,5 @@ -import pkg_resources +from importlib.resources import files + import pooch DATASETS = pooch.create( @@ -7,7 +8,8 @@ env='PYTHIA_DATASETS_DIR', ) -with pkg_resources.resource_stream('pythia_datasets', 'registry.txt') as registry_file: +ref = files('pythia_datasets').joinpath('registry.txt') +with ref.open('rb') as registry_file: DATASETS.load_registry(registry_file) diff --git a/setup.cfg b/setup.cfg index 5a4785b..95de00d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -8,7 +8,7 @@ extend-ignore = E203,E501,E402,W605 [isort] known_first_party=pythia_datasets -known_third_party=pkg_resources,pooch,setuptools +known_third_party=pooch,setuptools multi_line_output=3 include_trailing_comma=True force_grid_wrap=0 diff --git a/setup.py b/setup.py index 0e6c048..55199e0 100644 --- a/setup.py +++ b/setup.py @@ -12,15 +12,17 @@ setup( maintainer='Project Pythia Team', maintainer_email='', - python_requires='>=3.7', + python_requires='>=3.9', classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'License :: OSI Approved :: Apache Software License', 'Natural Language :: English', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - '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', 'Topic :: Scientific/Engineering', 'Operating System :: OS Independent', 'Intended Audience :: Science/Research',