This adds no new code linters or formatters, but ensures that flake8 (and some
minor others) are run using pre-commit.ci on each PR.
That's very fast and fixes problems in-PR, not requiring review turnarounds.
Additionally we get more stable linters via version pinning for free. The
updates are capped to once per month to prevent unnecessary churn.
Since flake8 now runs over the whole code base, I've added a few noqas where it
made sense.
* Correct to start_string consistently
* Add test docstring
* add test for coverage and conditional to avoid exception
* Add test docstring
* Update test_build.py
* flake8
* expound on docs
* Update src/towncrier/newsfragments/277.doc.rst
* Add title_format tests and drop a line
* flake8
* Add 299.misc.rst
* Add test docstrings
* update test
* Update test_build.py
* Update test_build.py
* remove whitespace from a blank line
* Apply suggestions from code review
Co-authored-by: Adi Roiban <adiroiban@gmail.com>
* fixup
* expound case in test docstring
* add brief explanation of title_format outside the example
Co-authored-by: Adi Roiban <adiroiban@gmail.com>
* Treat a missing newsfragment directory as if it is empty
#85
* OSError for py2
* add missing sys import
* Add test docstrings
* Raise a ConfigError when the newsfragment directory is missing
* Update src/towncrier/newsfragments/85.bugfix.rst
Co-authored-by: Adi Roiban <adiroiban@gmail.com>
* reduce unneeded test diff
* remove probably copy/paste error comment
* Update src/towncrier/test/test_build.py
Co-authored-by: Adi Roiban <adiroiban@gmail.com>
Co-authored-by: Adi Roiban <adiroiban@gmail.com>
* Correct build subcommand handling of exceptions on exit
* Add 84.bugfix.rst
* flake8
* add test docstrinc
* Update src/towncrier/newsfragments/84.bugfix.rst
Co-authored-by: Adi Roiban <adiroiban@gmail.com>
* Adjust exception handling structure
* back to original change, but simplified
* print_function
Co-authored-by: Adi Roiban <adiroiban@gmail.com>
* Allow for defining arbitrary project version and name in configuration - close#165
This allows for the towncrier to be seamlessly used in non-python projects
* add tests
* Update src/towncrier/newsfragments/165.feature.rst
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* Update README.rst
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* Use shorter config option names for version and name
* Updated readme
* Update src/towncrier/newsfragments/165.feature.rst
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* Update README.rst
Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* ENH: Add no bullet point option
When `all_bullets` is set to false, then fragmets that should be
rendered as bullet points will have include the bullet itself.
In that case, bullets will be sorted to the front (bullets include
"*", "-", and "#." enumeration).
To make indentation of the ticket info easier, a `get_indent(text)`
function is exposed to the jinja template.
* testing and cleanups
Instead of having a single 'towncrier' command, add 'build' and 'check'
subcommands. The 'click-default-group' extension is used to allow us to
continue running the 'build' command by default, though we should look
at deprecating this in the future.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Closes: #144
For now, this simply lets us run the build command in the same way we
run the check command, namely:
$ python -m towncrier.build
However, it will let us do far more powerful stuff shortly.
Signed-off-by: Stephen Finucane <stephen@that.guru>