Skip to content

Commit

Permalink
Merge branch 'extinction_coeffs' of https://github.com/desihub/desiutil
Browse files Browse the repository at this point in the history
… into extinction_coeffs
  • Loading branch information
sbailey committed Dec 14, 2020
2 parents 28c3a7d + 19f0dc3 commit 2e755d3
Show file tree
Hide file tree
Showing 15 changed files with 700 additions and 241 deletions.
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
3 changes: 3 additions & 0 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ desiutil API
.. automodule:: desiutil.plots
:members:

.. automodule:: desiutil.redirect
:members:

.. automodule:: desiutil.setup
:members:

Expand Down
18 changes: 15 additions & 3 deletions doc/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,30 @@
Change Log
==========

3.0.4 (unreleased)
3.1.1 (unreleased)
------------------
* Add function `dust.extinction_total_to_selective_ratio`

* Add `Timer` class to standardize timing reports (PRs `#151`_, `#152`_).
.. _`#157`: https://github.com/desihub/desiutil/pull/157


3.1.0 (2020-12-11)
------------------

* 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)
------------------

* Improve installation robustness when parsing DESICONDA envvar;
* Improve installation robustness when parsing :envvar:`DESICONDA` environment variable;
fix py3.8 SyntaxWarnings about "is not" usage (PR `#150`_).

.. _`#150`: https://github.com/desihub/desiutil/pull/150
Expand Down
Loading

0 comments on commit 2e755d3

Please sign in to comment.