Skip to content
  • Sponsor matplotlib/matplotlib

  • Notifications You must be signed in to change notification settings
  • Fork 7.9k

e.g. and i.e. look nicer than eg and ie #3748

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 4 commits into from
Nov 1, 2014

Conversation

yuvallanger
Copy link
Contributor

Adding many more eg to e.g. replacements.

I ran:

 find agg24/ CXX CXX5 doc examples/ lib/ LICENSE/ release/ src/ test/ ttconv/ unit/ -type f -exec sed -i 's/\beg\b/e.g./g' {} \;

and then manually filtered for errors.

@tacaswell
Copy link
Member

Didn't we do a massive amount of work recently to standardize the other way?

@yuvallanger
Copy link
Contributor Author

I'm terribly sorry. I should have asked before doing anything.

@tacaswell
Copy link
Member

@yuvallanger No worries, I'm sorry you did a bunch of redundent work!

See: #1916 (original issues #1423) and we standardized on 'e.g.'. I suspect that is the reason that the PR won't merge cleanly.

@WeatherGod
Copy link
Member

Could probably use similar work for things like "ie" to "i.e."

On Sat, Nov 1, 2014 at 11:26 AM, Thomas A Caswell notifications@github.com
wrote:

@yuvallanger https://github.com/yuvallanger No worries, I'm sorry you
did a bunch of redundent work!

See: #1916 #1916 (original
issues #1423 #1423) and
we standardized on 'e.g.'. I suspect that is the reason that the PR won't
merge cleanly.


Reply to this email directly or view it on GitHub
#3748 (comment)
.

@yuvallanger
Copy link
Contributor Author

@tacaswell The reason is that I used v1.0.x-maint as the guidelines suggested. @WeatherGod said I should ask for a pull request into v1.4.x instead, but I forgot I used v1.0.x-maint as my.. hmm.. what is the technically correct term here? Source branch? Base branch?

Anyways, it's my fault alone.

@tacaswell
Copy link
Member

I would suggest checking out the latest branch (either 1.4.x or master, lean towards v1.4.x) and re-run that command.

And where do the docs suggest working against 1.0.x-maint? That should not there (that branch was last touched in 2011)...

@yuvallanger
Copy link
Contributor Author

CONTRIBUTING.md leads to:

http://matplotlib.org/devel/coding_guide.html

where it says: In general, simple bugfixes that are unlikely to introduce new bugs of their own should be merged onto the maintenance branch.

I figured that means I should PR into the branch saying maint...

@yuvallanger
Copy link
Contributor Author

Will it be alright if I follow #1916 and replace eg with e.g., instead of e.g. and also place a comma after all bare e.g.? Is it possible to follow-up directly in #1916?

@tacaswell
Copy link
Member

Ah, fair enough. That documentation should be clarified and the old branches should probably be removed.

I would strongly suggest working off of 1.4.x (which is now the 'maintenance branch') as other PRs could have changed the same doc strings between now and where ever you base you edits from which will result is (really hard to resolve) conflicts when we try to merge the changes into 1.4.x.

Used:

```bash
find * -type f -exec sed -i 's/\beg,/e.g.,/g' {} \;
```
Used:

```bash
find * -type f -exec sed -i 's/\beg\b/e.g.,/g' {} \;
```
@yuvallanger
Copy link
Contributor Author

That's it. I hope you like it. I don't know much about style guidelines, so I won't change anything further.

I should probably use this same PR for the ie to i.e..

Used:

```bash
find * -type f -exec sed -i 's/\bie,/i.e.,/g' {} \;
```
@yuvallanger yuvallanger mentioned this pull request Nov 1, 2014
@yuvallanger yuvallanger changed the title e.g. looks nicer than eg e.g. and i.e. look nicer than eg and ie Nov 1, 2014
@tacaswell
Copy link
Member

======================================================================

FAIL: matplotlib.tests.test_coding_standards.test_pep8_conformance

----------------------------------------------------------------------

Traceback (most recent call last):

File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/nose/case.py", line 197, in runTest

self.test(*self.arg)

File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7-linux-x86_64.egg/matplotlib/tests/test_coding_standards.py", line 252, in test_pep8_conformance

assert_pep8_conformance()

File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7-linux-x86_64.egg/matplotlib/tests/test_coding_standards.py", line 236, in assert_pep8_conformance

assert_equal(result.total_errors, 0, msg)

AssertionError: Found code syntax errors (and warnings):

/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7-linux-x86_64.egg/matplotlib/axes/_axes.py:5423:80: E501 line too long (80 > 79 characters)

----------------------------------------------------------------------

Adding the dots apparently made one of the lines too long, can you please fix that?

@@ -5420,7 +5420,7 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
normed : boolean, optional, default: False
If `True`, the first element of the return tuple will
be the counts normalized to form a probability density, i.e.,
``n/(len(x)`dbin)``, ie the integral of the histogram will sum to
``n/(len(x)`dbin)``, i.e., the integral of the histogram will sum to
Copy link
Member

Choose a reason for hiding this comment

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

This is the line that is now too long.

Used:

```bash
find * -type f -exec sed -i 's/\bie\b/i.e.,/g' {} \;
```

Restructuring >80 character docstring
tacaswell added a commit that referenced this pull request Nov 1, 2014
DOC : `e.g.` and `i.e.` look nicer than `eg` and `ie`
@tacaswell tacaswell merged commit 7722bab into matplotlib:v1.4.x Nov 1, 2014
@tacaswell
Copy link
Member

Thanks!

Congratulations on your first mpl commits (I think).

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

4 participants