diff --git a/docs/mivot/index.rst b/docs/mivot/index.rst index 6a24d0a1c..c170588f6 100644 --- a/docs/mivot/index.rst +++ b/docs/mivot/index.rst @@ -37,15 +37,13 @@ The API allows you to obtain a model view on the last read data row, this usage >>> from pyvo.utils.prototype import activate_features >>> activate_features('MIVOT') >>> votable = get_pkg_data_filename("data/simple-annotation-votable.xml", package="pyvo.mivot.tests") - >>> if check_astropy_version(): + >>> if check_astropy_version(): # doctest: +SKIP ... m_viewer = ModelViewer(votable) ... row_view = m_viewer.get_next_row_view() ... print(row_view.longitude.value) ... print(row_view.Coordinate_coosys.PhysicalCoordSys_frame.spaceRefFrame.value) - 10.0 - ICRS - ... else: - Astropy version 5.3.4 is below the required version 6.0 for the use of MIVOT. + 10.0 + ICRS The model view is a dynamically generated Python object whose field names are derived from @@ -55,7 +53,7 @@ Example for epoch propagation ----------------------------- .. doctest-remote-data:: >>> if check_astropy_version(): - ... with ModelViewer(votable) as m_viewer: + ... with ModelViewer(votable) as m_viewer: # doctest: +SKIP ... row_view = m_viewer.get_next_row_view() ... past_ra, past_dec = row_view.apply_space_motion(dt=-42 * u.year) ... future_ra, future_dec = row_view.apply_space_motion(dt=2 * u.year) @@ -63,8 +61,6 @@ Example for epoch propagation ... print("future_ra, future_dec :", row_view.apply_space_motion(dt=2 * u.year)) past_ra, past_dec : (, ) future_ra, future_dec : (, ) - ... else: - Astropy version 5.3.4 is below the required version 6.0 for the use of MIVOT. Implementation ============== diff --git a/pyvo/mivot/tests/test_model_viewer.py b/pyvo/mivot/tests/test_model_viewer.py index b2d452afa..d19adb7b2 100644 --- a/pyvo/mivot/tests/test_model_viewer.py +++ b/pyvo/mivot/tests/test_model_viewer.py @@ -102,8 +102,8 @@ def test_check_version(data_path): match=f"Astropy version {astropy_version.version} " f"is below the required version 6.0 for the use of MIVOT."): ModelViewer(votable_path=votable) - - + + @pytest.fixture def m_viewer(data_path): if check_astropy_version() is False: diff --git a/pyvo/mivot/tests/test_model_viewer_layer1.py b/pyvo/mivot/tests/test_model_viewer_layer1.py index d9f3feb35..b8ff12630 100644 --- a/pyvo/mivot/tests/test_model_viewer_layer1.py +++ b/pyvo/mivot/tests/test_model_viewer_layer1.py @@ -8,12 +8,9 @@ from pyvo.mivot.version_checker import check_astropy_version from pyvo.mivot.viewer.model_viewer import ModelViewer from pyvo.utils.prototype import activate_features -from pyvo.mivot.utils.exceptions import AstropyVersionException -from astropy import version as astropy_version activate_features('MIVOT') - def test_model_viewer_layer1(m_viewer): if check_astropy_version() is False: pytest.skip("MIVOT test skipped because of the astropy version.") diff --git a/pyvo/mivot/version_checker.py b/pyvo/mivot/version_checker.py index fa94f6b8c..188a500ee 100644 --- a/pyvo/mivot/version_checker.py +++ b/pyvo/mivot/version_checker.py @@ -1,4 +1,3 @@ -from pyvo.mivot.utils.exceptions import AstropyVersionException from astropy import version as astropy_version