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] Note change of average_precision_score() in docstring #10679

Merged
merged 1 commit into from
Mar 1, 2018

Conversation

f0k
Copy link
Contributor

@f0k f0k commented Feb 23, 2018

Fixes #10676 by adding a .. versionchanged :: note to average_precision_score().

@f0k
Copy link
Contributor Author

f0k commented Feb 23, 2018

AppVeyor failed with a message in funny grammar saying Error uploading artifact the storage: Unable to connect to the remote server. Doesn't seem to be related to this PR.

@f0k f0k changed the title Note change of average_precision_score() in docstring [MRG] Note change of average_precision_score() in docstring Feb 23, 2018
@@ -202,6 +202,9 @@ def average_precision_score(y_true, y_score, average="macro",
>>> average_precision_score(y_true, y_scores) # doctest: +ELLIPSIS
0.83...

.. versionchanged:: 0.19
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps this needs to be higher up. See where it appears at https://19217-843222-gh.circle-artifacts.com/0/doc/modules/generated/sklearn.metrics.average_precision_score.html... no one will see it. Or maybe it just needs to be under a Notes heading

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I was following http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.logistic_regression_path.html#sklearn.linear_model.logistic_regression_path, which also put the versionchanged at the very end. Will add a Notes heading. (Neat that the rendered documentation for the PR can be looked at online.)

@f0k
Copy link
Contributor Author

f0k commented Feb 26, 2018

Pinging @GaelVaroquaux, @jnothman, just in case you didn't get notified. You may want to trigger a restart of AppVeyor, or ignore it and merge.

/edit: Oh, github didn't notify me of your review -.-

@f0k f0k force-pushed the doc-changed-map-score branch from 7f5a99b to cde49b6 Compare February 26, 2018 16:23
@f0k
Copy link
Contributor Author

f0k commented Feb 26, 2018

@jnothman: Added the Notes header, but it seems only maintainers can access the circle artifacts to check the documentation. Hope it looks better now. (Sorry, I didn't try to install the dependencies to build the docs locally.)

@jnothman
Copy link
Member

jnothman commented Feb 26, 2018 via email

@f0k
Copy link
Contributor Author

f0k commented Feb 28, 2018

Just swap the circle build number into my url above

That's the first thing I tried, but I took the deploy build... as it didn't work, I inferred I'd probably have to replace the second number in the URL as well.

I don't know why circle makes it seem otherwise

When I open any of the three circle logs, they miss the "Artifact" tab mentioned at https://circleci.com/docs/2.0/artifacts/. So I inferred I'm lacking the rights as a non-owner.


The "Notes" header increases visibility: https://19462-843222-gh.circle-artifacts.com/0/doc/modules/generated/sklearn.metrics.average_precision_score.html
Thanks for the hint! I'd say it's fine this way.

@jnothman
Copy link
Member

jnothman commented Mar 1, 2018

As described at http://scikit-learn.org/dev/developers/contributing.html#generated-documentation-on-circleci, you need to look at Python3. Not sure why Circle hides it, but apparently you can add #artifacts without any privilege. Alternatively, install the user script. Please go endorse my feature request at Circle CI.

Copy link
Member

@jnothman jnothman left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@jnothman jnothman merged commit ec691e9 into scikit-learn:master Mar 1, 2018
@f0k f0k deleted the doc-changed-map-score branch March 1, 2018 10:25
@f0k
Copy link
Contributor Author

f0k commented Mar 1, 2018

As described at http://scikit-learn.org/dev/developers/contributing.html#generated-documentation-on-circleci, you need to look at Python3. Not sure why Circle hides it, but apparently you can add #artifacts without any privilege.

Oh, my bad. I read through CONTRIBUTING.md on github. Its "Documentation" section only told me about sphinx, and make would have required installing sphinx_gallery and possibly more that wasn't mentioned (it said it only needed sphinx, matplotlib and pillow), so I didn't continue.
I wasn't aware that there was a second set of more up-to-date contribution guidelines. It's mentioned at the bottom of CONTRIBUTING.md for information on conforming to the API specs and profiling code, both of which didn't apply here.
Note that this is not to blame you, just to detail how I missed all the good stuff as a sort-of-new contributor! I'll try to send a PR for CONTRIBUTING.md, unless you want to fully replace it with a link to the web page.

@jnothman
Copy link
Member

jnothman commented Mar 1, 2018 via email

@lesteve
Copy link
Member

lesteve commented Mar 2, 2018

For the record the first sentence of CONTRIBUTING.md points to the html doc:

Note: This document is a 'getting started' summary for contributing code,
documentation, testing, and filing issues.
Visit the Contributing
page

for the full contributor's guide. Please read it carefully to help make
the code review process go as smoothly as possible and maximize the
likelihood of your contribution being merged.

Having said that, I agree that things could be reorganized to make it easier for new contributors to get started. IMO CONTRIBUTING.md should be a lot shorter and add links to the dev html doc (for example the stable doc still mentions nose ...) for more details.

@f0k
Copy link
Contributor Author

f0k commented Mar 2, 2018

For the record the first sentence of CONTRIBUTING.md points to the html doc

Fair enough, but apparently that didn't help. And it's not because I didn't read that sentence -- the multi-page document I was looking at seemed to cover everything I needed extensively enough. (Does "Please read it carefully" refer to the "'getting started' summary" or the web page?)

IMO CONTRIBUTING.md should be a lot shorter and add links

That would probably work. If I had gotten the impression that this file was missing information and/or less well-maintained, I would have skipped to the web page. Linking directly to relevant sections of the long guide would lower the hurdle.
I can just offer to do this for the Documentation section, that's what I've been looking at.

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.

3 participants