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

Clarify Axes.hexbin *extent* docstring #6842

Merged
merged 1 commit into from Aug 2, 2016

Conversation

LindyBalboa
Copy link
Contributor

Without looking at the source, it was unclear that extent expects the
limits to be given as powers of ten if the axis scale is set to 'log'.
E.g., using 3 to represent 1000.

Also went through the file and standardized quote usage.

  • '': for use around parameters
  • "": for use around sentences

Resolves: #6479

@unpack_labeled_data(replace_names=["y", "x1", "x2", "where"],
label_namer=None)
@unpack_labeled_data(replace_names=['y', 'x1', 'x2', 'where'],
label_namer=none)
Copy link
Member

Choose a reason for hiding this comment

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

Is this working?

@LindyBalboa
Copy link
Contributor Author

I noticed the None/none variance in several places, but didn't think I touched any of them. And you are right, somehow I missed that last one. I will look into the None/none issue and fix that quote tomorrow.

I knew my first PR was going to have some silly mistakes!

@tacaswell
Copy link
Member

Looks like there are a bunch of pep8 whitespace related issues.

======================================================================
FAIL: matplotlib.tests.test_coding_standards.test_pep8_conformance_installed_files
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python3.5/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/travis/build/matplotlib/matplotlib/lib/matplotlib/tests/test_coding_standards.py", line 244, in test_pep8_conformance_installed_files
    expected_bad_files=expected_bad_files)
  File "/home/travis/build/matplotlib/matplotlib/lib/matplotlib/tests/test_coding_standards.py", line 143, in assert_pep8_conformance
    assert_equal(result.total_errors, 0, msg)
AssertionError: 7 != 0 : Found code syntax errors (and warnings):
/home/travis/build/matplotlib/matplotlib/lib/matplotlib/axes/_axes.py:87:72: E502 the backslash is redundant between brackets
/home/travis/build/matplotlib/matplotlib/lib/matplotlib/axes/_axes.py:88:75: E502 the backslash is redundant between brackets
/home/travis/build/matplotlib/matplotlib/lib/matplotlib/axes/_axes.py:359:76: W291 trailing whitespace
/home/travis/build/matplotlib/matplotlib/lib/matplotlib/axes/_axes.py:2815:68: W291 trailing whitespace
/home/travis/build/matplotlib/matplotlib/lib/matplotlib/axes/_axes.py:2816:69: W291 trailing whitespace
/home/travis/build/matplotlib/matplotlib/lib/matplotlib/axes/_axes.py:4133:65: W291 trailing whitespace
/home/travis/build/matplotlib/matplotlib/lib/matplotlib/axes/_axes.py:4134:63: W291 trailing whitespace

the enforcement of pep8/pycodestyle is annoying, but long term it is very helpful in a codebase with many people touching the code.

else:
raise ValueError("Using arbitrary long args with data is not "
"supported due to ambiguity of arguments.\nUse "
raise ValueError("Using arbitrary long args with data is not " \
Copy link
Member

Choose a reason for hiding this comment

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

remove the \

@tacaswell tacaswell modified the milestones: 2.1 (next point release), 2.0.1 (next bug fix release) Jul 28, 2016
based on *gridsize*, *x*, *y*, *xscale* and *yscale*.

If *xscale* or *yscale* is set to 'log', the limit is
expected as a power of 10. E.g. for x-limits of 1 and
Copy link
Member

Choose a reason for hiding this comment

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

🚲 🏠 Should this be '..the limits are the power to raise 10 to to compute the range of the bins.'? I would read 'expected as a power of 10' to mean the inputs must be of the form [10, 100, 1000, ...].

@tacaswell
Copy link
Member

The documentation changes seem very good, however it is greatly obscured by the changes to the quotes.

Would it be possible to separate those two sets of changes?

Without looking at the source, it was unclear that *extent* expects
the limites to be given as exponents of powers of 10 if the axis
scale is set to 'log'. E.g., using 3 to represent 1000.

Removed superfluous style change commits. Will open separate pull
request for that.

Resolves: matplotlib#6479
@LindyBalboa
Copy link
Contributor Author

This was definitely a learning experience. I had to learn a lot about git, virtual environments, building/installing, testing. Yowza. And I definitely learned the importance of splitting up PRs. Thanks for the patience guys.

@tacaswell
Copy link
Member

@LindyBalboa Everyone starts someplace! Sorry the learning curve was steep.

@tacaswell tacaswell merged commit af87fb4 into matplotlib:master Aug 2, 2016
tacaswell added a commit that referenced this pull request Aug 2, 2016
DOC: Clarify Axes.hexbin *extent* docstring
@tacaswell
Copy link
Member

backported to v2.x as 2811640

@tacaswell
Copy link
Member

@LindyBalboa Thank you (and thank you for going through the learning curve!)

Documentation is drastically undervalued and we very much appreciate your work on this.

I think this is your first contribution to mpl. Congratulation 🎉 and hopefully we will hear from you again soon!

@QuLogic QuLogic modified the milestones: 2.0 (style change major release), 2.0.1 (next bug fix release) Aug 2, 2016
@LindyBalboa LindyBalboa deleted the fix_issue_6479 branch August 2, 2016 08:37
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

5 participants