-
Notifications
You must be signed in to change notification settings - Fork 123
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
[WIP] Some docssssss #89
Conversation
Codecov Report
@@ Coverage Diff @@
## master #89 +/- ##
==========================================
- Coverage 90.3% 90.13% -0.18%
==========================================
Files 12 12
Lines 454 456 +2
Branches 56 57 +1
==========================================
+ Hits 410 411 +1
Misses 27 27
- Partials 17 18 +1
Continue to review full report at Codecov.
|
``[tool.towncrier]`` | ||
-------------------- | ||
|
||
All configuration for ``towncrier`` sits inside ``pyproject.toml``, under the ``tool.towncrier`` namespace. |
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.
Consider also mentioning PEP-518 to explain why the config is in a file named pyproject.toml
.
@@ -7,7 +7,9 @@ include tox.ini | |||
recursive-include src *.rst | |||
|
|||
exclude bin | |||
exclude docs |
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 you want 2x prune
here. IIRC exclude
only works on files.
@@ -7,7 +7,9 @@ include tox.ini | |||
recursive-include src *.rst | |||
|
|||
exclude bin | |||
exclude docs | |||
exclude src/towncrier/newsfragments | |||
|
|||
recursive-exclude bin * |
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 three lines become obsolete then.
======================= | ||
|
||
``towncrier`` has many knobs and switches you can use, to customise it to your project's needs. | ||
The setup in the `Quick Start <quickstart.html>`_ doesn't touch on many, but this document will detail each of these options for you! |
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.
Does this work?
:doc:`quickstart`
Should do the trick.
``towncrier`` has many knobs and switches you can use, to customise it to your project's needs. | ||
The setup in the `Quick Start <quickstart.html>`_ doesn't touch on many, but this document will detail each of these options for you! | ||
|
||
For how to perform common customisation tasks, see `Customisation <customisation/index.html>`_. |
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.
Same or
:doc:`Customization <customization/index>`
if you don't want to use the name of the headline.
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.
Or ref:Customization
to avoid the …/index
.
========================= | ||
|
||
``towncrier`` can be customised to suit your project's needs. | ||
These pages should describe common customisation tasks, while if you want a reference, see `Configuration <../configuration.html>`_. |
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.
You get the idea. :)
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.
Strictly this pull-request is not only about docs, but also adds a new option --name
.
``towncrier`` has many knobs and switches you can use, to customise it to your project's needs. | ||
The setup in the `Quick Start <quickstart.html>`_ doesn't touch on many, but this document will detail each of these options for you! | ||
|
||
For how to perform common customisation tasks, see `Customisation <customisation/index.html>`_. |
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.
Or ref:Customization
to avoid the …/index
.
-------------------- | ||
|
||
All configuration for ``towncrier`` sits inside ``pyproject.toml``, under the ``tool.towncrier`` namespace. | ||
Please see `the TOML GitHub repo <https://github.com/toml-lang/toml>`_ for how to write TOML. |
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.
What about some works about TOML like. "TOML looks much like .ini files, but has a defined syntax."
- ``package`` -- The package name of your project. (Python projects only) | ||
- ``package_dir`` -- The folder your package lives. ``./`` by default, some projects might need to use ``src``. (Python projects only) | ||
- ``newsfile`` -- The filename of your news file. ``NEWS.rst`` by default. | ||
- ``fragment_directory`` -- If you are not storing your newsfragments in your Python package, or aren't using Python, this is the path to where your newsfragments will be put. |
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.
- What about "the path to where your newsfragments will be put – defaults to XXX"
- "will be put" by whom? by towncrier? Maybe better "will be collected" or "where towncrier will search for newsfragments"?
- Buh, this is a long line.
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.
This option actually is named just directory
.
- ``package_dir`` -- The folder your package lives. ``./`` by default, some projects might need to use ``src``. (Python projects only) | ||
- ``newsfile`` -- The filename of your news file. ``NEWS.rst`` by default. | ||
- ``fragment_directory`` -- If you are not storing your newsfragments in your Python package, or aren't using Python, this is the path to where your newsfragments will be put. | ||
- ``template`` -- Path to an alternate template for generating the newsfile, if you have one. |
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.
"Path to the template for generating the newsfile. Defaults to a build-in template."
- ``newsfile`` -- The filename of your news file. ``NEWS.rst`` by default. | ||
- ``fragment_directory`` -- If you are not storing your newsfragments in your Python package, or aren't using Python, this is the path to where your newsfragments will be put. | ||
- ``template`` -- Path to an alternate template for generating the newsfile, if you have one. | ||
- ``start_line`` -- The magic string that ``towncrier`` looks for when considering where the release notes should start. ``.. towncrier release notes start`` by default. |
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.
Use Sphinx feature:
:program:`towncrier`
|
||
We can then see our news fragments compiled by running ``towncrier`` in draft mode:: | ||
|
||
$ towncrier --draft |
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.
General: Please do not put $
in front of example commands. This inhibits easy copy-and-paste.
|
||
You should get an output similar to this:: | ||
|
||
$ towncrier --draft |
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.
Here the $
is okay since it mixed commands and output.
|
||
$ towncrier | ||
|
||
This command will remove the news files (with ``git rm``) and append the built news to the filename specified in ``pyproject.toml``, and then stage the news file changes (with ``git add``). |
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.
will remove the news fragments, I assume
Finale | ||
------ | ||
|
||
You should now have everything you need to get started with ``towncrier``! |
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.
:program:towncrier
@@ -32,13 +32,18 @@ def _get_date(): | |||
@click.option('--dir', 'directory', default='.') | |||
@click.option('--version', 'project_version', default=None) | |||
@click.option('--date', 'project_date', default=None) | |||
@click.option('--name', 'project_name', default=None, | |||
help="The name of your project, to override autodiscovery.") |
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 name of your project (default: autodiscovery)".
@hawkowl Any progress on the documentation? |
FYI There is #368 which tries to merge this code so that we can progress with the documentation. |
The documentation was merged into the main branch and integrated with read the docs https://towncrier.readthedocs.io/en/latest/ |
I am going to close this as most of the changes were already merged. |
No description provided.