Skip to content

Commit

Permalink
Update cruft with batchpr
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair committed Dec 6, 2024
1 parent 158b19c commit e4eaef3
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 8 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 Community",
"author_email": "[email protected]",
"project_url": "https://docs.sunpy.org/projects/ndcube",
"github_repo": "",
"sourcecode_url": "",
"download_url": "https://pypi.org/project/ndcube",
"documentation_url": "",
"changelog_url": "",
"issue_tracker_url": "",
"license": "BSD 2-Clause",
"minimum_python_version": "3.10",
"use_compiled_extensions": "n",
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<<<<<<<
=======
# Main CI Workflow
>>>>>>>
name: CI

on:
Expand All @@ -21,7 +25,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,7 +49,7 @@ jobs:

test:
needs: [core, sdist_verify]
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 @@ -60,7 +64,7 @@ jobs:

docs:
needs: [core]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
default_python: '3.12'
submodules: false
Expand All @@ -84,7 +88,7 @@ jobs:
github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'Run cron CI')
)
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
default_python: '3.12'
submodules: false
Expand All @@ -105,7 +109,7 @@ jobs:
contains(github.event.pull_request.labels.*.name, 'Run publish')
)
needs: [test, 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
@@ -1,7 +1,7 @@
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
3 changes: 3 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ extend-ignore = [
"NPY002", # TODO: migrate from np.random.rand to np.random.Generator
# pytest (PT)
"PT001", # Always use pytest.fixture()
<<<<<<<
"PT004", # Fixtures which don't return anything should have leading _
"PT011", # TODO: except(ValueRaises) is too broad
"PT012", # TODO: except statement is too lengthy
=======
>>>>>>>
"PT023", # Always use () on pytest decorators
# flake8-pie (PIE)
"PIE808", # Disallow passing 0 as the first argument to range
Expand Down
7 changes: 7 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@
'ndcube.utils.sphinx.code_context',
'sphinx_changelog',
'sphinx_gallery.gen_gallery',
<<<<<<<
"sphinxext.opengraph",
=======
"sphinx.ext.mathjax",
"sphinx_automodapi.automodapi",
"sphinx_automodapi.smart_resolver",
"sphinx_changelog",
>>>>>>>
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
7 changes: 7 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@

The side bar on the left contains links to the various sections of the documentation.

<<<<<<<
.. _getting_help:
=======
whatsnew/index

Indices and tables
==================
>>>>>>>

Getting help
============
Expand Down
78 changes: 77 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,23 @@ reproject = [
]
all = [
"ndcube[plotting,reproject]",
<<<<<<<
]
dev = [
"ndcube[tests,docs,plotting,reproject]",
=======
docs = [
"sphinx",
"sphinx-automodapi",
"sphinx-changelog",
"sunpy-sphinx-theme",
"packaging",
>>>>>>>
]

[project.urls]
repository = "https://docs.sunpy.org/projects/ndcube"
Homepage = "https://docs.sunpy.org/projects/ndcube"
Download = "https://pypi.org/project/ndcube"

[tool.setuptools]
zip-safe = false
Expand Down Expand Up @@ -143,6 +154,71 @@ write_to = "ndcube/_version.py"
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/sunpy/ndcube/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."

<<<<<<<
[ tool.gilesbot.milestones ]
enabled = true
missing_message_long = "This pull request does not have a milestone assigned to it. Only maintainers can change this, so you don't need to worry about it. :smile:"
=======
[tool.setuptools_scm]
write_to = "ndcube/_version.py"

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

[tool.gilesbot.towncrier_changelog]
enabled = true
verify_pr_number = true
changelog_skip_label = "No Changelog Entry Needed"
help_url = "https://github.com//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 = "ndcube"
filename = "CHANGELOG.rst"
directory = "changelog/"
issue_format = "`#{issue} https:github.com//changelog/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 e4eaef3

Please sign in to comment.