Skip to content

Commit

Permalink
Restore coverage tests
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverba137 committed Sep 14, 2023
1 parent 9060269 commit cdb577e
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 26 deletions.
57 changes: 45 additions & 12 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,60 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@vv32
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install --upgrade pip wheel setuptools
python -m pip install pytest pytest-astropy pyyaml matplotlib\<3.3
# python -m pip install -r requirements.txt
python -m pip install 'numpy${{ matrix.numpy-version }}'
python -m pip install 'astropy${{ matrix.astropy-version }}'
python -m pip install 'scipy${{ matrix.scipy-version }}'
- name: Run the test
run: pytest



coverage:
name: Test coverage
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.8]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Python dependencies
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
- name: Run the test with coverage
run: pytest --cov

- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: coveralls

docs:
name: Doc test
runs-on: ${{ matrix.os }}
Expand All @@ -57,21 +90,21 @@ jobs:
python-version: [3.8]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip wheel docutils\<0.18 Sphinx
python -m pip install --upgrade pip wheel setuptools docutils\<0.18 Sphinx
python -m pip install sphinx-astropy
python -m pip install speclite
- name: Test the documentation
run: sphinx-build -W --keep-going -b html docs docs/_build/html

46 changes: 32 additions & 14 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,39 +1,57 @@
================
speclite package
================

.. image:: http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat
|Astropy| |PyPI| |Actions Status| |Coveralls Status| |Documentation Status|

.. |Astropy| image:: http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat
:target: http://www.astropy.org
:alt: Powered by Astropy Badge

Introduction
------------

This package provides a set of lightweight utilities for working with spectroscopic data in astronomy.

* Free software: 3-clause BSD style license.
* Documentation: `latest <http://speclite.readthedocs.io/en/latest/>`_ | `stable <http://speclite.readthedocs.io/en/stable/>`_
* Based on the Astropy affiliated package template.

Citation
--------

|DOI|

Please cite as:

David Kirkby, Andy Park, John Moustakas, Stephen Bailey, Benjamin Alan Weaver, Sergey Koposov, Marcelo Alvarez, Hélion du Mas des Bourboux, & Javier Sanchez. (2023). desihub/speclite: Initial DOI (v0.16). Zenodo. https://doi.org/10.5281/zenodo.7734526

Requirements
------------

Speclite has the following package requirements:

* `numpy <http://www.numpy.org/>`__
* `scipy <http://www.scipy.org/>`__
* `astropy <http://www.astropy.org/>`__
* `pyyaml <http://pyyaml.org>`__
* `NumPy <https://numpy.org/>`__
* `SciPy <https://scipy.org/>`__
* `Astropy <https://www.astropy.org/>`__
* `PyYAML <https://pyyaml.org>`__

.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.7734526.svg
:target: https://doi.org/10.5281/zenodo.7734526
.. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.7734526.svg
:target: https://doi.org/10.5281/zenodo.7734526
:alt: Zenodo Link

.. image:: https://readthedocs.org/projects/speclite/badge/?version=latest
:target: https://readthedocs.org/projects/speclite/?badge=latest
:alt: Documentation Status
.. |Actions Status| image:: https://github.com/desihub/speclite/workflows/CI/badge.svg
:target: https://github.com/desihub/speclite/actions
:alt: GitHub Actions CI Status

.. image:: https://coveralls.io/repos/dkirkby/speclite/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/dkirkby/speclite?branch=master
:alt: Coverage Status
.. |Coveralls Status| image:: https://coveralls.io/repos/desihub/desiutil/badge.svg
:target: https://coveralls.io/github/desihub/desiutil
:alt: Test Coverage Status

.. |Documentation Status| image:: https://readthedocs.org/projects/speclite/badge/?version=latest
:target: https://speclite.readthedocs.org/en/latest/
:alt: Documentation Status

.. image:: https://img.shields.io/pypi/v/speclite.svg
.. |PyPI| image:: https://img.shields.io/pypi/v/speclite.svg
:target: https://pypi.python.org/pypi/speclite
:alt: Distribution Status
File renamed without changes.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ This package provides a set of lightweight utilities for working with spectrosco
install.rst
filters.rst
api.rst
changes.rst

0 comments on commit cdb577e

Please sign in to comment.