Skip to content

Commit

Permalink
Copier Template: Documentation: Control emission of Rust-specific sec…
Browse files Browse the repository at this point in the history
…tions.

Also:

* Copier Template: Add section on Towncrier fragments to development
  documentation about releases.

* Copier Template: More Pylint ignores for tests.

* Project: Add entries to changelog.
  • Loading branch information
emcd committed Dec 17, 2024
1 parent dd7731b commit 2c5f8cc
Show file tree
Hide file tree
Showing 5 changed files with 172 additions and 4 deletions.
90 changes: 90 additions & 0 deletions changelog.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,93 @@


.. towncrier release notes start
Copier Template 1.5 (2024-12-15)
================================

Features
--------

- Add support for immutable modules in template packages, including class
definitions and tests.


Copier Template 1.4 (2024-12-13)
================================

Features
--------

- Add code style validation and documentation for Python and Rust.
- Add development guide with detailed style and practices documentation.


Copier Template 1.3 (2024-12-12)
================================

Features
--------

- Add support for injecting common internals into foundational packages:
- Docstring utilities
- Immutable types
- Base imports
- Add Pylint plugin for path-based check disabling.


Copier Template 1.2 (2024-12-11)
================================

Features
--------

- Add improved configuration options for Rust integration:
- Configurable crate names
- Configurable extension module names
- Change to GitHub-based badge for license.
- Add ``cargo-deny`` configuration for Rust dependencies.


Copier Template 1.1 (2024-12-10)
================================

Features
--------

- Version Github workflows by tag in Copier answers ``_commit`` field.


Copier Template 1.0.2 (2024-12-10)
==================================

Fixes
-----

- Properly specify template directory.


Copier Template 1.0.1 (2024-12-08)
==================================

Fixes
-----

- Fix assorted issues in template and workflows.


Copier Template 1.0 (2024-12-05)
================================

Features
--------

- Add Copier template with support for Python packages:
- Modern Python packaging using Hatch
- Sphinx documentation framework
- Quality assurance tools configuration
- Optional Rust extension support via PyO3/Maturin
- Add reusable GitHub Actions workflows and composite actions:
- Cross-repository testing workflow
- Documentation generation and publication
- Package building and publication
- Code quality reporting
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ Documentation
or which attempt to provide function docstrings in the style of Google,
NumPy, Sphinx, etc..., will be rejected.

{% if enable_rust_extension -%}
.. todo:: Rust Documentation
{%- endif %}

* Use long option names, whenever possible, in command line examples. Readers,
who are unfamiliar with a command, should not have to look up the meanings of
Expand All @@ -51,7 +53,9 @@ Exceptional Conditions
``from`` original exception or raise a new exception with original exception
as the ``__context__``. Or properly handle the exception.

{% if enable_rust_extension -%}
.. todo:: Rust Panics
{%- endif %}

Imports
===============================================================================
Expand Down
73 changes: 73 additions & 0 deletions template/documentation/sphinx/development/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,76 @@ Postrelease Patch

10. Cherry-pick patch and Towncrier commits back to ``master`` branch,
resolving conflicts as necessary.

Changelog Entries
===============================================================================

The project uses `Towncrier <https://towncrier.readthedocs.io/>`_ to manage its
changelog. When making changes that should be noted in the changelog, add a
file ("fragment") to the ``documentation/towncrier`` directory with of
``<issue_number>.<type>.rst``, for changes with a Github issue, or
``+<title>.<type>.rst``, for changes without an associated issue number.

The entries will be collected and organized when a release is made, as
described in the release process sections above.

Available Types
-------------------------------------------------------------------------------

* ``bugfix``: For bug fixes
* ``docs``: For documentation improvements
* ``feature``: For new features
* ``platform``: For changes to supported platforms
* ``removal``: For deprecations and removals

Format
-------------------------------------------------------------------------------

The file should contain a concise description of the change written in present
tense. For example:

.. code-block:: rst
:caption: documentation/towncrier/+immutable-modules.feature.rst
Add support for immutable module reclassification.
The description should:

* Start with a capital letter
* End with a period
* Use present tense (e.g., "Add", "Fix", "Update")
* Focus on the what and why, not the how
* Be understandable by users, not just developers

Examples
-------------------------------------------------------------------------------

Bug Fix:
.. code-block:: rst
:caption: documentation/towncrier/456.bugfix.rst
Fix attribute visibility in immutable modules.
Documentation:
.. code-block:: rst
:caption: documentation/towncrier/457.docs.rst
Improve release process documentation with Towncrier details.
Feature:
.. code-block:: rst
:caption: documentation/towncrier/458.feature.rst
Add recursive module reclassification support.
Platform:
.. code-block:: rst
:caption: documentation/towncrier/459.platform.rst
Add support for Python 3.13.
Removal:
.. code-block:: rst
:caption: documentation/towncrier/460.removal.rst
Remove deprecated ``make_immutable`` function.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ Code Style
style other than the project code style, will be rejected.


{% if enable_rust_extension -%}
.. todo:: Rust Guidance
{%- endif %}


Specific Preferences
Expand Down Expand Up @@ -186,9 +188,8 @@ the last element unless the collection has a trailing comma::
if is_valid( value ) ]

# Multi-line conditional statements
if (
validate_input( data, strict = True )
and process_ready( )
if ( validate_input( data, strict = True )
and process_ready( )
): process( data )


Expand Down
2 changes: 1 addition & 1 deletion template/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ disable = [
]
# TODO: Latest 'per-file-ignores' code may supports dicts and lists in addition to strings.
per-file-ignores = '''
/tests/:attribute-defined-outside-init,magic-value-comparison,missing-class-docstring,missing-function-docstring,protected-access,unexpected-keyword-arg
/tests/:attribute-defined-outside-init,comparison-with-itself,magic-value-comparison,missing-class-docstring,missing-function-docstring,protected-access,singleton-comparison,superfluous-parens,unexpected-keyword-arg
__init__\.py:unused-import
''' # Note: Paths are regexes.
[tool.pylint.refactoring]
Expand Down

0 comments on commit 2c5f8cc

Please sign in to comment.