-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
1,322 additions
and
24 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,8 +1,13 @@ | ||
# Licensed under the MIT License - see LICENSE.rst | ||
|
||
from __future__ import (absolute_import, division, print_function, | ||
unicode_literals) | ||
|
||
from .star import * | ||
from .tgas import * | ||
from .gaia import * | ||
# Packages may add whatever they like to this file, but | ||
# should keep this content at the top. | ||
# ---------------------------------------------------------------------------- | ||
from ._astropy_init import * | ||
# ---------------------------------------------------------------------------- | ||
|
||
if not _ASTROPY_SETUP_: | ||
from .star import * | ||
from .tgas import * | ||
from .gaia import * |
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,46 @@ | ||
# this contains imports plugins that configure py.test for astropy tests. | ||
# by importing them here in conftest.py they are discoverable by py.test | ||
# no matter how it is invoked within the source tree. | ||
|
||
from astropy.tests.pytest_plugins import * | ||
|
||
## Uncomment the following line 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']} | ||
# enable_deprecations_as_exceptions() | ||
|
||
## Uncomment and customize the following lines to add/remove entries from | ||
## the list of packages for which version numbers are displayed when running | ||
## the tests. Making it pass for KeyError is essential in some cases when | ||
## the package uses other astropy affiliated packages. | ||
# try: | ||
# PYTEST_HEADER_MODULES['Astropy'] = 'astropy' | ||
# PYTEST_HEADER_MODULES['scikit-image'] = 'skimage' | ||
# del PYTEST_HEADER_MODULES['h5py'] | ||
# except (NameError, KeyError): # NameError is needed to support Astropy < 1.0 | ||
# pass | ||
|
||
## Uncomment the following lines to display the version number of the | ||
## package rather than the version number of Astropy in the top line when | ||
## running the tests. | ||
# import os | ||
# | ||
## This is to figure out the package version, rather than | ||
## using Astropy's | ||
# try: | ||
# from .version import version | ||
# except ImportError: | ||
# version = 'dev' | ||
# | ||
# try: | ||
# packagename = os.path.basename(os.path.dirname(__file__)) | ||
# TESTED_VERSIONS[packagename] = version | ||
# except NameError: # Needed to support Astropy <= 1.0.0 | ||
# pass |
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
Empty file.
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,31 @@ | ||
[run] | ||
source = {packagename} | ||
omit = | ||
{packagename}/_astropy_init* | ||
{packagename}/conftest* | ||
{packagename}/cython_version* | ||
{packagename}/setup_package* | ||
{packagename}/*/setup_package* | ||
{packagename}/*/*/setup_package* | ||
{packagename}/tests/* | ||
{packagename}/*/tests/* | ||
{packagename}/*/*/tests/* | ||
{packagename}/version* | ||
|
||
[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} |
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,8 @@ | ||
# import os | ||
|
||
# If this package has tests data in the tests/data directory, add them to | ||
# the paths here, see commented example | ||
paths = [] #[os.path.join('data', '*fits')] | ||
|
||
def get_package_data(): | ||
return {'mrspoc.tests': paths} |
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 @@ | ||
import numpy as np | ||
|
||
from ..star import Star, Spot | ||
|
||
|
||
def test_col_methods(): | ||
""" | ||
python -c "from mrspoc.tests.test import test_col_methods as f; f()" | ||
""" | ||
|
||
star = Star() | ||
star.spots = [Spot(x=0.8, y=0.00, r=0.2)] | ||
|
||
x0, y0 = star._centroid_analytic() | ||
x1, y1 = star._centroid_numerical() | ||
|
||
diff = np.sqrt((x0 - x1)**2 + (y0 - y1)**2) | ||
assert diff < star.r / 100 |
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,57 @@ | ||
[build_sphinx] | ||
source-dir = docs | ||
build-dir = docs/_build | ||
all_files = 1 | ||
|
||
[build_docs] | ||
source-dir = docs | ||
build-dir = docs/_build | ||
all_files = 1 | ||
|
||
[upload_docs] | ||
upload-dir = docs/_build/html | ||
show-response = 1 | ||
|
||
[tool:pytest] | ||
minversion = 3.0 | ||
norecursedirs = build docs/_build | ||
doctest_plus = enabled | ||
addopts = -p no:warnings | ||
|
||
[ah_bootstrap] | ||
auto_use = True | ||
|
||
[pycodestyle] | ||
# E101 - mix of tabs and spaces | ||
# W191 - use of tabs | ||
# W291 - trailing whitespace | ||
# W292 - no newline at end of file | ||
# W293 - trailing whitespace | ||
# W391 - blank line at end of file | ||
# E111 - 4 spaces per indentation level | ||
# E112 - 4 spaces per indentation level | ||
# E113 - 4 spaces per indentation level | ||
# E901 - SyntaxError or IndentationError | ||
# E902 - IOError | ||
select = E101,W191,W291,W292,W293,W391,E111,E112,E113,E901,E902 | ||
exclude = extern,sphinx,*parsetab.py | ||
|
||
[metadata] | ||
package_name = mrspoc | ||
description = mrspoc | ||
long_description = 'M-dwarf Rotational Stellar Photocenter Offset Calculator' | ||
author = Brett Morris | ||
author_email = bmmorris@uw.edu | ||
license = MIT License | ||
url = https://github.com/bmorris3/mrspoc | ||
edit_on_github = True | ||
github_project = bmorris3/mrspoc | ||
# install_requires should be formatted as a comma-separated list, e.g.: | ||
# install_requires = astropy, scipy, matplotlib | ||
install_requires = numpy, astropy, matplotlib, scipy, sphinx-automodapi | ||
# version should be PEP386 compatible (http://www.python.org/dev/peps/pep-0386) | ||
version = 0.0.dev0 | ||
|
||
[entry_points] | ||
|
||
|
Oops, something went wrong.