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

[WIP] Some docssssss #89

Closed
wants to merge 7 commits into from
Closed

[WIP] Some docssssss #89

wants to merge 7 commits into from

Conversation

hawkowl
Copy link
Member

@hawkowl hawkowl commented Aug 21, 2017

No description provided.

@codecov-io
Copy link

codecov-io commented Aug 21, 2017

Codecov Report

Merging #89 into master will decrease coverage by 0.17%.
The diff coverage is 80%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/towncrier/_settings.py 80% <ø> (ø) ⬆️
src/towncrier/__init__.py 87.3% <80%> (-1.23%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8e6fc19...35db954. Read the comment docs.

``[tool.towncrier]``
--------------------

All configuration for ``towncrier`` sits inside ``pyproject.toml``, under the ``tool.towncrier`` namespace.
Copy link

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
Copy link
Member

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 *
Copy link
Member

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!
Copy link
Member

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>`_.
Copy link
Member

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.

Copy link

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>`_.
Copy link
Member

Choose a reason for hiding this comment

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

You get the idea. :)

Copy link

@htgoebel htgoebel left a 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>`_.
Copy link

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.
Copy link

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.
Copy link

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.

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.
Copy link

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.
Copy link

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
Copy link

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
Copy link

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``).
Copy link

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``!
Copy link

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.")
Copy link

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)".

@htgoebel
Copy link

@hawkowl Any progress on the documentation?

@adiroiban
Copy link
Member

FYI There is #368 which tries to merge this code so that we can progress with the documentation.

@adiroiban
Copy link
Member

The documentation was merged into the main branch and integrated with read the docs https://towncrier.readthedocs.io/en/latest/

@adiroiban
Copy link
Member

I am going to close this as most of the changes were already merged.

@adiroiban adiroiban closed this Jul 16, 2022
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.

7 participants