Skip to content

Commit

Permalink
Merge pull request #81 from desihub/minor-infra-updates
Browse files Browse the repository at this point in the history
Infrastructure updates
  • Loading branch information
weaverba137 committed Sep 14, 2023
2 parents 5770544 + ab467a1 commit ba24736
Show file tree
Hide file tree
Showing 7 changed files with 325 additions and 208 deletions.
105 changes: 85 additions & 20 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,59 +19,124 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest] # Add more os?
python-version: [3.7, 3.8]
astropy-version: ['<4.1', '<5.0']
numpy-version: ['<1.20', '<1.21']
scipy-version: ['<1.5', '<1.6']
python-version: [3.8, 3.9]
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']

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
python -m pip install pytest pytest-astropy pyyaml matplotlib\<3.3
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 'numpy${{ matrix.numpy-version }}'
python -m pip install 'astropy${{ matrix.astropy-version }}'
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 }}'
- 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 }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.8]
python-version: [3.9]

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


style:
name: Style test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.9]

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 flake8
- name: Test the style; failures are allowed
# This is equivalent to an allowed falure.
continue-on-error: true
run: flake8 speclite --count --max-line-length=100
100 changes: 0 additions & 100 deletions CHANGES.rst

This file was deleted.

62 changes: 45 additions & 17 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,39 +1,67 @@
================
speclite package
================

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

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
License
-------

.. image:: https://readthedocs.org/projects/speclite/badge/?version=latest
:target: https://readthedocs.org/projects/speclite/?badge=latest
:alt: Documentation Status
speclite is free software licensed under a 3-clause BSD-style license. For details see
the ``licenses/LICENSE.rst`` file.

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

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

.. |License| image:: https://img.shields.io/pypi/l/speclite.svg
:target: https://pypi.org/project/speclite/
:alt: BSD License

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

.. |Coveralls Status| image:: https://coveralls.io/repos/desihub/desiutil/badge.svg?branch=main
:target: https://coveralls.io/github/desihub/desiutil?branch=main
: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
:target: https://pypi.python.org/pypi/speclite
.. |PyPI| image:: https://img.shields.io/pypi/v/speclite.svg
:target: https://pypi.org/project/speclite/
:alt: Distribution Status
52 changes: 0 additions & 52 deletions appveyor.yml

This file was deleted.

Loading

0 comments on commit ba24736

Please sign in to comment.