forked from astropy/pyvo
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Adrian Damian
authored and
Adrian Damian
committed
Jan 18, 2022
1 parent
b830403
commit 193b635
Showing
13 changed files
with
235 additions
and
356 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
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 |
---|---|---|
|
@@ -42,6 +42,7 @@ sdist | |
develop-eggs | ||
.installed.cfg | ||
distribute-*.tar.gz | ||
pip-wheel-metadata | ||
|
||
# Other | ||
.cache | ||
|
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 was deleted.
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,4 +1,10 @@ | ||
[tool.astropy-bot] | ||
[build-system] | ||
|
||
[tool.astropy-bot.changelog_checker] | ||
filename = "CHANGES.rst" | ||
requires = ["setuptools", | ||
"setuptools_scm", | ||
"wheel", | ||
"extension-helpers", | ||
"oldest-supported-numpy", | ||
"cython==0.29.14"] | ||
|
||
build-backend = 'setuptools.build_meta' |
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,29 +1,13 @@ | ||
# Licensed under a 3-clause BSD style license - see LICENSE.rst | ||
import os | ||
|
||
__all__ = ['__version__', '__githash__'] | ||
|
||
# this indicates whether or not we are in the package's setup.py | ||
try: | ||
_ASTROPY_SETUP_ | ||
except NameError: | ||
import builtins | ||
builtins._ASTROPY_SETUP_ = False | ||
__all__ = ['__version__', 'test'] | ||
|
||
try: | ||
from .version import version as __version__ | ||
except ImportError: | ||
__version__ = '' | ||
try: | ||
from .version import githash as __githash__ | ||
except ImportError: | ||
__githash__ = '' | ||
|
||
|
||
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'] | ||
# Create the test function for self test | ||
from astropy.tests.runner import TestRunner | ||
test = TestRunner.make_test_runner_in(os.path.dirname(__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 |
---|---|---|
@@ -1,53 +1,59 @@ | ||
# Licensed under a 3-clause BSD style license - see LICENSE.rst | ||
import os | ||
from distutils.version import LooseVersion | ||
# 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.version import version as astropy_version | ||
|
||
if LooseVersion(astropy_version) < LooseVersion('2.0.3'): | ||
# Astropy is not compatible with the standalone plugins prior this while | ||
# astroquery requires them, so we need this workaround. This will mess | ||
# up the test header, but everything else will work. | ||
from astropy.tests.pytest_plugins import (PYTEST_HEADER_MODULES, | ||
enable_deprecations_as_exceptions, | ||
TESTED_VERSIONS) | ||
elif astropy_version < '3.0': | ||
# With older versions of Astropy, we actually need to import the pytest | ||
# plugins themselves in order to make them discoverable by pytest. | ||
from astropy.tests.pytest_plugins import * | ||
else: | ||
# As of Astropy 3.0, the pytest plugins provided by Astropy are | ||
# automatically made available when Astropy is installed. This means it's | ||
# not necessary to import them here, but we still need to import global | ||
# variables that are used for configuration. | ||
from pytest_astropy_header.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS | ||
|
||
from astropy.tests.helper import enable_deprecations_as_exceptions | ||
"""Configure Test Suite. | ||
# Add astropy to test header information and remove unused packages. | ||
# Pytest header customisation was introduced in astropy 1.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 | ||
`pyvo.test()`. | ||
try: | ||
PYTEST_HEADER_MODULES['Astropy'] = 'astropy' | ||
del PYTEST_HEADER_MODULES['h5py'] | ||
del PYTEST_HEADER_MODULES['Scipy'] | ||
del PYTEST_HEADER_MODULES['Matplotlib'] | ||
del PYTEST_HEADER_MODULES['Pandas'] | ||
except (NameError, KeyError): | ||
pass | ||
""" | ||
|
||
enable_deprecations_as_exceptions() | ||
|
||
|
||
|
||
# This is to figure out the affiliated package version, rather than | ||
# using Astropy's | ||
from .version import version, astropy_helpers_version | ||
import os | ||
|
||
from astropy.version import version as astropy_version | ||
|
||
packagename = os.path.basename(os.path.dirname(__file__)) | ||
TESTED_VERSIONS[packagename] = version | ||
TESTED_VERSIONS['astropy_helpers'] = astropy_helpers_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): | ||
"""Configure Pytest with Astropy. | ||
Parameters | ||
---------- | ||
config : pytest configuration | ||
""" | ||
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() |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.