Skip to content

Commit

Permalink
Merge pull request #23 from pllim/commtest
Browse files Browse the repository at this point in the history
Commissioning tests
  • Loading branch information
pllim authored Sep 14, 2016
2 parents 5ff3d34 + 9395e06 commit 6eff277
Show file tree
Hide file tree
Showing 26 changed files with 6,221 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ __pycache__
htmlcov
.coverage
MANIFEST
*.html
assets

# Sphinx
docs/api
Expand Down
4 changes: 3 additions & 1 deletion docs/stsynphot/accuracy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ should expect that some calculations will give different results.

An extensive commissioning process will be performed to verify that the results
produced by ``stsynphot`` are either as good as, or better than, the results
obtained using ASTROLIB PYSYNPHOT for the same calculations.
obtained using ASTROLIB PYSYNPHOT for the same calculations. Here are the
`commissioning test results <http://ssb.stsci.edu/stsynphot/report.html>`_
(might take time to load as it contains results for over 9800 tests).
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
version=VERSION,
description=DESCRIPTION,
scripts=scripts,
install_requires=['astropy'],
install_requires=['astropy', 'scipy>=0.14'],
author=AUTHOR,
author_email=AUTHOR_EMAIL,
license=LICENSE,
Expand Down
41 changes: 41 additions & 0 deletions stsynphot/commissioning/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""This sub-package is for commisioning tests.
.. note::
Tests require ASTROLIB PYSYNPHOT to be installed.
Specifically, install the version to be compared against ``stsynphot``.
To run only the commissioning tests from source checkout::
cd ../..
python setup.py test -P commissioning --remote-data --args="--slow"
Like above, but also use ``pytest-html`` plugin for a detail HTML report::
python setup.py test -P commissioning --remote-data \
--args="--slow --html=/full/path/report.html"
To generate the HTML report using ``py.test`` directly::
py.test stsynphot/commissioning/tests/ --remote-data \
--slow --html=report.html
To run only the commissioning tests from a Python session::
>>> import stsynphot
>>> stsynphot.test('commissioning', remote_data=True, args='--slow')
Like above, but also use ``pytest-html`` plugin for a detail HTML report::
>>> stsynphot.test('commissioning', remote_data=True,
... args='--slow --html="report.html"')
To rerun only failed tests from the last run, add ``--lf`` in the list of
``args`` above. This option requires ``pytest-cache`` (enabled by default)
and is useful for debugging.
"""
from __future__ import absolute_import, division, print_function

from . import utils # noqa
9 changes: 9 additions & 0 deletions stsynphot/commissioning/setup_package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst


def get_package_data():
return {'stsynphot.commissioning.tests': ['data/*']}


def requires_2to3():
return False
3 changes: 3 additions & 0 deletions stsynphot/commissioning/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Commisioning tests to ensure ``stsynphot`` is a valid replacement for
ASTROLIB PYSYNPHOT."""
Loading

0 comments on commit 6eff277

Please sign in to comment.