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

Fix devdeps, other updates #128

Merged
merged 19 commits into from
Nov 29, 2023
Merged
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
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
- cp3*-macosx_x86_64
# Until we have arm64 runners, we can't automatically test arm64 wheels
- cp3*-macosx_arm64
# Windows wheels
- cp3*-win32
- cp3*-win_amd64
sdist: true
secrets:
pypi_token: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER }}
Expand Down
39 changes: 30 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,45 @@ concurrency:
cancel-in-progress: true

jobs:
check:
test:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
envs: |
- linux: check-style
- linux: check-security
test:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
envs: |
- linux: py38-xdist

- linux: py39-xdist
- linux: py310-xdist
- linux: py311-xdist
- macos: py311-xdist
- linux: py312-xdist
- macos: py312-xdist
- windows: py312-xdist
- linux: py312-devdeps-xdist
- linux: py312-xdist-cov
coverage: codecov

#- linux: py312-xdist-devdeps

# When py312-xdist-devdeps works again, we can remove this.
# When, you ask? Well, maybe after numpy 2.0 is released, maybe.
dev_deps_tests:
name: py312-devdeps
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install and build
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy>=0.0.dev0 --pre --upgrade
python -m pip install --extra-index-url https://pypi.anaconda.org/liberfa/simple pyerfa>=0.0.dev0 --pre --upgrade
python -m pip install --extra-index-url https://pypi.anaconda.org/astropy/simple astropy>=0.0.dev0 --pre --upgrade
python -m pip install --no-build-isolation -v -e .[test]
- name: Test with dev deps
run: |
pip freeze
pytest -v
11 changes: 9 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@
Release Notes
=============

.. 1.14.4 (unreleased)
===================
1.15.0 (unreleased)
===================

- Dropped Python 3.8. [#128]

1.14.4 (2023-11-15)
===================

- N/A


1.14.3 (2023-10-02)
Expand Down
File renamed without changes.
10 changes: 3 additions & 7 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
include README.rst
include CODE_OF_CONDUCT.md
include setup.cfg
include pyproject.toml
include LICENSE.rst

recursive-include *.c *
recursive-include *.pxd *
recursive-include *.pyx *
recursive-include src *.c *.h
recursive-include docs *
recursive-include licenses *
recursive-include cextern *
recursive-include scripts *

prune build
prune docs/_build
Expand Down
14 changes: 11 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ drizzle Documentation
:target: https://github.com/spacetelescope/drizzle/actions
:alt: CI Status

.. image:: https://readthedocs.org/projects/spacetelescope-drizzle/badge/?version=latest
:target: https://spacetelescope-drizzle.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. image:: https://img.shields.io/pypi/v/drizzle.svg
:target: https://pypi.org/project/drizzle
:alt: PyPI Status

The ``drizzle`` library is a Python package for combining dithered images into a
single image. This library is derived from code used in DrizzlePac. Like
DrizzlePac, most of the code is implemented in the C language. The biggest
Expand All @@ -28,11 +36,11 @@ the new GWCS code.
Requirements
------------

- Python 3.6 or later
- Python 3.9 or later

- Numpy 1.13 or later
- Numpy

- Astropy 3.0 or later
- Astropy

The Drizzle Algorithm
---------------------
Expand Down
3 changes: 0 additions & 3 deletions drizzle/tests/test_drizzle.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@

from drizzle import drizzle, cdrizzle


TEST_DIR = os.path.abspath(os.path.dirname(__file__))
DATA_DIR = os.path.join(TEST_DIR, 'data')


ok = False


Expand Down
1 change: 0 additions & 1 deletion drizzle/tests/test_file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from drizzle import drizzle
from drizzle import util


TEST_DIR = os.path.abspath(os.path.dirname(__file__))
DATA_DIR = os.path.join(TEST_DIR, 'data')

Expand Down
4 changes: 0 additions & 4 deletions drizzle/tests/test_overlap_calc.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import os
import pytest
from math import sqrt

import numpy as np

from drizzle.cdrizzle import clip_polygon, invert_pixmap


TEST_DIR = os.path.abspath(os.path.dirname(__file__))
DATA_DIR = os.path.join(TEST_DIR, 'data')
SQ2 = 1.0 / sqrt(2.0)


Expand Down
3 changes: 1 addition & 2 deletions drizzle/tests/test_pixmap.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os.path
import os

import numpy as np
from numpy.testing import assert_equal, assert_almost_equal
Expand All @@ -7,7 +7,6 @@

from drizzle import calc_pixmap


TEST_DIR = os.path.abspath(os.path.dirname(__file__))
DATA_DIR = os.path.join(TEST_DIR, 'data')

Expand Down
5 changes: 0 additions & 5 deletions licenses/README.rst

This file was deleted.

11 changes: 4 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "drizzle"
description = "A package for combining dithered images into a single image"
requires-python = ">=3.8"
requires-python = ">=3.9"
authors = [
{ name = "STScI", email = "[email protected]" },
]
Expand All @@ -18,7 +18,7 @@ file = "README.rst"
content-type = "text/x-rst"

[project.license]
file = "licenses"
file = "LICENSE.rst"
content-type = "text/plain"

[project.urls]
Expand All @@ -30,8 +30,6 @@ Documentation = "http://spacetelescope.github.io/drizzle/"
[project.optional-dependencies]
test = [
"pytest",
"pytest-cov",
"coverage",
]
docs = [
"tomli; python_version<'3.11'",
Expand All @@ -45,8 +43,7 @@ docs = [
requires = [
"setuptools>=61.2",
"setuptools_scm[toml]>=3.4",
"wheel",
"numpy",
"numpy>=1.25",
]
build-backend = "setuptools.build_meta"

Expand All @@ -58,7 +55,7 @@ include-package-data = false
namespaces = false

[tool.pytest.ini_options]
minversion = "4.6"
minversion = "6"
norecursedirs = [
"build",
"docs/_build",
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ def get_extensions():

setup(
ext_modules=get_extensions(),
python_requires='>=3.7',
)
46 changes: 18 additions & 28 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[tox]
env_list =
check-{style,security,build}
test{,-warnings,-regtests}{,-cov}{,-xdist}
build-{docs,dist}
check-{style,security}
py{39,310,311,312}{,-xdist}{,-devdeps,-cov}

# tox environments are constructed with so-called 'factors' (or terms)
# separated by hyphens, e.g. test-devdeps-cov. Lines below starting with factor:
Expand All @@ -14,8 +13,9 @@ env_list =
#

[testenv:check-style]
description = check code style, e.g. with flake8
description = check code style
skip_install = true
changedir = {toxinidir}
deps =
ruff
commands =
Expand All @@ -24,6 +24,7 @@ commands =
[testenv:check-security]
description = run bandit to check security compliance
skip_install = true
changedir = {toxinidir}
deps =
bandit>=1.7
commands =
Expand All @@ -32,39 +33,28 @@ commands =
[testenv]
description =
run tests
warnings: treating warnings as errors
regtests: with --bigdata and --slow flags
cov: with coverage
xdist: using parallel processing
devdeps: with development versions of dependencies
cov: with coverage

# Cannot do isolated build because of the test data.
package = editable
set_env =
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple

passenv = HOME,WINDIR,LC_ALL,LC_CTYPE,CC,CI

setenv =
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/liberfa/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple

deps =
pytest
ci_watson
xdist: pytest-xdist
cov: pytest-cov
devdeps: numpy>=0.0.dev0
devdeps: pyerfa>=0.0.dev0
devdeps: astropy>=0.0.dev0

commands =
pip freeze
pytest \
cov: --cov . --cov-report term-missing --cov-report xml \
warnings: -W error \
regtests: --bigdata --slow \
cov: --cov . --cov-config=.coveragerc --cov-report xml \
xdist: -n auto \
{posargs}

[testenv:build-docs]
description = invoke sphinx-build to build the HTML docs
extras = docs
commands =
sphinx-build docs/ docs/_build

[testenv:build-dist]
description = build wheel and sdist
skip_install = true
deps =
build
commands =
python -m build .