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

[MRG + 1] [doc skip] docs(contributorGuide): add commit message magic commands to contributor guide #8024

Merged

Conversation

alexandercbooth
Copy link
Contributor

Addresses #8019 by adding commit message magic commands to the contributor guide.

…mands to avoid unnecessarily building docs in CI
@@ -12,7 +12,7 @@ likelihood of your contribution being merged.**
How to contribute
-----------------

The preferred workflow for contributing to scikit-learn is to fork the
Copy link
Contributor

Choose a reason for hiding this comment

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

Good work removing the PEP8 errors 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks!

@@ -48,11 +48,13 @@ GitHub, clone, and develop on a branch. Steps:
$ git push -u origin my-feature
```

*Note*: if your PR includes changes to files under the ``doc/`` or ``examples/`` folders, include in your commit message ``[doc build]``. Otherwise, include in your commit message ``[doc skip]``. This will allow the CI to avoid unnecessarily building the docs.
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure this is the best place to add this change. I feel it's better you add this as another bullet in the Pull Request Checklist section, below the part where documentation is mentioned.

Copy link
Contributor

Choose a reason for hiding this comment

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

Everything else seems good. Just needs a few formatting corrections:

  • I think the Note may not be needed
  • *If your PR
  • include [doc build] in your commit message
  • Otherwise, include [doc skip] in your commit message

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good thinking, that fits in much more naturally down there. Thanks @dalmia!

@@ -113,6 +113,11 @@ following rules before you submit a pull request:
scale in dimensionality: n_features is expected to be lower than
100".

- If your PR includes changes to files under the ``doc/`` or
``examples/`` folders, include ``[doc build]`` in your commit message.
Otherwise, include ``[doc skip]`` in your commit message. This will
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for making the quick range. I just have one more suggestion.
'message. This will' --> 'message which will'.
Also, you need to add the change in the same manner in doc/developers/contributing.rst

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, I didn't realize that there was a contributor guide there too!

@dalmia
Copy link
Contributor

dalmia commented Dec 9, 2016

Once the tests pass, I feel this looks good.

@alexandercbooth
Copy link
Contributor Author

Thanks for your feedback, @dalmia!

@dalmia
Copy link
Contributor

dalmia commented Dec 9, 2016

Sure, no problem :)

@raghavrv raghavrv changed the title [MRG] [doc skip] docs(contributorGuide): add commit message magic commands to contributor guide [MRG + 1] [doc skip] docs(contributorGuide): add commit message magic commands to contributor guide Dec 9, 2016
@@ -113,6 +113,11 @@ following rules before you submit a pull request:
scale in dimensionality: n_features is expected to be lower than
100".

- If your PR includes changes to files under the ``doc/`` or
Copy link
Member

Choose a reason for hiding this comment

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

No, we use this logic automatically.

What we need to be saying is more along the lines of:

  • describing the roles of the different CIs we use: travis runs on various linux settings, appveyor on various windows settings, both do some coverage analysis, and CircleCI builds the documentation for viewing (for which a URL is given in contributing.rst)
  • noting that [ci skip] appearing in the latest commit message will stop these running
  • noting that while some heuristics are used for Circle to decide between running a full HTML documentation build, including plots (make html) and a quick one (make html-noplot), putting one of [doc build], [doc quick] and [doc skip] will override this logic with the build including example gallery plots, the build excluding example gallery plots, and no documentation build.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, @jnothman!

Sorry, I think I misunderstood the comments in #7923 about what the markers did. Is something like this more appropriate?

A Note about CI:

  • Travis is used for testing on Linux platforms
  • Appveyor is used for testing on Windows platforms
  • CircleCI is used to build the docs for viewing

Please note that if one of the following markers appear in the latest commit message, the following actions are taken.

Commit Message Marker Action Taken by CI
[ci skip] CI is skipped completely
[doc skip] Docs are not built
[doc quick] Docs built, but exclude example gallery plots
[doc build] Docs built, including example gallery plots

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, is there a reason OSX isn't tested (with Travis, for example)?

Copy link
Member

Choose a reason for hiding this comment

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

I don't think there's a strong reason OS X isn't tested except that we've rarely had problems that behaved differently between OS X and linux. It's not like we're building a GUI or interfacing with other processes.

Copy link
Member

Choose a reason for hiding this comment

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

and yes, that looks good. do it!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good point, I use it on both and haven't run into an issue specific to either.

Great, fixed up and submitted. Thanks for your help!

@@ -113,6 +113,21 @@ following rules before you submit a pull request:
scale in dimensionality: n_features is expected to be lower than
100".

A Note about CI:
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure this is the right place. It doesn't fit before "You can also check for common errors".

Please change the heading to "Continuous Integration (CI)" and introduce it with a sentence saying "We use a few tools to ensure the integrity of our code and documentation for each commit in pull requests and merged into the master branch."

I also think this is more detail than necessary in Contributing.md and would happily see it only in the HTML guide.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, just to clarify, the suggestion here is to:

  • revert CONTRIBUTING.md to it's original state
  • change the title of the CI part as you suggest above in doc/developers/contributing.rst and also move it in that document to a more appropriate place

As for where to move it, perhaps before or after the "Testing and improving test coverage" part?

Thanks!

Copy link
Member

@amueller amueller left a comment

Choose a reason for hiding this comment

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

Argh my reviews were pending...

@@ -113,6 +113,11 @@ following rules before you submit a pull request:
scale in dimensionality: n_features is expected to be lower than
100".

- If your PR includes changes to files under the ``doc/`` or
``examples/`` folders, include ``[doc build]`` in your commit message.
Copy link
Member

Choose a reason for hiding this comment

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

This will actually automatically detected. These are just overwrites.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm sorry about that, @amueller

Here are the latest proposed changes

Leaving CONTRIBUTING.md as it was originally and adding this to contributing.rst:

Continuous Integration (CI)

  • Travis is used for testing on Linux platforms
  • Appveyor is used for testing on Windows platforms
  • CircleCI is used to build the docs for viewing

Please note that if one of the following markers appear in the latest commit message, the following actions are taken.

Commit Message Marker Action Taken by CI
[ci skip] CI is skipped completely
[doc skip] Docs are not built
[doc quick] Docs built, but exclude example gallery plots
[doc build] Docs built, including example gallery plots

My question is where is the most appropriate place in contributing.rst in which to insert this. My thoughts were perhaps below or above the "Testing and improving test coverage" part.

Thanks!

@jnothman
Copy link
Member

jnothman commented Dec 13, 2016 via email

@alexandercbooth
Copy link
Contributor Author

Thanks for the feedback, here's a current mockup, any thoughts?
screen shot 2016-12-14 at 5 54 40 pm

@jnothman
Copy link
Member

Move it to the end of the section with the other notes, and I think it's great! Now we just need to get Circle running again :\

@alexandercbooth
Copy link
Contributor Author

Great! Really appreciate all your help on this!

* Appveyor is used for testing on Windows platforms
* CircleCI is used to build the docs for viewing

Please note that if one of the following markers appear in the latest commit message, the following actions are taken.
Copy link
Member

Choose a reason for hiding this comment

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

Please wrap this line at 80 chars

Copy link
Member

Choose a reason for hiding this comment

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

did it myself (thanks to recent github feature that lets me do so...)

@jnothman
Copy link
Member

Might as well wait for build and rendering at http://scikit-learn.org/circle?7617/_changed.html

@jnothman
Copy link
Member

Build failed for silly reasons (will post issue). Merging.

@jnothman jnothman merged commit 9ec1a4c into scikit-learn:master Dec 15, 2016
@jnothman
Copy link
Member

thanks @alexandercbooth!

@alexandercbooth
Copy link
Contributor Author

Thanks so much or all your help, @jnothman!

sergeyf pushed a commit to sergeyf/scikit-learn that referenced this pull request Feb 28, 2017
@Przemo10 Przemo10 mentioned this pull request Mar 17, 2017
Sundrique pushed a commit to Sundrique/scikit-learn that referenced this pull request Jun 14, 2017
NelleV pushed a commit to NelleV/scikit-learn that referenced this pull request Aug 11, 2017
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
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.

5 participants