diff --git a/.github/workflows/tox-tests.yml b/.github/workflows/tox-tests.yml deleted file mode 100644 index eb7962e..0000000 --- a/.github/workflows/tox-tests.yml +++ /dev/null @@ -1,87 +0,0 @@ -# GitHub Actions workflow for testing and continuous integration. -# -# This file performs testing using tox and tox.ini to define and configure the test environments. - -name: Python Tests - -on: [push, pull_request] - -jobs: - - # Set up matrix to run tox tests across lists of os, python version, and tox environment - matrix_tests: - runs-on: ${{ matrix.os }} - if: "!contains(github.event.head_commit.message, '[ci skip]')" # github actions doesn't yet support this natively so add here - strategy: - matrix: - # Github actions supports ubuntu, windows, and macos virtual environments: - # https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners - # - # Only run on ubuntu by default, but can add other os's to the test matrix here. - # For example -- os: [ubuntu-latest, macos-latest, windows-latest] - os: [ubuntu-latest] - - # Test python 3.8, and 3.9 by default. - python-ver: [8, 9] - - # Specify which tox environments to test in this list. - tox-env: [cov, alldeps, devdeps, astropylts] - steps: - - uses: actions/checkout@v1 - - name: Set up python 3.${{ matrix.python-ver }} with tox environment py3${{ matrix.python-ver }}-${{ matrix.tox-env }} on ${{ matrix.os }} - uses: actions/setup-python@v1 - with: - python-version: 3.${{ matrix.python-ver }} - - name: Install base dependencies - run: | - python -m pip install --upgrade pip - python -m pip install tox - - name: Test with tox - run: | - tox -e py3${{ matrix.python-ver }}-${{ matrix.tox-env }} - # - # # This is an example of how to upload coverage to codecov - # - name: Upload coverage to codecov - # if: matrix.tox-env == 'cov' && matrix.python-ver == '8' - # uses: codecov/codecov-action@v2 - # with: - # token: ${{ secrets.CODECOV }} - # file: ./coverage.xml - # fail_ci_if_error: true - - # Test building of docs and check the links - doc_test: - runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, '[ci skip]')" - steps: - - uses: actions/checkout@v1 - - name: Set up Python to build docs with sphinx - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - name: Install base dependencies - run: | - python -m pip install --upgrade pip - python -m pip install tox - - name: Build and check docs using tox - run: | - tox -e build_docs - tox -e linkcheck - - # Perform codestyle check - codestyle: - runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, '[ci skip]')" - steps: - - uses: actions/checkout@v1 - - name: Python codestyle check - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - name: Install base dependencies - run: | - python -m pip install --upgrade pip - python -m pip install tox - - name: Check codestyle using tox - run: | - tox -e codestyle diff --git a/.readthedocs.yml b/.readthedocs.yml deleted file mode 100644 index 91be621..0000000 --- a/.readthedocs.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: 2 - -build: - image: latest - -python: - version: 3.7 - install: - - method: pip - path: . - extra_requirements: - - docs - - all - -formats: [] diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 29b0eb6..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,17 +0,0 @@ -include README.rst -include CHANGES.rst -include setup.cfg -include LICENSE.rst -include pyproject.toml - -recursive-include specreduce_data *.pyx *.c *.pxd -recursive-include docs * -recursive-include licenses * -recursive-include scripts * -recursive-include specreduce_data/reference_data * - -prune build -prune docs/_build -prune docs/api - -global-exclude *.pyc *.o diff --git a/README.rst b/README.rst index e978733..3c4dd04 100644 --- a/README.rst +++ b/README.rst @@ -1,57 +1,29 @@ -Test and reference data for the specreduce package --------------------------------------------------- +Reference and calibration data for the reducing optical/IR spectra +------------------------------------------------------------------ .. image:: http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat :target: http://www.astropy.org :alt: Powered by Astropy Badge -.. image:: https://github.com/astropy/specreduce-data/workflows/Python%20Tests/badge.svg - :target: https://github.com/astropy/specreduce-data/actions - :alt: Python Test Status on Github Actions - -This repository contains general reference data for spectroscopic data reduction +This repository contains general reference and calibration data for spectroscopic data reduction (e.g. standard star spectra, atmospheric extinction curves, line lists for calibration -lamps) and test data for the specreduce package. +lamps). License ------- This project is Copyright (c) Astropy Specreduce contributors and licensed under -the terms of the BSD 3-Clause license. This package is based upon -the `Astropy package template `_ -which is licensed under the BSD 3-clause licence. See the licenses folder for +the terms of the BSD 3-Clause license. See the licenses folder for more information. Contributing ------------ -We love contributions! specreduce-data is open source, -built on open source, and we'd love to have you hang out in our community. - -**Imposter syndrome disclaimer**: We want your help. No, really. - -There may be a little voice inside your head that is telling you that you're not -ready to be an open source contributor; that your skills aren't nearly good -enough to contribute. What could you possibly offer a project like this one? - -We assure you - the little voice in your head is wrong. If you can write code at -all, you can contribute code to open source. Contributing to open source -projects is a fantastic way to advance one's coding skills. Writing perfect code -isn't the measure of a good developer (that would disqualify all of us!); it's -trying to create something, making mistakes, and learning from those -mistakes. That's how we all improve, and we are happy to help others learn. - -Being an open source contributor doesn't just mean writing code, either. You can -help out by writing documentation, tests, or even giving feedback about the -project (and yes - that includes giving feedback about the contribution -process). Some of these contributions may be the most valuable to the project as -a whole, because you're coming to the project with fresh eyes, so you can see -the errors and assumptions that seasoned contributors have glossed over. - -Note: This disclaimer was originally written by -`Adrienne Lowe `_ for a -`PyCon talk `_, and was adapted by -specreduce-data based on its use in the README file for the -`MetPy project `_. +We love contributions! specreduce-data is open source and we would appreciate any +new data or updates to existing data. Much of the data archived here comes from the +calibration data that IRAF provides. This has been augmented with some more recent data that's +freely available from other sources. A goal of this repository is to provide a single, +curated collection to help save users the task of finding and downloading calibration +reference data themselves. diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index fb03f26..0000000 --- a/docs/Makefile +++ /dev/null @@ -1,133 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest - -#This is needed with git because git doesn't create a dir if it's empty -$(shell [ -d "_static" ] || mkdir -p _static) - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - -clean: - -rm -rf $(BUILDDIR) - -rm -rf api - -rm -rf generated - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Astropy.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Astropy.qhc" - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/Astropy" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Astropy" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - make -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - @echo "Run 'python setup.py test' in the root directory to run doctests " \ - @echo "in the documentation." diff --git a/docs/conf.py b/docs/conf.py deleted file mode 100644 index dcc6dd5..0000000 --- a/docs/conf.py +++ /dev/null @@ -1,194 +0,0 @@ -# -*- coding: utf-8 -*- -# Licensed under a 3-clause BSD style license - see LICENSE.rst -# -# Astropy documentation build configuration file. -# -# This file is execfile()d with the current directory set to its containing dir. -# -# Note that not all possible configuration values are present in this file. -# -# All configuration values have a default. Some values are defined in -# the global Astropy configuration which is loaded here before anything else. -# See astropy.sphinx.conf for which values are set there. - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# sys.path.insert(0, os.path.abspath('..')) -# IMPORTANT: the above commented section was generated by sphinx-quickstart, but -# is *NOT* appropriate for astropy or Astropy affiliated packages. It is left -# commented out with this explanation to make it clear why this should not be -# done. If the sys.path entry above is added, when the astropy.sphinx.conf -# import occurs, it will import the *source* version of astropy instead of the -# version installed (if invoked as "make html" or directly with sphinx), or the -# version in the build directory (if "python setup.py build_sphinx" is used). -# Thus, any C-extensions that are needed to build the documentation will *not* -# be accessible, and the documentation will not build correctly. - -import os -import sys -import datetime -from importlib import import_module - -try: - from sphinx_astropy.conf.v1 import * # noqa -except ImportError: - print('ERROR: the documentation requires the sphinx-astropy package to be installed') - sys.exit(1) - -# Get configuration information from setup.cfg -from configparser import ConfigParser -conf = ConfigParser() - -conf.read([os.path.join(os.path.dirname(__file__), '..', 'setup.cfg')]) -setup_cfg = dict(conf.items('metadata')) - -# -- General configuration ---------------------------------------------------- - -# By default, highlight as Python 3. -highlight_language = 'python3' - -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.2' - -# To perform a Sphinx version check that needs to be more specific than -# major.minor, call `check_sphinx_version("x.y.z")` here. -# check_sphinx_version("1.2.1") - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns.append('_templates') - -# This is added to the end of RST files - a good place to put substitutions to -# be used globally. -rst_epilog += """ -""" - -# -- Project information ------------------------------------------------------ - -# This does not *have* to match the package name, but typically does -project = setup_cfg['name'] -author = setup_cfg['author'] -copyright = '{0}, {1}'.format( - datetime.datetime.now().year, setup_cfg['author']) - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. - -import_module(setup_cfg['name']) -package = sys.modules[setup_cfg['name']] - -# The short X.Y version. -version = package.__version__.split('-', 1)[0] -# The full version, including alpha/beta/rc tags. -release = package.__version__ - - -# -- Options for HTML output -------------------------------------------------- - -# A NOTE ON HTML THEMES -# The global astropy configuration uses a custom theme, 'bootstrap-astropy', -# which is installed along with astropy. A different theme can be used or -# the options for this theme can be modified by overriding some of the -# variables set in the global configuration. The variables set in the -# global configuration are listed below, commented out. - - -# Add any paths that contain custom themes here, relative to this directory. -# To use a different custom theme, add the directory containing the theme. -#html_theme_path = [] - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. To override the custom theme, set this to the -# name of a builtin theme or the name of a custom theme in html_theme_path. -#html_theme = None - - -html_theme_options = { - 'logotext1': 'specreduce-data', # white, semi-bold - 'logotext2': '', # orange, light - 'logotext3': ':docs' # white, light - } - - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = '' - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = '' - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '' - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -html_title = '{0} v{1}'.format(project, release) - -# Output file base name for HTML help builder. -htmlhelp_basename = project + 'doc' - - -# -- Options for LaTeX output ------------------------------------------------- - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, documentclass [howto/manual]). -latex_documents = [('index', project + '.tex', project + u' Documentation', - author, 'manual')] - - -# -- Options for manual page output ------------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [('index', project.lower(), project + u' Documentation', - [author], 1)] - - -# -- Options for the edit_on_github extension --------------------------------- - -if setup_cfg.get('edit_on_github').lower() == 'true': - - extensions += ['sphinx_astropy.ext.edit_on_github'] - - edit_on_github_project = setup_cfg['github_project'] - edit_on_github_branch = "main" - - edit_on_github_source_root = "" - edit_on_github_doc_root = "docs" - -# -- Resolving issue number to links in changelog ----------------------------- -github_issues_url = 'https://github.com/{0}/issues/'.format(setup_cfg['github_project']) - -# -- Turn on nitpicky mode for sphinx (to warn about references not found) ---- -# -# nitpicky = True -# nitpick_ignore = [] -# -# Some warnings are impossible to suppress, and you can list specific references -# that should be ignored in a nitpick-exceptions file which should be inside -# the docs/ directory. The format of the file should be: -# -# -# -# for example: -# -# py:class astropy.io.votable.tree.Element -# py:class astropy.io.votable.tree.SimpleElement -# py:class astropy.io.votable.tree.SimpleElementWithContent -# -# Uncomment the following lines to enable the exceptions: -# -# for line in open('nitpick-exceptions'): -# if line.strip() == "" or line.startswith("#"): -# continue -# dtype, target = line.split(None, 1) -# target = target.strip() -# nitpick_ignore.append((dtype, six.u(target))) diff --git a/docs/index.rst b/docs/index.rst deleted file mode 100644 index c445dd3..0000000 --- a/docs/index.rst +++ /dev/null @@ -1,14 +0,0 @@ -Documentation -============= - -This is the documentation for specreduce-data. - -.. toctree:: - :maxdepth: 2 - - specreduce-data/index.rst - -.. note:: The layout of this directory is simply a suggestion. To follow - traditional practice, do *not* edit this page, but instead place - all documentation for the package inside ``specreduce-data/``. - You can follow this practice or choose your own layout. diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index aa93013..0000000 --- a/docs/make.bat +++ /dev/null @@ -1,172 +0,0 @@ -@ECHO OFF - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set BUILDDIR=_build -set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . -if NOT "%PAPER%" == "" ( - set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% -) - -if "%1" == "" goto help - -if "%1" == "help" ( - :help - echo.Please use `make ^` where ^ is one of - echo. html to make standalone HTML files - echo. dirhtml to make HTML files named index.html in directories - echo. singlehtml to make a single large HTML file - echo. pickle to make pickle files - echo. json to make JSON files - echo. htmlhelp to make HTML files and a HTML help project - echo. qthelp to make HTML files and a qthelp project - echo. devhelp to make HTML files and a Devhelp project - echo. epub to make an epub - echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter - echo. text to make text files - echo. man to make manual pages - echo. changes to make an overview over all changed/added/deprecated items - echo. linkcheck to check all external links for integrity - echo. doctest to run all doctests embedded in the documentation if enabled - goto end -) - -if "%1" == "clean" ( - for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i - del /q /s %BUILDDIR%\* - del /q /s api - del /q /s generated - goto end -) - -if "%1" == "html" ( - %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/html. - goto end -) - -if "%1" == "dirhtml" ( - %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. - goto end -) - -if "%1" == "singlehtml" ( - %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. - goto end -) - -if "%1" == "pickle" ( - %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the pickle files. - goto end -) - -if "%1" == "json" ( - %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the JSON files. - goto end -) - -if "%1" == "htmlhelp" ( - %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run HTML Help Workshop with the ^ -.hhp project file in %BUILDDIR%/htmlhelp. - goto end -) - -if "%1" == "qthelp" ( - %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run "qcollectiongenerator" with the ^ -.qhcp project file in %BUILDDIR%/qthelp, like this: - echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Astropy.qhcp - echo.To view the help file: - echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Astropy.ghc - goto end -) - -if "%1" == "devhelp" ( - %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. - goto end -) - -if "%1" == "epub" ( - %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The epub file is in %BUILDDIR%/epub. - goto end -) - -if "%1" == "latex" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "text" ( - %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The text files are in %BUILDDIR%/text. - goto end -) - -if "%1" == "man" ( - %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The manual pages are in %BUILDDIR%/man. - goto end -) - -if "%1" == "changes" ( - %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes - if errorlevel 1 exit /b 1 - echo. - echo.The overview file is in %BUILDDIR%/changes. - goto end -) - -if "%1" == "linkcheck" ( - %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck - if errorlevel 1 exit /b 1 - echo. - echo.Link check complete; look for any errors in the above output ^ -or in %BUILDDIR%/linkcheck/output.txt. - goto end -) - -if "%1" == "doctest" ( - %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest - if errorlevel 1 exit /b 1 - echo. - echo.Testing of doctests in the sources finished, look at the ^ -results in %BUILDDIR%/doctest/output.txt. - goto end -) - -:end diff --git a/docs/specreduce-data/index.rst b/docs/specreduce-data/index.rst deleted file mode 100644 index 7887ecb..0000000 --- a/docs/specreduce-data/index.rst +++ /dev/null @@ -1,10 +0,0 @@ -***************************** -specreduce-data Documentation -***************************** - -This is the documentation for specreduce-data. - -Reference/API -============= - -.. automodapi:: specreduce_data diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 7e7daea..0000000 --- a/pyproject.toml +++ /dev/null @@ -1,7 +0,0 @@ -[build-system] - -requires = ["setuptools", - "setuptools_scm", - "wheel"] - -build-backend = 'setuptools.build_meta' diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 38a0f81..0000000 --- a/setup.cfg +++ /dev/null @@ -1,97 +0,0 @@ -[metadata] -name = specreduce_data -author = Astropy Specreduce contributors -author_email = astropy-dev@googlegroups.com -license = BSD 3-Clause -license_file = licenses/LICENSE.rst -url = http://astropy.org -description = Test and reference data for the specreduce package -long_description = file: README.rst -long_description_content_type = text/x-rst -edit_on_github = False -github_project = astropy/specreduce-data - -[options] -zip_safe = False -packages = find: -python_requires = >=3.7 -setup_requires = setuptools_scm -install_requires = - astropy - -[options.extras_require] -test = - coverage - pytest-cov - pytest-astropy -docs = - sphinx-astropy - -[options.package_data] -specreduce_data = - reference_data/* - reference_data/extinction/* - reference_data/line_lists/* - reference_data/line_lists/iraf/* - reference_data/line_lists/iraf/air/* - reference_data/line_lists/iraf/vacuum/* - reference_data/onedstds/* - reference_data/onedstds/bstdscal/* - reference_data/onedstds/ctio/* - reference_data/onedstds/ctiocal/* - reference_data/onedstds/ctionewcal/* - reference_data/onedstds/iidscal/* - reference_data/onedstds/irscal/* - reference_data/onedstds/oke1990/* - reference_data/onedstds/redcal/* - reference_data/onedstds/spec16cal/* - reference_data/onedstds/spec50cal/* - reference_data/onedstds/spechayescal/* - reference_data/onedstds/snfactory/* - reference_data/onedstds/gemini/* - reference_data/onedstds/eso/* - reference_data/onedstds/eso/Xshooter/* - reference_data/onedstds/eso/ctiostan/* - reference_data/onedstds/eso/hststan/* - reference_data/onedstds/eso/okestan/* - reference_data/onedstds/eso/wdstan/* - -[tool:pytest] -testpaths = "specreduce_data" "docs" -astropy_header = true -doctest_plus = enabled -text_file_format = rst -addopts = --doctest-rst - -[coverage:run] -omit = - specreduce_data/_astropy_init* - specreduce_data/conftest.py - specreduce_data/*setup_package* - specreduce_data/tests/* - specreduce_data/*/tests/* - specreduce_data/extern/* - specreduce_data/version* - */specreduce_data/_astropy_init* - */specreduce_data/conftest.py - */specreduce_data/*setup_package* - */specreduce_data/tests/* - */specreduce_data/*/tests/* - */specreduce_data/extern/* - */specreduce_data/version* - -[coverage: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\(.*\): - # Ignore branches that don't pertain to this version of Python - pragma: py{ignore_python_version} - # Don't complain about IPython completion helper - def _ipython_key_completions_ diff --git a/setup.py b/setup.py deleted file mode 100755 index 848efeb..0000000 --- a/setup.py +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env python -# Licensed under a 3-clause BSD style license - see LICENSE.rst - -# NOTE: The configuration for the package, including the name, version, and -# other information are set in the setup.cfg file. - -import os -import sys - -from setuptools import setup - - -# First provide helpful messages if contributors try and run legacy commands -# for tests or docs. - -TEST_HELP = """ -Note: running tests is no longer done using 'python setup.py test'. Instead -you will need to run: - - tox -e test - -If you don't already have tox installed, you can install it with: - - pip install tox - -If you only want to run part of the test suite, you can also use pytest -directly with:: - - pip install -e .[test] - pytest - -For more information, see: - - http://docs.astropy.org/en/latest/development/testguide.html#running-tests -""" - -if 'test' in sys.argv: - print(TEST_HELP) - sys.exit(1) - -DOCS_HELP = """ -Note: building the documentation is no longer done using -'python setup.py build_docs'. Instead you will need to run: - - tox -e build_docs - -If you don't already have tox installed, you can install it with: - - pip install tox - -You can also build the documentation with Sphinx directly using:: - - pip install -e .[docs] - cd docs - make html - -For more information, see: - - http://docs.astropy.org/en/latest/install.html#builddocs -""" - -if 'build_docs' in sys.argv or 'build_sphinx' in sys.argv: - print(DOCS_HELP) - sys.exit(1) - -VERSION_TEMPLATE = """ -# Note that we need to fall back to the hard-coded version if either -# setuptools_scm can't be imported or setuptools_scm can't determine the -# version, so we catch the generic 'Exception'. -try: - from setuptools_scm import get_version - version = get_version(root='..', relative_to=__file__) -except Exception: - version = '{version}' -""".lstrip() - -setup(use_scm_version={'write_to': os.path.join('specreduce_data', 'version.py'), - 'write_to_template': VERSION_TEMPLATE}) diff --git a/specreduce_data/__init__.py b/specreduce_data/__init__.py deleted file mode 100644 index 2678b29..0000000 --- a/specreduce_data/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rst - -# Packages may add whatever they like to this file, but -# should keep this content at the top. -# ---------------------------------------------------------------------------- -from ._astropy_init import * # noqa -# ---------------------------------------------------------------------------- diff --git a/specreduce_data/_astropy_init.py b/specreduce_data/_astropy_init.py deleted file mode 100644 index fa37a63..0000000 --- a/specreduce_data/_astropy_init.py +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rst - -__all__ = ['__version__'] - -# this indicates whether or not we are in the package's setup.py -try: - _ASTROPY_SETUP_ -except NameError: - import builtins - builtins._ASTROPY_SETUP_ = False - -try: - from .version import version as __version__ -except ImportError: - __version__ = '' - - -if not _ASTROPY_SETUP_: # noqa - import os - - # Create the test function for self test - from astropy.tests.runner import TestRunner - test = TestRunner.make_test_runner_in(os.path.dirname(__file__)) - test.__test__ = False - __all__ += ['test'] diff --git a/specreduce_data/conftest.py b/specreduce_data/conftest.py deleted file mode 100644 index 672b273..0000000 --- a/specreduce_data/conftest.py +++ /dev/null @@ -1,49 +0,0 @@ -# This file is used to configure the behavior of pytest when using the Astropy -# test infrastructure. It needs to live inside the package in order for it to -# get picked up when running the tests inside an interpreter using -# packagename.test - -import os - -from astropy.version import version as astropy_version - -# For Astropy 3.0 and later, we can use the standalone pytest plugin -if astropy_version < '3.0': - from astropy.tests.pytest_plugins import * # noqa - del pytest_report_header - ASTROPY_HEADER = True -else: - try: - from pytest_astropy_header.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS - ASTROPY_HEADER = True - except ImportError: - ASTROPY_HEADER = False - - -def pytest_configure(config): - - if ASTROPY_HEADER: - - config.option.astropy_header = True - - # Customize the following lines to add/remove entries from the list of - # packages for which version numbers are displayed when running the tests. - PYTEST_HEADER_MODULES.pop('Pandas', None) - PYTEST_HEADER_MODULES['scikit-image'] = 'skimage' - - from . import __version__ - packagename = os.path.basename(os.path.dirname(__file__)) - TESTED_VERSIONS[packagename] = __version__ - -# Uncomment the last two lines in this block to treat all DeprecationWarnings as -# exceptions. For Astropy v2.0 or later, there are 2 additional keywords, -# as follow (although default should work for most cases). -# To ignore some packages that produce deprecation warnings on import -# (in addition to 'compiler', 'scipy', 'pygments', 'ipykernel', and -# 'setuptools'), add: -# modules_to_ignore_on_import=['module_1', 'module_2'] -# To ignore some specific deprecation warning messages for Python version -# MAJOR.MINOR or later, add: -# warnings_to_ignore_by_pyver={(MAJOR, MINOR): ['Message to ignore']} -# from astropy.tests.helper import enable_deprecations_as_exceptions # noqa -# enable_deprecations_as_exceptions() diff --git a/specreduce_data/extern/__init__.py b/specreduce_data/extern/__init__.py deleted file mode 100644 index 3b1f211..0000000 --- a/specreduce_data/extern/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rst -""" -This packages contains python packages that are bundled with the package but -are external to it, and hence are developed in a separate source tree. -""" diff --git a/specreduce_data/readers.py b/specreduce_data/readers.py deleted file mode 100644 index 19c3c8a..0000000 --- a/specreduce_data/readers.py +++ /dev/null @@ -1,29 +0,0 @@ -# utility functions for reading packaged data files - -import os -import pkg_resources - -from astropy.table import Table - - -def read_basic_ascii_table(table_file, names=None, reader="ascii", **kwargs): - """ - Try to read a file using AstroPy Table's basic ascii reader - """ - t = Table.read(table_file, format=reader, names=names, **kwargs) - - return t - - -def collect_data_files(data_path="", ext=".dat"): - """ - Walk through data_path, find .dat files, and return list of paths to them. - """ - data_files = [] - root_dir = pkg_resources.resource_filename("specreduce_data", data_path) - for root, dirs, files in os.walk(root_dir): - for name in files: - if ext in name: - data_files.append(os.path.join(root, name)) - - return data_files diff --git a/specreduce_data/reference_data/README.rst b/specreduce_data/reference_data/README.rst index 40a4cb7..d12375b 100644 --- a/specreduce_data/reference_data/README.rst +++ b/specreduce_data/reference_data/README.rst @@ -6,6 +6,3 @@ data reduction. Its primary purpose is to support the specreduce package, but th can be used on its own. In fact, a significant amount of this data came originally from IRAF. See README files within the directories and comments in the files for details on data provenance and literature references. - -Note that this is intended only for relatively small files that are infrequently updated. -- large or frequently updated files should be externally hosted and downloaded as needed. diff --git a/specreduce_data/tests/__init__.py b/specreduce_data/tests/__init__.py deleted file mode 100644 index 838b457..0000000 --- a/specreduce_data/tests/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rst -""" -This module contains package tests. -""" diff --git a/specreduce_data/tests/test_read_extinction.py b/specreduce_data/tests/test_read_extinction.py deleted file mode 100644 index e637610..0000000 --- a/specreduce_data/tests/test_read_extinction.py +++ /dev/null @@ -1,19 +0,0 @@ -# test to make sure extinction data is properly packaged and can be read in correctly - -import os -import warnings - -from ..readers import read_basic_ascii_table, collect_data_files - - -def test_read_extinction(): - ext_dir = os.path.join("reference_data", "extinction") - data_files = collect_data_files(ext_dir) - for f in data_files: - try: - t = read_basic_ascii_table(f, names=['wavelength', 'extinction']) - assert(len(t) > 0) - assert(len(t.columns) == 2) - except Exception as e: - msg = f"Failed to load {f} as an AstroPy Table: {e.__class__.__name__}" - warnings.warn(msg) diff --git a/specreduce_data/tests/test_read_line_lists.py b/specreduce_data/tests/test_read_line_lists.py deleted file mode 100644 index 1bdd26d..0000000 --- a/specreduce_data/tests/test_read_line_lists.py +++ /dev/null @@ -1,33 +0,0 @@ -# test to make sure line list data is properly packaged and can be read in correctly - -import os -import warnings - -import astropy - -from ..readers import read_basic_ascii_table, collect_data_files - - -def test_read_line_lists(): - line_dir = os.path.join("reference_data", "line_lists") - data_files = collect_data_files(line_dir) - for f in data_files: - try: - t = read_basic_ascii_table(f, names=['wavelength']) - assert(len(t) > 0) - assert(len(t.columns) >= 1) - except astropy.io.ascii.core.InconsistentTableError as e: - orig_e = e.__class__.__name__ - try: - t = read_basic_ascii_table( - f, - reader="ascii.fixed_width", - names=['wavelength', 'info'], - col_starts=(0, 10), - delimiter=' ' - ) - assert(len(t) > 0) - assert(len(t.columns) >= 1) - except Exception as e: - msg = f"Failed to load {f} as a AstroPy Table: {orig_e} {e.__class__.__name__}" - warnings.warn(msg) diff --git a/specreduce_data/tests/test_read_onedstds.py b/specreduce_data/tests/test_read_onedstds.py deleted file mode 100644 index 670b670..0000000 --- a/specreduce_data/tests/test_read_onedstds.py +++ /dev/null @@ -1,35 +0,0 @@ -# test to make sure line list data is properly packaged and can be read in correctly - -import os -import warnings - -import astropy - -from ..readers import read_basic_ascii_table, collect_data_files - - -def test_read_onesstds(): - std_dir = os.path.join("reference_data", "onedstds") - data_files = collect_data_files(std_dir) - t = None - for f in data_files: - try: - t = read_basic_ascii_table( - f, - reader="ascii.basic", - names=["wavelength", "AB mag", "bin width"] - ) - assert(len(t) > 0) - assert(len(t.columns) == 3) - except astropy.io.ascii.core.InconsistentTableError as e: - orig_e = e.__class__.__name__ - try: - t = read_basic_ascii_table( - f, - reader="ascii.basic", - names=None - ) - assert(len(t) > 0) - except Exception as e: - msg = f"Failed to load {f} as a AstroPy Table : {orig_e} {e.__class__.__name__}" - warnings.warn(msg) diff --git a/specreduce_data/utils/__init__.py b/specreduce_data/utils/__init__.py deleted file mode 100644 index d3f4517..0000000 --- a/specreduce_data/utils/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# Licensed under a 3-clause BSD style license - see LICENSE.rst - -# This sub-module is destined for common non-package specific utility -# functions. diff --git a/specreduce_data/utils/tests/__init__.py b/specreduce_data/utils/tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test_data/README.rst b/test_data/README.rst deleted file mode 100644 index 80a0318..0000000 --- a/test_data/README.rst +++ /dev/null @@ -1 +0,0 @@ -Directory for data to be used in specreduce regression tests. diff --git a/tox.ini b/tox.ini deleted file mode 100644 index c0fa6e4..0000000 --- a/tox.ini +++ /dev/null @@ -1,86 +0,0 @@ -[tox] -envlist = - py{38,39}-test{,-devdeps,-datadeps}{,-cov} - py{38,39}-test-numpy{118,119,120,121} - py{38,39}-test-astropy{lts} - build_docs - codestyle -requires = - setuptools >= 30.3.0 - pip >= 19.3.1 -isolated_build = true - -[testenv] - -# Pass through the following environment variables which may be needed for the CI -passenv = HOME WINDIR LC_ALL LC_CTYPE CC CI TRAVIS - -# Run the tests in a temporary directory to make sure that we don't import -# this package from the source tree -changedir = .tmp/{envname} - -# tox environments are constructed with so-called 'factors' (or terms) -# separated by hyphens, e.g. test-devdeps-cov. Lines below starting with factor: -# will only take effect if that factor is included in the environment name. To -# see a list of example environments that can be run, along with a description, -# run: -# -# tox -l -v -# -description = - run tests - alldeps: with all optional dependencies - devdeps: with the latest developer version of key dependencies - oldestdeps: with the oldest supported version of key dependencies - cov: and test coverage - numpy118: with numpy 1.18.* - numpy119: with numpy 1.19.* - numpy120: with numpy 1.20.* - numpy121: with numpy 1.21.* - astropylts: with the latest astropy LTS - -# The following provides some specific pinnings for key packages -deps = - - numpy118: numpy==1.18.* - numpy119: numpy==1.19.* - numpy120: numpy==1.20.* - numpy121: numpy==1.21.* - - astropylts: astropy==4.0.* - - devdeps: git+https://github.com/numpy/numpy.git#egg=numpy - devdeps: git+https://github.com/astropy/astropy.git#egg=astropy - -# The following indicates which extras_require from setup.cfg will be installed -extras = - test - alldeps: all - -commands = - pip freeze - !cov: pytest --pyargs specreduce_data {toxinidir}/docs {posargs} - cov: pytest --pyargs specreduce_data {toxinidir}/docs --cov specreduce_data --cov-config={toxinidir}/setup.cfg {posargs} - -[testenv:build_docs] -changedir = docs -description = invoke sphinx-build to build the HTML docs -extras = docs -commands = - pip freeze - sphinx-build -W -b html . _build/html - -[testenv:linkcheck] -changedir = docs -description = check the links in the HTML docs -extras = docs -commands = - pip freeze - sphinx-build -W -b linkcheck . _build/html - -[testenv:codestyle] -skip_install = true -changedir = . -description = check code style, e.g. with flake8 -deps = flake8 -commands = flake8 specreduce_data --count --max-line-length=100