Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fixes #10501. python3 support and pep8 in jpl_units #10618

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

Merged
merged 1 commit into from
Mar 5, 2018

Conversation

TD22057
Copy link
Contributor

@TD22057 TD22057 commented Feb 27, 2018

Fix for #10501 - adds rich comparison methods to all classes for python3 support. Also updated all the code to be pep8/flake8 compliant (so the diff looks enormous because of indentation updates on virtually every line).

Tests cases that use jpl_units were run function normally.

@tacaswell
Copy link
Member

@t20100 What would need to be done for these tests to be run by travis?

@tacaswell tacaswell added this to the v2.2.1 milestone Feb 27, 2018
@TD22057
Copy link
Contributor Author

TD22057 commented Feb 27, 2018

Sorry - I don't understand. These aren't test cases, they're utilities to allow tests w/ units to be written.

@TD22057 TD22057 changed the title Fixes #10501. Fixed python3 support and converted to pep8 format in … Fixes #10501. python3 support and pep8 in jpl_units Feb 28, 2018
Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

I think this is all fine. Theres nothing here but a bunch fo PEP8 fixes and a couple py3 things. Were these passing PEP8 before because there were suppressed errors? If so, should the test config file be edited?

@timhoffm
Copy link
Member

timhoffm commented Mar 4, 2018

Just a short feedback: I wanted to review this PR, but turned away because it's too much effort.

It would be better for review to have the changes separated. There's a lot of whitespace change and hidden in between some functional and py3 changes. At least the github viewer does not really show the difference. Some larger whitespace changes are interpreted as completely new text, and I don't want to recheck everyone of them for a possible py3 or functional change.

@efiring
Copy link
Member

efiring commented Mar 4, 2018

This is a special case. As soon as the merge conflict is resolved, I think we should go ahead and merge this.

@QuLogic
Copy link
Member

QuLogic commented Mar 4, 2018

@timhoffm Have a look at then diff without (most) whitespace changes.

@jklymak yes the exceptions should be removed from pytest.ini.

@timhoffm
Copy link
Member

timhoffm commented Mar 4, 2018

@QuLogic Thanks, I've learned something new.

@TD22057
Copy link
Contributor Author

TD22057 commented Mar 5, 2018

Sorry about that. I tried to update my local branch with a rebase and resolve the conflicts and somehow I ended up with a mess showing all the diffs from the original branch point. Let me know what's the best way to resolve this (deleting it and starting over is the only way I know to easily fix this) - my git merge/update skills are clearly lacking...

@jklymak
Copy link
Member

jklymak commented Mar 5, 2018

Hah, I just did that yesterday too:

  1. copy the files you modified somewhere else (hopefully finite #)
  2. rename the branch you messed up (i.e. git branch -m py3_jpl_units_broke)
  3. make a new branch from upstream/master with the same name as the old one (py3_jpl_units)
  4. copy the modified files back onto the branch.
  5. commit all the modified files (you shouldn't need to rebase onto master because you just pulled from master).
  6. push to origin

The trick to rebasing to master is to squash all your own commits first and then rebase onto master.

Hope that helps - feel free to ask if any of the steps not clear...

PS: its possible some of the changes on master were to files you are trying to modify. If thats the case things get a little more difficult...

@TD22057
Copy link
Contributor Author

TD22057 commented Mar 5, 2018

@jklymak Sorry - that didn't seem to work. There were changes on the same files - that's why there were conflicts in the first place. I tried what you suggested and it tells me the push was rejected it's behind the remote branch (I'm assuming this is because I pushed all those commits so they are already there).

So... perhaps I should just close this and submit two different pull requests, one for the original cmp update and one to update the flake8 warnings. Sound ok?

@jklymak
Copy link
Member

jklymak commented Mar 5, 2018

Well, try a force push first!

git push origin  py3_jpl_units --force

You can't break anything at this point 😉

@jklymak jklymak merged commit 2898bfa into matplotlib:master Mar 5, 2018
@lumberbot-app
Copy link

lumberbot-app bot commented Mar 5, 2018

There seem to be a conflict, please backport manually

@TD22057 TD22057 deleted the py3_jpl_units branch March 5, 2018 22:04
@dstansby
Copy link
Member

Does this still want to be backported to the 2.2.x branch? My guess would be no since it doesn't look like it fixes a regression.

@dstansby dstansby modified the milestones: v2.2.1, v3.0 May 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants