Skip to content

Commit

Permalink
Rename and update GitHub actions (PlasmaPy#2379)
Browse files Browse the repository at this point in the history
* Update dependabot config

* Update pre-commit configuration

* Update CODEOWNERS

* Update label

* Rename weekly.yml → weekly_tests.yml

* Rename testing.yml → tests.yml

* Rename python-publish.yml to publish-to-pypi.yml

* Rename close-pr.yml to unlabel-pr-after-merge.yml

* Rename release.yml to mint-release.yml

* Rename open-pr.yml to comment-on-pr.yml

* Rename pr-labeler.yml to label-pr.yml

* Update labeler.yml

* Rename weekly_tests.yml to weekly-tests.yml

* Rename pr-labeler-changelog.yml to add-no-changelog-label.yml

* Rename author-in-cff.yml to check-author-included.yml

* Update README.md

* Add changelog entry

* Skip posting PR comment for most frequent contributors
  • Loading branch information
namurphy authored Oct 20, 2023
1 parent 4c4ad31 commit 2d4cef7
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 33 deletions.
8 changes: 5 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ updates:

- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
labels:
- No changelog entry needed
- GitHub Actions
- no changelog entry needed
reviewers:
- namurphy
schedule:
interval: daily
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ plasmapy.utils:
testing:
- '**/test*.py'
- '**/conftest.py'
- .github/workflows/weekly.yml
- .github/workflows/weekly-tests.yml
- .codecov.yaml
- noxfile.py
- tox.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Add no changelog label for autoupdates
name: Add no changelog label

on:
pull_request_target:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Open PR
name: Add comment to pull request

on:
pull_request_target:
types: [opened]

jobs:
comment:
# Skip posting this comment for frequent contributors
if: "!contains(fromJSON('[''namurphy'', ''rocco8773'', ''StanczakDominik'']'), github.event.pull_request.user.login)"
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Pull Request Labeler
name: Label pull request

# The labels to be added are defined in .github/labeler.yml

on:
- pull_request_target

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package
name: Publish to PyPI

on:
release:
Expand All @@ -32,7 +24,7 @@ jobs:
pip install build
- name: Build package
run: python -m build
- name: Publish package
- name: Upload package to PyPI
uses: pypa/[email protected]
with:
user: __token__
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ repos:
- tomli

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.0
rev: v0.1.1
hooks:
- id: ruff
args: [--fix]
Expand Down
5 changes: 2 additions & 3 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ plasmapy/diagnostics/ @rocco8773
plasmapy/diagnostics/charged_particle_radiography/ @pheuer
plasmapy/dispersion/ @ejohnson-96
plasmapy/particles/ @namurphy
# plasmapy/simulation/ @StanczakDominik
plasmapy/simulation/ @namurphy
plasmapy/tests/ @namurphy
# plasmapy/utils/decorators/ @rocco8773
plasmapy/utils/decorators/ @rocco8773
plasmapy/utils/pytest_helpers/ @namurphy

# subpackage files (with wildcards to include tests)
Expand All @@ -42,5 +42,4 @@ setup.py @namurphy

.github @namurphy
.pre-commit-config.yaml @namurphy
# **/conftest.py @StanczakDominik
tox.ini @namurphy
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[![YouTube](https://img.shields.io/badge/YouTube%20-subscribe-red?style=flat&logo=youtube)](https://www.youtube.com/channel/UCSH6qzslhqIZKTAJmHPxIxw)

[![GitHub Actions — CI](https://github.com/PlasmaPy/PlasmaPy/workflows/CI/badge.svg)](https://github.com/PlasmaPy/PlasmaPy/actions?query=workflow%3ACI+branch%3Amain)
[![weekly tests](https://github.com/PlasmaPy/PlasmaPy/actions/workflows/weekly.yml/badge.svg?branch=main)](https://github.com/PlasmaPy/PlasmaPy/actions/workflows/weekly.yml)
[![weekly tests](https://github.com/PlasmaPy/PlasmaPy/actions/workflows/weekly-tests.yml/badge.svg?branch=main)](https://github.com/PlasmaPy/PlasmaPy/actions/workflows/weekly-tests.yml)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/PlasmaPy/PlasmaPy/main.svg)](https://results.pre-commit.ci/latest/github/PlasmaPy/PlasmaPy/main)
[![codecov](https://codecov.io/gh/PlasmaPy/PlasmaPy/branch/main/graph/badge.svg)](https://codecov.io/gh/PlasmaPy/PlasmaPy)
[![Read the Docs Status](https://readthedocs.org/projects/plasmapy/badge/?version=latest&logo=twitter)](http://plasmapy.readthedocs.io/en/latest/?badge=latest)
Expand Down
2 changes: 2 additions & 0 deletions changelog/2379.trivial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Improved the consistency and specificity of the names of various
GitHub Actions.
16 changes: 8 additions & 8 deletions changelog/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ Changelog guidelines

* Changelog entries are not required for changes that are sufficiently
minor, such as typo fixes. When this is the case, a package maintainer
will add the *No changelog entry needed* label to the pull request.
will add the :guilabel`no changelog entry needed` label to the pull
request.

* Use the past tense to describe the change, and the present tense to
describe how the functionality currently works.
Expand Down Expand Up @@ -143,17 +144,16 @@ Changelog guidelines

.. tip::

When removing or moving an object, |reStructuredText| links that follow the
original namespace will break, causing the documentation build to
fail.
When removing or moving an object, |reStructuredText| links that
follow the original namespace will break, causing the documentation
build to fail.

Text in single back ticks is used to link to code objects, while text
in double back ticks is treated as an `inline literal`_. To remedy
this problem in old changelog entries, change the broken link into an
inline literal by surrounding it with double back ticks instead.
Remove the tilde if present. For example,
```~plasmapy.subpackage.module.function``` should be changed
to:
```~plasmapy.subpackage.module.function``` should be changed to:

.. code-block:: rst
Expand All @@ -166,8 +166,8 @@ Building the changelog
======================

During the release cycle, |towncrier| is used to build the changelog. To
install |towncrier| and the other packages needed to develop PlasmaPy, go
to the top-level directory of your local clone of PlasmaPy and run:
install |towncrier| and the other packages needed to develop PlasmaPy,
go to the top-level directory of your local clone of PlasmaPy and run:

.. code-block:: shell
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/release_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Perform code quality checks

.. tip::

Apply the :guilabel:`No changelog entry needed` label to pull
Apply the :guilabel:`no changelog entry needed` label to pull
requests that change multiple changelog entries in order to skip
the changelog entry check.

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,13 @@ enabled = true

[tool.gilesbot.towncrier_changelog]
enabled = true
changelog_skip_label = "No changelog entry needed"
changelog_skip_label = "no changelog entry needed"
help_url = "https://docs.plasmapy.org/en/latest/contributing/changelog_guide.html#adding-a-changelog-entry"
changelog_missing = "Missing changelog entry (see `changelog/README.rst`)"
changelog_missing_long = "This pull request needs a changelog entry at `changelog/NUMBER.TYPE.rst`, where `NUMBER` is the pull request number and `TYPE` is one of `feature`, `trivial`, `doc`, `bugfix`, `breaking`, or `removal`.\n\nFor details, see: https://docs.plasmapy.org/en/latest/contributing/changelog_guide.html#adding-a-changelog-entry"
verify_pr_number = true
number_incorrect = "Changelog entry number ≠ PR number (see `changelog/README.rst`)"
number_incorrect_long = "The changelog entry number does not match this pull request's number.\n\nWhen purposefully editing the changelog entry for a different pull request, set the 'No changelog entry needed' label to ignore this check."
number_incorrect_long = "The changelog entry number does not match this pull request's number.\n\nWhen purposefully editing the changelog entry for a different pull request, set the 'no changelog entry needed' label to ignore this check."
type_incorrect = "Incorrect changelog type (see `changelog/README.rst`)"
type_incorrect_long = "The filename of the changelog entry must be of the form `changelog/NUMBER.TYPE.rst` where `TYPE` is one of `feature`, `trivial`, `doc`, `bugfix`, `breaking`, or `removal`.\n\nFor details, see: https://docs.plasmapy.org/en/latest/contributing/changelog_guide.html#adding-a-changelog-entry"

Expand Down

0 comments on commit 2d4cef7

Please sign in to comment.