Skip to content

Commit

Permalink
Merge pull request #136 from desihub/update-test-infrastructure
Browse files Browse the repository at this point in the history
Update test infrastructure
  • Loading branch information
weaverba137 authored May 15, 2024
2 parents bb81115 + 8e657fa commit 51f64f2
Show file tree
Hide file tree
Showing 13 changed files with 69 additions and 250 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ jobs:
astropy-version: ['<5.0', '<5.1']
numpy-version: ['<1.20', '<1.21', '<1.22']
scipy-version: ['<1.6', '<1.7']
matplotlib-version: ['<3.4', '<3.5']
speclite-version: ['==0.19']
desiutil-version: ['3.4.2']
desimodel-version: ['0.19.1']

steps:
- name: Checkout code
Expand All @@ -40,11 +42,13 @@ jobs:
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install pytest pytest-astropy pyyaml
# python -m pip install -r requirements.txt
python -m pip install 'scipy${{ matrix.scipy-version }}'
python -m pip install 'matplotlib${{ matrix.matplotlib-version }}'
python -m pip install 'astropy${{ matrix.astropy-version }}'
python -m pip install 'numpy${{ matrix.numpy-version }}'
python -m pip install 'speclite${{ matrix.speclite-version }}'
python -m pip install git+https://github.com/desihub/desiutil.git@${{ matrix.desiutil-version }}
python -m pip install git+https://github.com/desihub/desimodel.git@${{ matrix.desimodel-version }}
- name: Run the test
run: pytest

Expand All @@ -55,7 +59,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.8]
python-version: [3.9]

steps:
- name: Checkout code
Expand All @@ -72,7 +76,9 @@ jobs:
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install pytest pytest-astropy coveralls
python -m pip install pyyaml numpy\<1.21 scipy\<1.6 matplotlib\<3.3 astropy\<5.0
python -m pip install pyyaml numpy\<1.21 scipy\<1.6 astropy\<5.0 speclite==0.19
python -m pip install git+https://github.com/desihub/desiutil.git@3.4.2
python -m pip install git+https://github.com/desihub/desimodel.git@0.19.1
- name: Run the test with coverage
run: pytest --cov
Expand Down Expand Up @@ -136,7 +142,7 @@ jobs:
run: |
python -m pip install --upgrade pip wheel setuptools flake8
- name: Test the style; failures are allowed
- name: Test the style; failures are not allowed
# This is equivalent to an allowed falure.
continue-on-error: true
# continue-on-error: true
run: flake8 specsim --count --max-line-length=100
1 change: 1 addition & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ build:
jobs:
pre_install:
- git update-index --assume-unchanged docs/conf.py docs/rtd_environment.yaml
- python -m pip install git+https://github.com/desihub/desiutil.git@3.4.2

conda:
environment: docs/rtd_environment.yaml
Expand Down
145 changes: 0 additions & 145 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ Status reports for developers
:target: https://pypi.org/project/specsim/
:alt: BSD License

.. .. |Actions Status| image:: https://github.com/desihub/specsim/workflows/CI/badge.svg
.. :target: https://github.com/desihub/specsim/actions
.. :alt: GitHub Actions CI Status
.. |Actions Status| image:: https://github.com/desihub/specsim/workflows/CI/badge.svg
:target: https://github.com/desihub/specsim/actions
:alt: GitHub Actions CI Status

.. |Coveralls Status| image:: https://coveralls.io/repos/desihub/specsim/badge.svg?branch=main
:target: https://coveralls.io/github/desihub/specsim?branch=main
Expand Down
52 changes: 0 additions & 52 deletions appveyor.yml

This file was deleted.

3 changes: 2 additions & 1 deletion docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ specsim Change Log
-----------------

- Update the Read The Docs configuration (PR `#135`_).
- Update the test infrastructure (PR `#136`_).

.. _`#135`: https://github.com/desihub/specsim/pull/135

.. _`#136`: https://github.com/desihub/specsim/pull/136

0.17 (2024-04-30)
-----------------
Expand Down
9 changes: 7 additions & 2 deletions docs/history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,18 @@ Backwards Compatibility
The following recipes all give identical results in their output file ``ab22.dat``
and assume that the DESIMODEL environment variable has been set.

First, using the final SVN python version (revision 2134)::
First, using the final SVN python version (revision 2134):


.. code-block:: shell
cd $DESIMODEL
python bin/quicksim.py --infile data/spectra/spec-ABmag22.0.dat --model qso \
--verbose --show-plot --outfile ab22.dat
Next, using the first release (v0.1) after moving to a dedicated package on github::
Next, using the first release (v0.1) after moving to a dedicated package on github:

.. code-block:: shell
export SPECSIM_MODEL=$DESIMODEL
ln -s $SPECSIM_MODEL/data/throughput specsim/data/throughput
Expand Down
4 changes: 2 additions & 2 deletions specsim/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
# With older versions of Astropy, we actually need to import the pytest
# plugins themselves in order to make them discoverable by pytest.
from astropy.tests.pytest_plugins import *

# As of Astropy 5.1 astropy.tests.plugins.display (where PYTEST_HEADER_MODULES
# and TESTED_VERSIONS lived) as been deprecated and removed entirely.
# and TESTED_VERSIONS lived) as been deprecated and removed entirely.

## Uncomment the following lines to treat all DeprecationWarnings as
## exceptions
Expand Down
Loading

0 comments on commit 51f64f2

Please sign in to comment.