-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Enhancement: add "extras" example to scripts docs #1181
Enhancement: add "extras" example to scripts docs #1181
Conversation
docs/docs/pyproject.md
Outdated
@@ -192,6 +192,15 @@ poetry = 'poetry:console.run' | |||
|
|||
Here, we will have the `poetry` script installed which will execute `console.run` in the `poetry` package. | |||
|
|||
To specify a script that | |||
[depends on an extra](https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's preferable to point to the extras
section of the Poetry documentation instead of setuptools
since they are different build tools.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for this addition. would you be so kind and extend the plugins
section accordingly? i also suggest to refer to the document's edit: sorry, missed it, i told ya so ;-)extras
section with a hyperlink.
docs/docs/pyproject.md
Outdated
@@ -192,6 +192,15 @@ poetry = 'poetry:console.run' | |||
|
|||
Here, we will have the `poetry` script installed which will execute `console.run` in the `poetry` package. | |||
|
|||
To specify a script that | |||
[depends on an extra](#extras), | |||
you may provide an entry as a dict: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the proper term would be inline table
for toml
.
docs/docs/pyproject.md
Outdated
To specify a script that | ||
[depends on an extra](#extras), | ||
you may provide an entry as a dict: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these line breaks are not necessary and visually irritating.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some would argue that short, broken lines are easier to read and maintain 🙂
Smaller diffs, and sentences are well cut on meaningful parts or punctuation.
It can also help in avoiding unnecessary words that make complicated sentences and therefore bad documentation!
i find that these sections are ordered weirdly. |
docs/docs/pyproject.md
Outdated
|
||
```toml | ||
[tool.poetry.scripts] | ||
devtest = {callable = 'mypackage:test.run_tests', extras = ['test']} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most other snippets in this document use "
.
Can this be rebased and comments resolved please? |
After digging around in the poetry code to figure out how to include an `extras` key in a cli script, I thought it might be a useful thing to add to the docs for future users.
ce0d7e0
to
ce3ffdd
Compare
@abn Finally got a chance to update this. Should be all set to go now. |
Hey @bradsbrown, sorry for the late reply here -- could you rebase onto current master so this can be reviewed? Thanks! |
After digging around in the poetry code to figure out how to include an `extras` key in a CLI script, I thought it might be a useful thing to add to the docs for future users.
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
After digging around in the poetry code to figure out
how to include an
extras
key in a cli script,I thought it might be a useful thing to add to the docs
for future users.
Pull Request Check List
This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once, it will save you unnecessary review cycles!
Note: If your Pull Request introduces a new feature or changes the current behavior, it should be based
on the
develop
branch. If it's a bug fix or only a documentation update, it should be based on themaster
branch.If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!