Skip to content

Commit

Permalink
Drop support for python 3.8, update env file
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnoe committed Jun 2, 2023
1 parent bb887b5 commit cd8fc7d
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 31 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.9"
- uses: pre-commit/action@v3.0.0
with:
extra_args: --files $(git diff origin/main --name-only)
Expand All @@ -33,10 +33,6 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-latest
python-version: "3.8"
install-method: mamba

- os: ubuntu-latest
python-version: "3.9"
install-method: mamba
Expand All @@ -48,18 +44,18 @@ jobs:

- os: ubuntu-latest
python-version: "3.11"
install-method: pip
install-method: mamba

- os: ubuntu-latest
python-version: "3.10"
python-version: "3.11"
install-method: pip

- os: macos-latest
python-version: "3.10"
python-version: "3.11"
install-method: mamba

- os: macos-latest
python-version: "3.8"
python-version: "3.9"
install-method: pip

defaults:
Expand Down Expand Up @@ -147,7 +143,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.9"

- name: Install doc dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build:
apt_packages:
- ffmpeg
tools:
python: "3.8"
python: "3.9"

python:
install:
Expand Down
12 changes: 3 additions & 9 deletions ctapipe/core/provenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
TODO: have this register whenever ctapipe is loaded
"""

import json
import logging
import os
Expand All @@ -14,21 +13,16 @@
from collections import UserList
from contextlib import contextmanager
from importlib import import_module
from importlib.metadata import distributions, version
from os.path import abspath
from pathlib import Path

import psutil
from astropy.time import Time

import ctapipe

from ..version import __version__
from .support import Singleton

if sys.version_info < (3, 9):
from importlib_metadata import distributions, version
else:
from importlib.metadata import distributions, version

log = logging.getLogger(__name__)

__all__ = ["Provenance"]
Expand Down Expand Up @@ -318,7 +312,7 @@ def _get_system_provenance():
bits, linkage = platform.architecture()

return dict(
ctapipe_version=ctapipe.__version__,
ctapipe_version=__version__,
ctapipe_resources_version=get_module_version("ctapipe_resources"),
eventio_version=get_module_version("eventio"),
ctapipe_svc_path=os.getenv("CTAPIPE_SVC_PATH"),
Expand Down
6 changes: 1 addition & 5 deletions ctapipe/tools/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@
import logging
import os
import sys
from importlib.resources import files

from ..core import Provenance, get_module_version
from ..core.plugins import detect_and_import_plugins
from ..utils import datasets
from .utils import get_parser

if sys.version_info < (3, 9):
from importlib_resources import files
else:
from importlib.resources import files

__all__ = ["info"]

# TODO: this list should be global (or generated at install time)
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def setup(app):

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"python": ("https://docs.python.org/3.8", None),
"python": ("https://docs.python.org/3.9", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"scipy": ("https://docs.scipy.org/doc/scipy/", None),
"astropy": ("https://docs.astropy.org/en/latest/", None),
Expand Down
6 changes: 3 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- conda-forge
- default
dependencies:
- python=3.9
- python=3.11
- pip
- astropy=5
- black
Expand All @@ -19,8 +19,8 @@ dependencies:
- joblib
- jupyter
- matplotlib
- numba=0.56
- numpy>=1.17
- numba>=0.56
- numpy>=1.22
- numpydoc
- pandas
- pre-commit
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ classifiers =
Intended Audience :: Science/Research
License :: OSI Approved :: BSD License
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: Implementation :: CPython
Topic :: Scientific/Engineering :: Astronomy
Development Status :: 3 - Alpha


[options]
packages = find:
python_requires = >=3.8
python_requires = >=3.9
zip_safe = False
install_requires=
astropy ~=5.0
Expand Down

0 comments on commit cd8fc7d

Please sign in to comment.