Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for Python 3.9 #406

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.10"
cache: pip
- run: pip install --upgrade coverage[toml]
- uses: actions/download-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Python ubuntu-latest
uses: actions/setup-python@v4
with:
python-version: '3.9' # Should always be the minimum supported Python version
python-version: '3.10' # Should always be the minimum supported Python version
cache: 'pip'
cache-dependency-path': 'requirements.txt'
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# See https://pre-commit.com for more information
default_language_version:
python: python3.9
python: python3.10

# See https://pre-commit.com/hooks.html for more hooks
repos:
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.9"
python: "3.10"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
Expand Down
2 changes: 1 addition & 1 deletion docs/source/for_beta_testers/beta_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ We provide steps for working in one of `GBO data reduction hosts <https://greenb

.. tab:: Outside of GBO

Create a `Python3.9+` virtual environment
Create a `Python3.10+` virtual environment

.. code:: bash

Expand Down
10 changes: 5 additions & 5 deletions docs/source/for_developers/manage_requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ You first need to add the package to `pyproject.toml`. Locate the section of the
Step 2: Compile `requirements.txt`
==================================

Using the lowest supported version of Python (currently 3.9), do the following:
Using the lowest supported version of Python (currently 3.10), do the following:

.. code-block:: bash

$ cd /path/to/dysh
$ source /path/to/dysh-venv-py3.9/bin/activate
(dysh-venv-py3.9) $ pip install pip-tools
(dysh-venv-py3.9) $ pip-compile -o requirements.txt pyproject.toml
$ source /path/to/dysh-venv-py3.10/bin/activate
(dysh-venv-py3.10) $ pip install pip-tools
(dysh-venv-py3.10) $ pip-compile -o requirements.txt pyproject.toml

Step 3: Validate new requirements
=================================
Expand All @@ -86,7 +86,7 @@ Compiling requirements on Windows
Sometimes, compiling `requirements.txt` on a Windows machine can result in requirements which fail on the other operating systems. This will result in your GitHub Actions only succeeding on Windows machines, like so:

.. figure:: img/requirements_fail_windows.png
:alt: A screenshot of a GitHub Actions summary of 12 tests. The "windows-latest" tests have green check marks, indicating success, for all 4 versions of Python (3.9 to 3.12). The "ubuntu-latest" and "macos-latest" ones all have red x's, indicating failure.
:alt: A screenshot of a GitHub Actions summary of 9 tests. The "windows-latest" tests have green check marks, indicating success, for all 3 versions of Python (3.10 to 3.12). The "ubuntu-latest" and "macos-latest" ones all have red x's, indicating failure.

**Solution:** Compile `requirements.txt` on a non-Windows machine, like the Linux ones at GBO.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/getting_started/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Installing ``dysh``
*******************

``dysh`` requires Python 3.9+ and recent versions of
``dysh`` a modern version of Python 3 and recent versions of
`astropy <https://astropy.org>`_,
`numpy <https://numpy.org>`_,
`scipy <https://scipy.org>`_,
Expand Down
8 changes: 2 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "dysh"
description = ''
readme = "README.md"
requires-python = ">=3.9"
requires-python = ">=3.10,<3.13"
license = {file = "LICENSE"}
keywords = []
dynamic = ["version"]
Expand All @@ -16,10 +16,6 @@ authors = [
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
]
dependencies = [
Expand Down Expand Up @@ -95,7 +91,7 @@ cov = "pytest --cov-report=xml --cov-config=pyproject.toml --cov=src/dysh --cov=

# Run tests across all supported version of Python
[[tool.hatch.envs.test.matrix]]
python = ["39", "310", "311", "312"]
python = ["310", "311", "312", "313"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should 313 be removed here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think something got reverted during the rebase onto main. Will look tomorrow


[tool.hatch.build.targets.sdist]
include = ["/src", "/tests", "/bin"]
Expand Down
31 changes: 2 additions & 29 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.9
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --extra=dev --extra=nb --no-emit-trusted-host --output-file=requirements.txt pyproject.toml
Expand Down Expand Up @@ -121,11 +121,6 @@ docutils==0.18.1
# myst-parser
# pydata-sphinx-theme
# sphinx
exceptiongroup==1.2.0
# via
# anyio
# ipython
# pytest
executing==2.0.1
# via stack-data
fastjsonschema==2.19.0
Expand Down Expand Up @@ -161,17 +156,8 @@ imagesize==1.4.1
importlib-metadata==6.8.0
# via
# asdf
# build
# jupyter-cache
# jupyter-client
# jupyter-lsp
# jupyterlab
# jupyterlab-server
# myst-nb
# nbconvert
# sphinx
importlib-resources==6.1.1
# via matplotlib
iniconfig==2.0.0
# via pytest
ipdb==0.13.13
Expand Down Expand Up @@ -557,15 +543,6 @@ terminado==0.18.0
# jupyter-server-terminals
tinycss2==1.2.1
# via nbconvert
tomli==2.0.1
# via
# build
# coverage
# ipdb
# jupyterlab
# numpydoc
# pip-tools
# pytest
tornado==6.3.3
# via
# ipykernel
Expand Down Expand Up @@ -596,8 +573,6 @@ types-python-dateutil==2.8.19.14
# via arrow
typing-extensions==4.8.0
# via
# async-lru
# ipython
# myst-nb
# pydata-sphinx-theme
# sqlalchemy
Expand All @@ -624,9 +599,7 @@ wheel==0.43.0
widgetsnbextension==4.0.9
# via ipywidgets
zipp==3.17.0
# via
# importlib-metadata
# importlib-resources
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# pip
Expand Down
8 changes: 4 additions & 4 deletions src/dysh/fits/gbtfitsload.py
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ def gettp(
# now downselect with any additional kwargs
ps_selection._select_from_mixed_kwargs(**kwargs)
_sf = ps_selection.final
logger.debug("SF=", _sf)
logger.debug(f"SF={_sf}")
ifnum = uniq(_sf["IFNUM"])
plnum = uniq(_sf["PLNUM"])
scans = uniq(_sf["SCAN"])
Expand Down Expand Up @@ -938,9 +938,9 @@ def gettp(
# df = select_from("CAL", TF[cal], df)
# the rows with the selected sig state and all cal states
tprows = list(_sifdf["ROW"])
logger.debug("TPROWS len=", len(tprows))
logger.debug("CALROWS on len=", len(calrows["ON"]))
logger.debug("fitsindex=", i)
logger.debug(f"TPROWS len={len(tprows)}")
logger.debug(f"CALROWS on len={len(calrows['ON'])}")
logger.debug(f"fitsindex={i}")
if len(tprows) == 0:
continue
g = TPScan(
Expand Down
Loading