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

Drop parfive less than 2 #6942

Merged
merged 4 commits into from
Apr 21, 2023
Merged

Drop parfive less than 2 #6942

merged 4 commits into from
Apr 21, 2023

Conversation

nabobalis
Copy link
Contributor

@nabobalis nabobalis commented Apr 20, 2023

Also a hack for adding the words CI-test to the user agent headers for our tests.

Fixes #6308
Fixes #6940

I adjusted the previous changelog for updated versions instead of a new one.

@nabobalis nabobalis added net Affects the net submodule Whats New? Needs a section added to the current Whats New? page. No Backport A PR that isn't to be backported to any release branch. (To be used as a flag to other maintainers) labels Apr 20, 2023
@nabobalis nabobalis requested a review from a team as a code owner April 20, 2023 17:21
@nabobalis nabobalis added the No Changelog Entry Needed Skip any changelog checks. label Apr 20, 2023
Comment on lines 117 to 124
@pytest.fixture(scope='session', autouse=True)
def parfive_header_test(request):
"""
Add a keyword to tell parfive this is a test run.
"""
os.environ["PARFIVE_SUNPY_TESTS"] = "True"
yield
del os.environ["PARFIVE_SUNPY_TESTS"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was not sure how to do this, so I did this as it was quick.

Copy link
Member

Choose a reason for hiding this comment

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

Seems legit to me 👍

Copy link
Member

Choose a reason for hiding this comment

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

Yeah this seems good, but why don't we make this a generic environment var for being in our test suite? We might have other non-parfive uses for it in the future?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can do that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was not sure what to call it, so I made one up.

Copy link
Member

@dstansby dstansby left a comment

Choose a reason for hiding this comment

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

  • The oldestdeps version pin needs updating in tox.ini
  • There should be a note in the changelog and in the what's new that says something like "We are aware the change in the parfive minimum version is a release earlier than our dependency policy allows for, but due to significant issues that parfive v2 solves we have decided to bump it now"
  • Can you explain a bit more about why you've tweaked the user agent for the tests?

@@ -3,6 +3,7 @@ The minimum required versions of several core dependencies have been updated:
- Python 3.9
- astropy 5.0.1
- numpy 1.21.0
- parfive 2.0.0
Copy link
Member

Choose a reason for hiding this comment

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

This should go in a new changelog entry, so it's linked with this PR and not the one corresponding to this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

docs/whatsnew/5.0.rst Outdated Show resolved Hide resolved
sunpy/util/parfive_helpers.py Outdated Show resolved Hide resolved
Comment on lines 117 to 124
@pytest.fixture(scope='session', autouse=True)
def parfive_header_test(request):
"""
Add a keyword to tell parfive this is a test run.
"""
os.environ["PARFIVE_SUNPY_TESTS"] = "True"
yield
del os.environ["PARFIVE_SUNPY_TESTS"]
Copy link
Member

Choose a reason for hiding this comment

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

Seems legit to me 👍

@nabobalis nabobalis requested a review from dstansby April 20, 2023 19:49
@nabobalis nabobalis added this to the 5.0.0 milestone Apr 20, 2023
@nabobalis
Copy link
Contributor Author

  • Can you explain a bit more about why you've tweaked the user agent for the tests?

The motivation is to help the VSO or other providers to be able to see if requests coming from sunpy come either from our CI or actual users.

This is used to be more of a problem back in the day when we ran a larger online test suite but I think it would still be nice for data providers to be able to parse logs and know if our test suite is causing a problem or if its users.

@dstansby dstansby requested a review from Cadair April 21, 2023 07:11
@Cadair Cadair added Merge When CI Passes Hit that merge button when it's all green! and removed No Changelog Entry Needed Skip any changelog checks. labels Apr 21, 2023
@nabobalis nabobalis merged commit a434f4f into sunpy:main Apr 21, 2023
@nabobalis nabobalis deleted the parfive branch April 21, 2023 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merge When CI Passes Hit that merge button when it's all green! net Affects the net submodule No Backport A PR that isn't to be backported to any release branch. (To be used as a flag to other maintainers) Whats New? Needs a section added to the current Whats New? page.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drop parfive < 2 Customise our user agent on CI
3 participants