-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from desihub/pip-installable-package
pip installable package
- Loading branch information
Showing
61 changed files
with
1,797 additions
and
1,501 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[run] | ||
source = py/prospect | ||
omit = | ||
py/prospect/_version.py | ||
py/prospect/conftest* | ||
py/prospect/cython_version* | ||
py/prospect/setup_package* | ||
py/prospect/*/setup_package* | ||
py/prospect/*/*/setup_package* | ||
py/prospect/sphinx/* | ||
py/prospect/test/* | ||
py/prospect/*/test/* | ||
py/prospect/*/*/test/* | ||
|
||
[report] | ||
exclude_lines = | ||
# Have to re-enable the standard pragma | ||
pragma: no cover | ||
|
||
# Don't complain about packages we have installed | ||
except ImportError | ||
|
||
# Don't complain if tests don't hit assertions | ||
raise AssertionError | ||
raise NotImplementedError | ||
|
||
# Don't complain about script hooks | ||
def main\(.*\): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
# 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] | ||
|
||
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; 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; 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/prospect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# .readthedocs.yml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Build documentation in the doc/ directory with Sphinx | ||
sphinx: | ||
configuration: doc/conf.py | ||
|
||
# Optionally build your docs in additional formats such as PDF and ePub | ||
formats: all | ||
|
||
# Optionally set the version of Python and requirements required to build your docs | ||
python: | ||
version: 3 | ||
# system_packages: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
include LICENSE.rst | ||
include README.rst | ||
include requirements.txt | ||
|
||
graft bin | ||
graft doc | ||
graft etc | ||
|
||
prune build | ||
prune dist | ||
prune htmlcov | ||
prune doc/_build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
======== | ||
prospect | ||
======== | ||
Digging into DESI spectra, looking for stuff. | ||
--------------------------------------------- | ||
|
||
|Actions Status| |Coveralls Status| |Documentation Status| | ||
|
||
This repository is a rewrite of inspector_, which itself is very much a work | ||
in progress. This repository is intended to provide similar functionality | ||
as inspector, but do so without using ipywidgets so that it can be used as | ||
standalone code outside of Jupyter notebooks, while still also working within | ||
Jupyter notebooks. | ||
|
||
.. image:: screenshot.png | ||
:alt: Prospect Screenshot | ||
|
||
.. _inspector: https://github.com/desihub/inspector | ||
|
||
.. |Actions Status| image:: https://github.com/desihub/prospect/workflows/CI/badge.svg | ||
:target: https://github.com/desihub/prospect/actions | ||
:alt: GitHub Actions CI Status | ||
|
||
.. |Coveralls Status| image:: https://coveralls.io/repos/desihub/prospect/badge.svg?branch=pip-installable-package | ||
:target: https://coveralls.io/github/desihub/prospect?branch=pip-installable-package | ||
:alt: Test Coverage Status | ||
|
||
.. |Documentation Status| image:: https://readthedocs.org/projects/desi-prospect/badge/?version=latest | ||
:target: http://desi-prospect.readthedocs.org/en/latest/ | ||
:alt: Documentation Status | ||
|
||
What it does | ||
~~~~~~~~~~~~ | ||
|
||
* Provides an interactive spectral viewer for DESI data at NERSC without | ||
needing to download or install anything locally. | ||
* Interative zoom and pan | ||
* Shows noise estimated for each spectrum. | ||
* Shows redrock results including the redshift, ZWARN flags, and the | ||
best fit model. | ||
* Mouse over a region of the spectrum to get a real-time zoom in a sub-window; | ||
this is handy for inspecting narrow emission lines without zooming in and out | ||
on each one. | ||
* Shows TARGETID and targeting bits from DESI_TARGET, MWS_TARGET, | ||
and BGS_TARGET. | ||
* Highlight common emission / absorption lines. | ||
* Display imaging of target. | ||
* Buttons for saving visual inspection results before moving to next target. | ||
|
||
Added here but not in the original inspector | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
* Restframe wavelengths | ||
* User-defined smoothing | ||
* User-defined redshift | ||
* Viewing spectra that don't yet have redshift fits | ||
|
||
What it doesn't do (yet) | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Any of these could be added later but don't yet exist. | ||
If you really want a feature, please consider contributing it. | ||
|
||
* Show individual exposures (multiple exposures are coadded prior to display) | ||
* Show masks | ||
* Show the Nth best fit instead of just the best fit | ||
* More target info like mags and shapes | ||
* Displaying model of 2D sky-subtracted raw data | ||
* Filtering to individual exposures or tiles | ||
|
||
----- | ||
|
||
:Eric Armengaud: Saclay - CEA | ||
:Stephen Bailey: Lawrence Berkeley National Lab | ||
:Benjamin Weaver: NSF's National Optical-Infrared Astronomy Research Laboratory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
#!/usr/bin/env python | ||
# | ||
# See top-level LICENSE.rst file for Copyright information | ||
# | ||
|
||
""" | ||
Write html index pages from existing static pages/images produced by other scripts | ||
""" | ||
|
||
import prospect.scripts.prepare_cmx_htmlfiles as prepare_cmx_htmlfiles | ||
|
||
if __name__ == '__main__': | ||
args = prepare_cmx_htmlfiles.parse() | ||
prepare_cmx_htmlfiles.main(args) | ||
|
||
# -*- coding: utf-8 -*- | ||
# Licensed under a 3-clause BSD style license - see LICENSE.rst | ||
from sys import exit | ||
from prospect.scripts.prepare_cmx_htmlfiles import main | ||
exit(main()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
#!/usr/bin/env python | ||
# | ||
# See top-level LICENSE.rst file for Copyright information | ||
# | ||
|
||
""" | ||
Write html index pages from existing static pages/images produced by other scripts | ||
""" | ||
|
||
import prospect.scripts.prepare_htmlfiles as prepare_htmlfiles | ||
|
||
if __name__ == '__main__': | ||
args = prepare_htmlfiles.parse() | ||
prepare_htmlfiles.main(args) | ||
|
||
# -*- coding: utf-8 -*- | ||
# Licensed under a 3-clause BSD style license - see LICENSE.rst | ||
from sys import exit | ||
from prospect.scripts.prepare_htmlfiles import main | ||
exit(main()) |
Oops, something went wrong.