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

Alma deprecation cleanup #2309

Merged
merged 9 commits into from Mar 22, 2022
Merged

Conversation

bsipocz
Copy link
Member

@bsipocz bsipocz commented Feb 25, 2022

I was run into these very old deprecations from prior using pyvo while investigating an upstream bug report, and couldn't resist to do a bit of cleanup.

@andamian - are you OK with the change of making kwargs kwarg only? I needed that for the methods where some of the deprecated ones got removed, and then had a bold thought and did it for all methods.

@bsipocz bsipocz added this to the v0.4.6 milestone Feb 25, 2022
@bsipocz
Copy link
Member Author

bsipocz commented Feb 25, 2022

(Remote tests run forever, I still have to double-check whether this doesn't introduce any more of the to fail, so hold back from merging)

@codecov
Copy link

codecov bot commented Feb 25, 2022

Codecov Report

Merging #2309 (f71fbb7) into main (60db44d) will increase coverage by 0.10%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2309      +/-   ##
==========================================
+ Coverage   62.97%   63.07%   +0.10%     
==========================================
  Files         131      131              
  Lines       17073    17031      -42     
==========================================
- Hits        10752    10743       -9     
+ Misses       6321     6288      -33     
Impacted Files Coverage Δ
astroquery/alma/core.py 42.80% <100.00%> (+1.63%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@bsipocz bsipocz marked this pull request as draft February 25, 2022 06:50
@bsipocz
Copy link
Member Author

bsipocz commented Feb 25, 2022

Apparently, the remote tests are full of alma.stage_data lines, so this will need a bit more time to get ready.

@bsipocz bsipocz modified the milestones: v0.4.6, v0.4.7 Mar 18, 2022
@pep8speaks
Copy link

pep8speaks commented Mar 19, 2022

Hello @bsipocz! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2022-03-22 20:22:28 UTC

@bsipocz bsipocz marked this pull request as ready for review March 19, 2022 05:10
@@ -372,11 +272,11 @@ def test_doc_example(self, temp_dir, alma):

assert X30.sum() == 4 # Jul 13, 2020
assert X31.sum() == 4 # Jul 13, 2020
mous1 = alma.stage_data('uid://A001/X11f/X30')
mous1 = alma.get_data_info('uid://A001/X11f/X30')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now that the narrative documentation is tested, I think this whole test function can be removed. What do you think @keflavich?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the stage_data function? yes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've commented on an awkward line, I meant to remove the whole test_doc_example function as hopefully of that is already covered in the narrative docs itself? (It's not verbatim as I see, e.g. the sizes are not checked, but if you think that part of the test is useful this test function may need to be renamed and scoped down?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh... I don't know. If the tests are working, is there any harm in having them duplicated in the docs and the tests? But if it really is a duplication I have no objection to removing the copy in the test file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alma tests are already among the slowest, so the only "harm" in running them multiple times is that some of the remote data tests run long, and it all adds up (this one is one of the slowest).
Anyway, it points beyond this PR so I leave this one alone for now.

@@ -619,7 +519,7 @@ def test_staging_postfeb2020(alma):
@pytest.mark.remote_data
@pytest.mark.skip('Not working for now - Investigating')
def test_staging_uptofeb2020(alma):
tbl = alma.stage_data('uid://A001/X121/X4ba')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we still need this test function and the previous, test_staging_postfeb2020? 2 year have passed since that API change, I suspect these can now be removed.

@bsipocz bsipocz modified the milestones: v0.4.7, v0.4.6 Mar 22, 2022
@bsipocz
Copy link
Member Author

bsipocz commented Mar 22, 2022

Remote tests all pass, so I'm going ahead and merge this to get this into the current release.

@bsipocz bsipocz merged commit d901a3c into astropy:main Mar 22, 2022
@bsipocz bsipocz mentioned this pull request Nov 26, 2022
62 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants