Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove defunct asdf.test method and use setuptools-scm to generate version file #943

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ pip-wheel-metadata

# Mac OSX
.DS_Store

# setuptools-scm generated version file
asdf/version.py
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
- Add ``edit`` subcommand to asdftool for efficient editing of
the YAML portion of an ASDF file. [#873, #922]

- Remove the ``asdf.test`` method and ``asdf.__githash__`` attribute. [#943]

2.7.3 (2021-02-25)
------------------

Expand Down
17 changes: 6 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -301,23 +301,18 @@ To run the unit tests from a source checkout of the repository:
$ pytest

It is also possible to run the test suite from an installed version of
the package. In a Python interpreter:
the package.

.. code:: python

import asdf
asdf.test()

Please note that the `astropy <https://github.com/astropy/astropy>`__
package must be installed to run the tests.
::
pip install asdf[tests]
pytest --pyargs asdf

It is also possible to run the tests using `tox
<https://tox.readthedocs.io/en/latest/>`__. It is first necessary to install
``tox`` and `tox-conda <https://github.com/tox-dev/tox-conda>`__:
<https://tox.readthedocs.io/en/latest/>`__.

::

$ pip install tox tox-conda
$ pip install tox

To list all available environments:

Expand Down
11 changes: 3 additions & 8 deletions asdf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,10 @@
Data Format (ASDF) files
"""

# Affiliated packages may add whatever they like to this file, but
# should keep this content at the top.
# ----------------------------------------------------------------------------
from ._internal_init import __version__, __githash__, test
# ----------------------------------------------------------------------------

__all__ = [
'AsdfFile', 'CustomType', 'AsdfExtension', 'Stream', 'open', 'test',
'AsdfFile', 'CustomType', 'AsdfExtension', 'Stream', 'open',
'commands', 'IntegerType', 'ExternalArrayReference', 'info', '__version__',
'__githash__', 'ValidationError', 'get_config', 'config_context',
'ValidationError', 'get_config', 'config_context',
]


Expand All @@ -25,5 +19,6 @@
from .tags.core.external_reference import ExternalArrayReference
from ._convenience import info
from .config import get_config, config_context
from .version import version as __version__

from jsonschema import ValidationError
102 changes: 0 additions & 102 deletions asdf/_internal_init.py

This file was deleted.

9 changes: 0 additions & 9 deletions asdf/version.py

This file was deleted.

3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python
import os
from setuptools import setup, find_packages


Expand All @@ -23,7 +24,7 @@
}

setup(
use_scm_version=True,
use_scm_version={"write_to": os.path.join("asdf", "version.py"), "write_to_template": 'version = "{version}"\n'},
packages=packages,
package_dir=package_dir,
package_data=package_data,
Expand Down