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

Migrate to hypothesis.strategies.datetimes #2368

Merged
merged 5 commits into from
Jan 24, 2018
Merged

Conversation

himanshukgp
Copy link
Contributor

Regarding #2275
Made required changes in sunpy/net/dataretriever/tests/test_eve.py

@pep8speaks
Copy link

pep8speaks commented Dec 12, 2017

Hello @himanshukgp! Thanks for updating the PR.

Line 24:101: E501 line too long (116 > 100 characters)
Line 25:101: E501 line too long (115 > 100 characters)
Line 28:101: E501 line too long (116 > 100 characters)
Line 29:101: E501 line too long (116 > 100 characters)
Line 32:101: E501 line too long (116 > 100 characters)
Line 33:101: E501 line too long (116 > 100 characters)

Comment last updated on January 19, 2018 at 08:58 Hours UTC

@@ -84,7 +85,11 @@ def test_fido(query):


@pytest.mark.remote_data
@given(time_attr(time=datetimes(timezones=[], max_year=datetime.datetime.utcnow().year, min_year=2010)))
@given(time_attr(time=datetimes(
# timezones=None,
Copy link
Member

Choose a reason for hiding this comment

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

Why is this commented out? is it needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No it is not needed. I'll remove it in next commit.

@nabobalis
Copy link
Contributor

I think the import is used in other files/locations

@himanshukgp
Copy link
Contributor Author

himanshukgp commented Dec 13, 2017

Yes, I am working on it.
One is in sunpy/net/tests/strategies.py
Please mention if there are others.

@nabobalis
Copy link
Contributor

nabobalis commented Dec 13, 2017

I just fixed the eve test failure that occurred on my machine. Hopefully it will pass!

The change you made to the EVE urls are passed into a sunpy function as part of pytest, so those should not need to be modified.

@nabobalis
Copy link
Contributor

@himanshukgp Thanks for this! Sorry for getting a bits handsy on it, I was just thinking of adding this for our next release (0.8.3)!

@nabobalis nabobalis added Tests Affects tests in some measure net Affects the net submodule labels Dec 13, 2017
),
(TimeRange('2012/7/7', '2012/7/14'),
'http://lasp.colorado.edu/eve/data_access/evewebdata/quicklook/L0CS/SpWx/2012/20120707_EVE_L0CS_DIODES_1m.txt',
'http://lasp.colorado.edu/eve/data_access/evewebdata/quicklook/L0CS/SpWx/2012/20120714_EVE_L0CS_DIODES_1m.txt'
'http://lasp.colorado.edu/eve/data_access/evewebdata/quicklook/L0CS/SpWx/2012/20120714_EVE_L0CS_DIODES_1m.txt',
Copy link
Contributor

Choose a reason for hiding this comment

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

The extra commas I've added here probably need removing.

Copy link
Member

Choose a reason for hiding this comment

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

Commas at the end of a container don't add anything. They are though a good practice for version control if you think that list, tuple, ... will grow over time, so there's not 2 lines changed, but only 1 new addition each time. (Probably not the case here in the inner tuple, but would do on the outer list).

@nabobalis
Copy link
Contributor

So the test failure happens since the figure envs have a hard pinned hypothesis version that is before they changes the API.

So those versions need updating in the environment files under sunpy/tests/figure_*. It should not cause a hashchange.

@himanshukgp
Copy link
Contributor Author

himanshukgp commented Dec 19, 2017

hypothesis=3.42.1=py27_1
hypothesis=3.42.1=py35_1
I have updated hypothesis as above in two respective files in sunpy/tests/figure_*
Is this what you meant ?

@nabobalis
Copy link
Contributor

@himanshukgp Yes that would be exactly right.

@himanshukgp
Copy link
Contributor Author

himanshukgp commented Dec 21, 2017

@nabobalis I made the required changes but made some mistakes in the process. Please guide me on how should I move forward with this PR.
Thankyou

@nabobalis
Copy link
Contributor

Mistakes? The PR looks to be ready. I'll go over it again once more.

@himanshukgp
Copy link
Contributor Author

Same commits have been pushed twice here.

@nabobalis
Copy link
Contributor

We can clean that up when we merge it.

@nabobalis
Copy link
Contributor

nabobalis commented Jan 19, 2018

The CI failed due to doctests.

Thanks again for this @himanshukgp

@Cadair Cadair merged commit 5edc0e9 into sunpy:master Jan 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
net Affects the net submodule Tests Affects tests in some measure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants