diff --git a/.readthedocs.yml b/.readthedocs.yml index 91be621..8b77653 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,10 +1,11 @@ version: 2 build: - image: latest + os: ubuntu-22.04 + tools: + python: "3.12" python: - version: 3.7 install: - method: pip path: . @@ -12,4 +13,6 @@ python: - docs - all +# Don't build any extra formats formats: [] + diff --git a/docs/index.rst b/docs/index.rst index 7af71f5..9737aa6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -165,7 +165,7 @@ fixes, code, or documentation (no git or GitHub experience necessary): * `Coding Guidelines `_ -* `Developer Documentation `_ +* `Developer Documentation `_ For the complete list of contributors please see the `dust_extinction contributors page on Github diff --git a/dust_extinction/__init__.py b/dust_extinction/__init__.py index 65b8d0e..b631664 100644 --- a/dust_extinction/__init__.py +++ b/dust_extinction/__init__.py @@ -1,9 +1,2 @@ -# 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 -# ---------------------------------------------------------------------------- - -__all__ = [] +# needed for tests +from .version import version as __version__ # noqa: F401 diff --git a/dust_extinction/_astropy_init.py b/dust_extinction/_astropy_init.py deleted file mode 100644 index 327db6c..0000000 --- a/dust_extinction/_astropy_init.py +++ /dev/null @@ -1,52 +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 - from warnings import warn - from astropy.config.configuration import ( - update_default_config, - ConfigurationDefaultMissingError, - ConfigurationDefaultMissingWarning) - - # 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'] - - # add these here so we only need to cleanup the namespace at the end - config_dir = None - - if not os.environ.get('ASTROPY_SKIP_CONFIG_UPDATE', False): - config_dir = os.path.dirname(__file__) - config_template = os.path.join(config_dir, __package__ + ".cfg") - if os.path.isfile(config_template): - try: - update_default_config( - __package__, config_dir, version=__version__) - except TypeError as orig_error: - try: - update_default_config(__package__, config_dir) - except ConfigurationDefaultMissingError as e: - wmsg = (e.args[0] - + " Cannot install default profile. If you are " - "importing from source, this is expected.") - warn(ConfigurationDefaultMissingWarning(wmsg)) - del e - except Exception: - raise orig_error