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

GitHub actions #156

Merged
merged 11 commits into from
Dec 11, 2020
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
118 changes: 118 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Workflow is based on the Astropy GitHub actions workflow, ci_workflows.yml
name: CI

on:
push:
branches:
- '*'
tags:
- '*'
pull_request:

jobs:
tests:
name: Unit tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
python-version: [3.6, 3.7, 3.8]
# astropy-version: ['<3.0', '<4.1'] #, '<5.0']

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; pip install .; fi
# pip install -U "astropy${{ matrix.astropy-version }}"
# if [ "${{ matrix.astropy-version }}" = "<3.0" ]; then pip install -U "healpy==1.12.9"; fi
- name: Run the test
run: pytest

coverage:
name: Test coverage
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
python-version: [3.8]

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install pytest pytest-cov coveralls
if [ -f requirements.txt ]; then pip install -r requirements.txt; pip install .; fi
- name: Run the test with coverage
run: pytest --cov
- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls

docs:
name: Doc test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.8]

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: python -m pip install --upgrade pip wheel Sphinx
- name: Test the documentation
run: sphinx-build -W --keep-going -b html doc doc/_build/html

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

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: python -m pip install --upgrade pip wheel pycodestyle
- name: Test the style; failures are allowed
# This is equivalent to an allowed falure.
continue-on-error: true
run: pycodestyle --count py/desiutil
107 changes: 0 additions & 107 deletions .travis.yml

This file was deleted.

35 changes: 15 additions & 20 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@
desiutil
========

|Actions Status| |Coveralls Status| |Documentation Status|

.. |Actions Status| image:: https://github.com/desihub/desiutil/workflows/CI/badge.svg
:target: https://github.com/desihub/desiutil/actions
:alt: GitHub Actions CI 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/desiutil/badge/?version=latest
:target: https://desiutil.readthedocs.io/en/latest/
:alt: Documentation Status

Introduction
============

Expand All @@ -13,26 +27,7 @@ Full Documentation

Please visit `desiutil on Read the Docs`_

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

.. _`desiutil on Read the Docs`: http://desiutil.readthedocs.org/en/latest/

Travis Build Status
===================

.. image:: https://img.shields.io/travis/desihub/desiutil.svg
:target: https://travis-ci.org/desihub/desiutil
:alt: Travis Build Status


Test Coverage Status
====================

.. image:: https://coveralls.io/repos/desihub/desiutil/badge.svg?service=github
:target: https://coveralls.io/github/desihub/desiutil
:alt: Test Coverage Status
.. _`desiutil on Read the Docs`: https://desiutil.readthedocs.io/en/latest/

License
=======
Expand Down
9 changes: 5 additions & 4 deletions bin/desiBootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,16 @@ fi
#
# Export
#
[[ -n "${verbose}" ]] && echo git clone https://github.com/desihub/desiutil.git desiutil-master
git clone https://github.com/desihub/desiutil.git desiutil-master
checkout=desiutil-checkout
[[ -n "${verbose}" ]] && echo git clone https://github.com/desihub/desiutil.git ${checkout}
git clone https://github.com/desihub/desiutil.git ${checkout}
if [[ -n "${branch}" ]]; then
cd desiutil-master
cd ${checkout}
[[ -n "${verbose}" ]] && echo git checkout ${branch}
git checkout ${branch}
cd ..
fi
export DESIUTIL=$(pwd)/desiutil-master
export DESIUTIL=$(pwd)/${checkout}
export PATH=${DESIUTIL}/bin:${PATH}
if [[ -z "${PYTHONPATH}" ]]; then
export PYTHONPATH=${DESIUTIL}/py
Expand Down
7 changes: 5 additions & 2 deletions doc/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@
Change Log
==========

3.0.4 (unreleased)
3.1.0 (2020-12-11)
------------------

* Add :class:`~desiutil.timer.Timer` class to standardize timing reports (PRs `#151`_, `#152`_).
* Migrate unit tests to GitHub Actions; allow :command:`desiInstall` to handle a
diversity of possible branch names (PR `#156`_).
* Add :mod:`~desiutil.redirect` for utilites related to redirecting STDOUT (PR `#153`_).
* Add :class:`~desiutil.timer.Timer` class to standardize timing reports (PRs `#151`_, `#152`_).

.. _`#151`: https://github.com/desihub/desiutil/pull/151
.. _`#152`: https://github.com/desihub/desiutil/pull/152
.. _`#153`: https://github.com/desihub/desiutil/pull/153
.. _`#156`: https://github.com/desihub/desiutil/pull/156

3.0.3 (2020-08-04)
------------------
Expand Down
Loading