Skip to content

Commit

Permalink
Merge pull request #70 from Cadair/cruft-manual-update
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis authored Dec 7, 2024
2 parents 5d0fc31 + ed71462 commit 702d17c
Show file tree
Hide file tree
Showing 11 changed files with 131 additions and 10 deletions.
8 changes: 7 additions & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/sunpy/package-template",
"commit": "cd21e0d710513a891ed03f29e8afd6e0b9217f04",
"commit": "3737aa309d2a695ada046c7868c5683213003f3d",
"checkout": null,
"context": {
"cookiecutter": {
Expand All @@ -10,6 +10,12 @@
"author_name": "The SunPy Developers",
"author_email": "[email protected]",
"project_url": "https://docs.sunpy.org/projects/mpl-animators",
"github_repo": "",
"sourcecode_url": "",
"download_url": "https://pypi.org/project/mpl_animators",
"documentation_url": "",
"changelog_url": "",
"issue_tracker_url": "",
"license": "BSD 3-Clause",
"minimum_python_version": "3.10",
"use_compiled_extensions": "n",
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Main CI Workflow
name: CI

on:
Expand All @@ -21,7 +22,7 @@ concurrency:

jobs:
core:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
submodules: false
coverage: codecov
Expand All @@ -45,8 +46,8 @@ jobs:
- run: python -m twine check dist/*

docs:
needs: [core]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
needs: [core, sdist_verify]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
default_python: '3.12'
submodules: false
Expand All @@ -68,7 +69,7 @@ jobs:
contains(github.event.pull_request.labels.*.name, 'Run publish')
)
needs: [sdist_verify, docs]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@main
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1
with:
python-version: '3.12'
test_extras: 'tests'
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ exclude: ".*(.csv|.fits|.fts|.fit|.header|.txt|tca.*|.json|.asdf)$|^CITATION.rst
repos:
# This should be before any formatting hooks like isort
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.7.4"
rev: "v0.8.1"
hooks:
- id: ruff
args: ["--fix"]
Expand Down
1 change: 0 additions & 1 deletion .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ extend-ignore = [
"UP038", # Use | in isinstance - not compatible with models and is slower
# pytest (PT)
"PT001", # Always use pytest.fixture()
"PT004", # Fixtures which don't return anything should have leading _
"PT023", # Always use () on pytest decorators
# flake8-pie (PIE)
"PIE808", # Disallow passing 0 as the first argument to range
Expand Down
Empty file added CHANGELOG.rst
Empty file.
34 changes: 34 additions & 0 deletions changelog/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
=========
Changelog
=========

.. note::

This README was adapted from the pytest changelog readme under the terms of the MIT licence.

This directory contains "news fragments" which are short files that contain a small **ReST**-formatted text that will be added to the next ``CHANGELOG``.

The ``CHANGELOG`` will be read by users, so this description should be aimed at SunPy users instead of describing internal changes which are only relevant to the developers.

Make sure to use full sentences with correct case and punctuation, for example::

Add support for Helioprojective coordinates in `sunpy.coordinates.frames`.

Please try to use Sphinx intersphinx using backticks.

Each file should be named like ``<PULL REQUEST>.<TYPE>[.<COUNTER>].rst``, where ``<PULL REQUEST>`` is a pull request number, ``COUNTER`` is an optional number if a PR needs multiple entries with the same type and ``<TYPE>`` is one of:

* ``breaking``: A change which requires users to change code and is not backwards compatible. (Not to be used for removal of deprecated features.)
* ``feature``: New user facing features and any new behavior.
* ``bugfix``: Fixes a reported bug.
* ``doc``: Documentation addition or improvement, like rewording an entire session or adding missing docs.
* ``deprecation``: Feature deprecation
* ``removal``: Feature removal.
* ``trivial``: A change which has no user facing effect or is tiny change.

So for example: ``123.feature.rst``, ``456.bugfix.rst``.

If you are unsure what pull request type to use, don't hesitate to ask in your PR.

Note that the ``towncrier`` tool will automatically reflow your text, so it will work best if you stick to a single paragraph, but multiple sentences and links are OK and encouraged.
You can install ``towncrier`` and then run ``towncrier --draft`` if you want to get a preview of how your change will look in the final release notes.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"sphinx.ext.mathjax",
"sphinx_automodapi.automodapi",
"sphinx_automodapi.smart_resolver",
"sphinx_changelog",
"sphinx_gallery.gen_gallery",
]

Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ Finally, there are two base classes: `.BaseFuncAnimator` which can be extended t

generated/gallery/index
api
whatsnew/index
10 changes: 10 additions & 0 deletions docs/whatsnew/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. _changelog:

**************
Full Changelog
**************

.. changelog::
:towncrier: ../../
:towncrier-skip-if-empty:
:changelog_file: ../../CHANGELOG.rst
12 changes: 12 additions & 0 deletions docs/whatsnew/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.. _whatsnew:

***************
Release History
***************

This page documents the releases for mpl_animators

.. toctree::
:maxdepth: 1

changelog
63 changes: 60 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ tests = [
docs = [
"sphinx",
"sphinx-automodapi",
"sphinx-changelog",
"sunpy-sphinx-theme",
"packaging",
"sphinx_gallery",
Expand All @@ -41,8 +42,8 @@ docs = [
]

[project.urls]
Homepage = "https://sunpy.org"
Download = "https://pypi.org/project/mpl-animators/"
Homepage = "https://docs.sunpy.org/projects/mpl-animators"
Download = "https://pypi.org/project/mpl_animators"
"Source Code" = "https://github.com/sunpy/mpl-animators/"
Documentation = "https://docs.sunpy.org/projects/mpl-animators"
Changelog = "https://github.com/sunpy/mpl-animators/releases"
Expand All @@ -59,7 +60,10 @@ exclude = ["mpl_animators._dev*"]
[tool.setuptools_scm]
write_to = "mpl_animators/_version.py"

[ tool.gilesbot ]
[tool.gilesbot]
[tool.gilesbot.pull_requests]
enabled = true

[ tool.gilesbot.circleci_artifacts ]
enabled = true

Expand All @@ -77,3 +81,56 @@ write_to = "mpl_animators/_version.py"
url = ".tmp/py311-figure-devdeps/figure_test_images/fig_comparison.html"
message = "Click details to see the figure test comparisons for py312-figure-devdeps."
report_on_fail = true

[tool.gilesbot.towncrier_changelog]
enabled = true
verify_pr_number = true
changelog_skip_label = "No Changelog Entry Needed"
help_url = "https://github.com/sunpy/mpl-animators/blob/main/changelog/README.rst"
changelog_missing_long = "There isn't a changelog file in this pull request. Please add a changelog file to the `changelog/` directory following the instructions in the changelog [README](https://github.com//blob/main/changelog/README.rst)."
type_incorrect_long = "The changelog file you added is not one of the allowed types. Please use one of the types described in the changelog [README](https://github.com//blob/main/changelog/README.rst)"
number_incorrect_long = "The number in the changelog file you added does not match the number of this pull request. Please rename the file."

# TODO: This should be in towncrier.toml but Giles currently only works looks in
# pyproject.toml we should move this back when it's fixed.
[tool.towncrier]
package = "mpl_animators"
filename = "CHANGELOG.rst"
directory = "changelog/"
issue_format = "`#{issue} https:github.com/mpl-animators/pull/{issue}>`__"
title_format = "{version} ({project_date})"

[[tool.towncrier.type]]
directory = "breaking"
name = "Breaking Changes"
showcontent = true

[[tool.towncrier.type]]
directory = "deprecation"
name = "Deprecations"
showcontent = true

[[tool.towncrier.type]]
directory = "removal"
name = "Removals"
showcontent = true

[[tool.towncrier.type]]
directory = "feature"
name = "New Features"
showcontent = true

[[tool.towncrier.type]]
directory = "bugfix"
name = "Bug Fixes"
showcontent = true

[[tool.towncrier.type]]
directory = "doc"
name = "Documentation"
showcontent = true

[[tool.towncrier.type]]
directory = "trivial"
name = "Internal Changes"
showcontent = true

0 comments on commit 702d17c

Please sign in to comment.