[go: nahoru, domu]

Skip to content

Commit

Permalink
package updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kbwestfall committed Apr 15, 2024
1 parent c492d17 commit ce7e819
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 18 deletions.
30 changes: 22 additions & 8 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python: ['3.9', '3.10', '3.11']
python: ['3.10', '3.11', '3.12']
toxenv: [test-cov, test-astropydev]
steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install base dependencies
run: |
python -m pip install --upgrade pip tox
- name: Test with tox
run: |
tox -e ${{ matrix.toxenv }}
tox -e ${{ matrix.python }}-${{ matrix.toxenv }}
- name: Upload coverage to codecov
if: "contains(matrix.toxenv, '-cov')"
uses: codecov/codecov-action@v3
Expand All @@ -49,9 +49,8 @@ jobs:
# set this to false for now so windows failures don't prevent macos test from finishing
fail-fast: false
matrix:
# os: [windows-latest, macos-latest]
os: [macos-latest]
python: ['3.9', '3.10', '3.11']
python: ['3.10', '3.11', '3.12']
toxenv: [test]
steps:
- name: Check out repository
Expand All @@ -65,7 +64,22 @@ jobs:
python -m pip install --upgrade pip tox
- name: Test with tox
run: |
tox -e ${{ matrix.toxenv }}
tox -e ${{ matrix.python }}-${{ matrix.toxenv }}
conda:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Conda environment check
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install base dependencies
run: |
python -m pip install --upgrade pip tox
- name: Run pypeit tests from environment built with conda
run: |
tox -e conda
codestyle:
runs-on: ubuntu-latest
Expand All @@ -74,7 +88,7 @@ jobs:
- name: Python codestyle check
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
Expand Down
8 changes: 8 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: sdss-mangadap
channels:
- defaults
dependencies:
- python>=3.10,<3.13
- pip
- pip:
- sdss-mangadap
24 changes: 14 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
[tox]
envlist =
py{39,310,311}-test{,-cov}
py{39,310,311}-test-numpy{122,123}
py{39,310,311}-test-{numpy,astropy}dev
py{3.10,3.11,3.12}-test{,-cov}
py{3.10,3.11,3.12}-test-numpy{125,126}
py{3.10,3.11,3.12}-test-{numpy,astropy}dev
codestyle
requires =
setuptools >= 30.3.0
pip >= 19.3.1
isolated_build = true
#indexserver =
# NIGHTLY = https://pypi.anaconda.org/scipy-wheels-nightly/simple

[testenv]
# Suppress display of matplotlib plots generated during docs build
Expand All @@ -18,7 +16,7 @@ setenv =
numpydev: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/scipy-wheels-nightly/simple

# Pass through the following environment variables which may be needed for the CI
passenv = HOME,WINDIR,LC_ALL,LC_CTYPE,CC,CI #PYPEIT_DEV
passenv = HOME,WINDIR,LC_ALL,LC_CTYPE,CC,CI

# Run the tests in a temporary directory to make sure that we don't import
# this package from the source tree
Expand All @@ -35,15 +33,15 @@ changedir = .tmp/{envname}
description =
run tests
cov: and test coverage
numpy122: with numpy 1.22.*
numpy123: with numpy 1.23.*
numpy125: with numpy 1.25.*
numpy126: with numpy 1.26.*

# The following provides some specific pinnings for key packages
deps =

cov: coverage
numpy122: numpy==1.22.*
numpy123: numpy==1.23.*
numpy125: numpy==1.25.*
numpy126: numpy==1.26.*

numpydev: numpy>=0.0.dev0
astropydev: git+https://github.com/astropy/astropy.git#egg=astropy
Expand All @@ -58,6 +56,12 @@ commands =
cov: pytest --pyargs mangadap --cov mangadap --cov-config={toxinidir}/setup.cfg {posargs}
cov: coverage xml -o {toxinidir}/coverage.xml

[testenv:conda]
description = run tests in environment created via conda
requires = tox-conda
conda_env = {toxinidir}/environment.yml
commands = pytest --pyargs pypeit {posargs}

[testenv:codestyle]
skip_install = true
changedir = .
Expand Down

0 comments on commit ce7e819

Please sign in to comment.