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 deprecated call to astropy helpers. #554

Merged
merged 9 commits into from
Dec 4, 2024
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
6 changes: 6 additions & 0 deletions astroplan/tests/test_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ def test_galactic_plane_separation():

# in astropy before v1.0.4, a recursion error is triggered by this test
@pytest.mark.skipif('APY_LT104')
# astropy.coordinates.errors.NonRotationTransformationWarning
@pytest.mark.filterwarnings("ignore")
def test_sun_separation():
time = Time('2003-04-05 06:07:08')
apo = Observer.at_site("APO")
Expand All @@ -198,6 +200,8 @@ def test_sun_separation():
assert np.all(is_constraint_met == [False, True, True])


# astropy.coordinates.errors.NonRotationTransformationWarning
@pytest.mark.filterwarnings("ignore")
def test_moon_separation():
time = Time('2003-04-05 06:07:08')
apo = Observer.at_site("APO")
Expand Down Expand Up @@ -423,6 +427,8 @@ def test_rescale_minmax():


@pytest.mark.parametrize('constraint', constraint_tests)
# astropy.coordinates.errors.NonRotationTransformationWarning
@pytest.mark.filterwarnings("ignore")
def test_regression_shapes(constraint):
times = Time(["2015-08-28 03:30", "2015-09-05 10:30", "2015-09-15 18:35"])
targets = get_skycoord([FixedTarget(SkyCoord(350.7*u.deg, 18.4*u.deg)),
Expand Down
9 changes: 8 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ doctest_plus = enabled
text_file_format = rst
addopts = --doctest-rst --doctest-ignore-import-errors
norecursedirs = build docs/_build
filterwarnings =
error
ignore:numpy\.ndarray size changed:RuntimeWarning
ignore:numpy\.ufunc size changed:RuntimeWarning
# Can remove ignore when you bump astropy minversion high enough
ignore:distutils Version classes are deprecated:DeprecationWarning
# deprecated in Matplotlib 3.9 and will be removed in 3.11. Use plot instead.
ignore:The plot_date function was deprecated

[coverage:run]
omit =
Expand Down Expand Up @@ -88,4 +96,3 @@ max-line-length = 100
[pycodestyle]
exclude = _astropy_init.py,extern,__init__.py
max-line-length = 100

Loading