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

Added a helper function for testing equality/closeness of longitudes #3804

Merged
merged 1 commit into from Feb 18, 2020

Conversation

ayshih
Copy link
Member

@ayshih ayshih commented Feb 14, 2020

Longitude testing is a little tricky because of the wrapping. This PR creates a new function to use in tests to check for the equality/closeness of longitudes.

Should fix #3801

@pep8speaks
Copy link

pep8speaks commented Feb 14, 2020

Hello @ayshih! 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 2020-02-18 02:56:42 UTC

@ayshih ayshih added coordinates Affects the coordinates submodule Tests Affects tests in some measure labels Feb 14, 2020
@ayshih ayshih marked this pull request as ready for review February 14, 2020 20:28
@ayshih ayshih requested a review from a team as a code owner February 14, 2020 20:28
@dstansby
Copy link
Member

I think this should probably go upstream to astropy, given it's non SunPy specific.

changelog/3804.trivial.rst Outdated Show resolved Hide resolved
@wtbarnes
Copy link
Member

I don't really know what the milestone should be here?

@nabobalis nabobalis modified the milestones: 2.0, 1.0.8 Feb 18, 2020
@Cadair Cadair merged commit fa88109 into sunpy:master Feb 18, 2020
@sunpy-backport
Copy link

The backport to 1.0 failed:

Commits ["d111b51cc2ca5f74a18b099840dbb698dabfcdc0"] could not be cherry-picked on top of 1.0

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub.
git fetch
# Create new working tree.
git worktree add .worktrees/backport 1.0
# Navigate to the new directory.
cd .worktrees/backport
# Cherry-pick all the commits of this pull request and resolve the likely conflicts.
git cherry-pick d111b51cc2ca5f74a18b099840dbb698dabfcdc0
# Create a new branch with these backported commits.
git checkout -b backport-3804-to-1.0
# Push it to GitHub.
git push --set-upstream origin backport-3804-to-1.0
# Go back to the original working tree.
cd ../..
# Delete the working tree.
git worktree remove .worktrees/backport

Then, create a pull request where the base branch is 1.0 and the compare/head branch is backport-3804-to-1.0.

@sunpy-backport
Copy link

The backport to 1.1 failed:

Commits ["d111b51cc2ca5f74a18b099840dbb698dabfcdc0"] could not be cherry-picked on top of 1.1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub.
git fetch
# Create new working tree.
git worktree add .worktrees/backport 1.1
# Navigate to the new directory.
cd .worktrees/backport
# Cherry-pick all the commits of this pull request and resolve the likely conflicts.
git cherry-pick d111b51cc2ca5f74a18b099840dbb698dabfcdc0
# Create a new branch with these backported commits.
git checkout -b backport-3804-to-1.1
# Push it to GitHub.
git push --set-upstream origin backport-3804-to-1.1
# Go back to the original working tree.
cd ../..
# Delete the working tree.
git worktree remove .worktrees/backport

Then, create a pull request where the base branch is 1.1 and the compare/head branch is backport-3804-to-1.1.

@nabobalis nabobalis added the Still Needs Manual Backport This PR needs manually backporting label Feb 18, 2020
@ayshih ayshih changed the title Added a convenience function for testing closeness of longitudes Added a helper function for testing equality/closeness of longitudes Feb 18, 2020
@Cadair Cadair removed the Still Needs Manual Backport This PR needs manually backporting label Feb 18, 2020
@ayshih ayshih deleted the longitude_test branch March 12, 2020 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coordinates Affects the coordinates submodule Tests Affects tests in some measure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[1.1.1] test_transform failure
6 participants