Skip to content

Doc prod #3079

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 3 commits into from
Feb 18, 2021
Merged

Doc prod #3079

merged 3 commits into from
Feb 18, 2021

Conversation

c-chaitanya
Copy link
Contributor

In continuation with the previous pull request #3073, I have fixed the iteration logic of my "spelling mistakes detection" script to iterate over all directories and its subdirectories. Fixing a few more documents which were missed in the previous sweep. I guess all documents are completely covered.

For my next step I'm modifying my script to fix docstrings within python files. The regex to extract comments between """ """ is in place but not for ''' ''' and # ...

Let me know if the pull request for docstring correction within python files goes to doc-prod or master

@@ -439,7 +439,7 @@ section [#1969](https://github.com/plotly/plotly.py/pull/1969).
- The width of a figure produced by the `create_gantt` figure factory now resizes responsively ([#1724](https://github.com/plotly/plotly.py/pull/1724))

### Fixed
- The name of the steps property of `graph_objects.indicator.Guage` has been renamed from `stepss` to `steps`
- The name of the steps property of `graph_objects.indicator.Gauge` has been renamed from `stepss` to `steps`
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm very impressed that the spell-checking finds this mistake but ignores the stepss on the same line! How does this work? Are you manually reviewing the changes before submitting the PRs?

Copy link
Contributor Author

@c-chaitanya c-chaitanya Feb 18, 2021

Choose a reason for hiding this comment

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

Appreciate the comments @nicolaskruchten. No advanced NLP used here, but very basic NLP stuff. Firstly I have a corpus of english words with me. In my second step I create a corpus from all the documents in the project (lets call this plotly corpus). Then I count all the words in the plotly corpus. Then I add all words in plotly corpus having word count greater than a fixed threshold to the english ones. This step ensures that the programming jargon is not counted as a spelling error.

Now all words which don't exist in the final corpus are treated as errors. If any document contains error words, my script just prints out the filename and the errored word. I go through this and fix them manually.

maybe the document contained the word stepss a lot of times. Thus it isnt treated as an error

Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting! stepss is definitely not anywhere else, or shouldn't be. Its inclusion in this line of the changelog is specifically to point out that we made a mistake and had to fix it ;)

Either way, thanks again for the contribution :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is lot of manual work involved. I go through the present sentence understand the context and then read the correction suggestion and take my call.

@@ -231,7 +231,7 @@ fig.show()

### Automatic contrast rescaling in `px.imshow`

When `zmin` and `zmax` are not specified, the `contrast_rescaling` arguments determines how `zmin` and `zmax` are computed. For `contrast_rescaling='minmax'`, the extrema of the data range are used. For `contrast_rescaling='infer'`, a heuristic based on the data type is used:
When `zmin` and `zmax` are not specified, the `contrast_rescaling` arguments determines how `zmin` and `zmax` are computed. For `contrast_rescaling='minmax'`, the extreme of the data range are used. For `contrast_rescaling='infer'`, a heuristic based on the data type is used:
Copy link
Contributor

Choose a reason for hiding this comment

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

this is the only one I disagree with... "extrema" is the correct latin word here although "extremes" would be less confusing to some ;)

@@ -23,7 +23,7 @@ jupyter:
version: 3.6.8
plotly:
description: Add linear Ordinary Least Squares (OLS) regression trendlines or
non-linear Locally Weighted Scatterplot Smoothing (LOEWSS) trendlines to scatterplots
non-linear Locally Weighted Scatterplot Smoothing (LOWESS) trendlines to scatterplots
Copy link
Contributor

Choose a reason for hiding this comment

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

again, very impressive catch!

@nicolaskruchten
Copy link
Contributor

Just one word to fix and I can merge this, thank you :)

Any changes to Python files/files not in doc should target master please!

changing extreme back to extrema
@c-chaitanya
Copy link
Contributor Author

@nicolaskruchten Done with the changes you suggested.

@nicolaskruchten nicolaskruchten merged commit c596d2e into plotly:doc-prod Feb 18, 2021
@c-chaitanya c-chaitanya mentioned this pull request Feb 21, 2021
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.

2 participants