All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to PEP 440 and uses Semantic Versioning.
- A
reusable-pypiworkflow to build source and binary distributions of Python package and distribute them on PyPI.org.
- The
reusable-docker-ecr.ymlworkflow now accepts afileinput for specifying the name of the dockerfile to build.
-
The
update-examples.ymlworkflow no longer used thereusable-git-object-name.ymlworkflow. -
The
reusable-docker-ecr.ymlandreusable-docker-ghcr.ymlworkflows have changed substantially! These workflows are now version-centric instead of branch-centric and their usage has changed. Please make these changes to any calling workflow:on: push: branches: - - main - develop + tags: + - 'v*' pull_request: branches: - main - developand:
uses: ASFHyP3/actions/.github/workflows/reusable-docker-ghcr.yml@v0.19.0 ... with: - release_branch: main - develop_branch: develop ...For current usage, see the README and for more details about these changes, see #288.
latesttag will now be applied to release-tagged Docker images correctly. Fixes #278
- The
reusable-git-object-name.ymlworkflow has been removed. We recommend using thereusable-version-info.ymlworkflow instead.
- Added an optional
runnerinput forreusable-ruffandreusable-mypyto allow specifying a custom GitHub Actions runner. Helps to address ASFHyP3/hyp3-testing#128
- Added
permissionsfield for every job in the README examples to address #220
- Changed the default value for the
reusable-release.ymlworkflow'ssync_pr_labelinput fromtools-bottobumpless.
- Removed unnecessary
actions/checkoutstep fromreusable-release-checklist-comment.ymlso that it does not require thecontents: readpermission for private repos. - Replaced the
conda_env_nameinput parameter withpython_versionfor thereusable-version-infojob in the docker build README examples. - The use or requirements of GitHub issue/pull request labels in the reusable workflows are now described in the README.
- Added notes to our ruff documentation on how to relax the rules for docstrings and type annotations.
- Added a disclaimer to our mypy documentation regarding the limitations of using a static type checker on Python code.
- Added a note about how the
check_untyped_defsoption included in our recommended mypy settings differs from mypy's default static vs. dynamic typing behavior.
-
Updated our recommended ruff settings to suppress type annotation warnings for dummy function parameters (e.g.
_) and ignore allD1rules (missing docstring warnings) fortests/:+[tool.ruff.lint.flake8-annotations] +suppress-dummy-args = true + [tool.ruff.lint.extend-per-file-ignores] -"tests/*" = ["D100", "D103", "ANN"] +"tests/*" = ["D1", "ANN"]
- The link to our Mypy wiki article is now publicly accessible.
- Fixed
ruff: command not foundbug inreusable-ruff, introduced by the previous release.
-
The
reusable-ruffworkflow now runs inside a mamba environment and assumes the presence of anenvironment.ymlfile. -
We now recommend pinning to an exact version for both
ruffandmypyin your project dependencies, to avoid unexpected static analysis errors due to unpinned dependency upgrades. -
We now recommend adding the following lines to
pyproject.toml, to bring our recommendedruffsettings in line with hyp3-cookiecutter:[tool.ruff.lint.extend-per-file-ignores] "tests/*" = ["D100", "D103", "ANN"]
- The
reusable-ruffworkflow will now run the ruff format step whether or not the ruff check step failed.
-
The
reusable-mypyworkflow no longer passes any optional arguments to themypycommand. This makes it easier to runmypylocally, because the command is just:mypy .If you want to preserve the removed options for your project, you must now add them to
[tool.mypy]inpyproject.toml:install_types = true non_interactive = true pretty = true ignore_missing_imports = true
Note that we discourage enabling
ignore_missing_importsas a global option (see #225). You can always find our currently recommended configuration options in the README.
reusable-mypyreusable workflow for performing static type checking with mypy.reusable-ruffnow prints the suggested commands for automatically fixing errors.
reusable-flake8.ymlhas been removed. We recommendreusable-ruffinstead.
- Fix a bug in which
reusable-rufferrors did not cause the action to fail.
- Reverts the addition of
--select Itoreusable-ruff, as this option is already included in the recommendedpyproject.tomlsettings given in the README.
- The
reusable-ruffaction now checks for import order.
- The
reusable-release-actionnow uses theghCLI instead of the archivedrepo-sync/pull-requestaction.
- Releases of ASFHyP3/actions will now trigger updates to the ASFHyP3/hyp3-cookiecutter
- Optional ability to specify the name of the dockerfile to build with the
reusable-docker-ghcraction.
- The default Python version used for
reusable-version-info.ymlhas been upgraded from 3.9 to 3.12.
- Modified the
reusable-changelog-checkworkflow to remove its dependency on a third-party action. The workflow behavior should remain unchanged except that applying thebumplesslabel now results in the workflow being skipped rather than succeeding. Fixes #156- When upgrading this reusable action in your repository, remove the following lines from the calling workflow:
- secrets: - USER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- When upgrading this reusable action in your repository, remove the following lines from the calling workflow:
update-examplesworkflow will now strip distance and hash (longest-*match) from the input or calculated version numbers.reusable-secrets-analysis.ymlnow uses the Trufflehog Github Action to scan for only verified secrets, which should reduce or eliminate false positives.
reusable-secrets-analysis.ymlno longer recognizes.trufflehog.txt, which was previously used to specify exclude paths.
- Added items to the release checklist comment to remind developer to verify changes in test deployment.
update-examplesworkflow is now triggerable with aworkflow_dispatchevent
reusable-ruffreusable workflow for perform linting and static analysis with Ruff.update-examplesworkflow to keep the pinned version number in the README examples up to date.
reusable-pytestnow tests Python 3.9--3.12 by default.
reusable-pytestandreusable-version-infonow usesetup-micromambarather thanprovision-with-micromambawhich has been deprecated.
- Modified
reusable-create-jira-issue.ymlto add a disclaimer for the Jira issue link.
- Added
reusable-create-jira-issue.ymlfor creating a Jira issue that corresponds to the labeled GitHub issue. reusable-pytest.ymlnow includes afail_fastoption which lets you specify the strategy for handling failures
reusable-docker-ghcr.ymlno longer attempts to push a Docker image if run from a fork.
condaenvironments are now provisioned with micromamba in all reusable workflowsreusable-pytest.ymlandreusable-pytest.ymlno longer accept aconda_env_nameinput and will use the environment named in the calling repo'senvironment.yml
reusable-version-info.ymlnow usessetuptools_scmfor generating version numbers as the use ofsetup.pyis discouragedreusable-git-object-name.ymlnow handles lightweight as well as annotated tags
- All uses of the GitHub Action
set-outputcommand have been upgraded, due to forthcoming depreciation
reusable-relese-checklist-comment.ymlreusable workflow to add a comment to PRs with a release checklist for developers and reviewers
reusable-pytest.ymlnow accepts (only) a JSON list of python version strings and will setup a matrix of test jobs for multiple python versions.python_versionusage has changed fromtopython_version: "3.9" # Optional; default shown
Note: A single python version can be specified like# Optional; default shown python_versions: >- ["3.8", "3.9", "3.10"]
["3.9"].
- Removed support for secret scanning with
gitleaks-action, which now requires a paid license to use the latest version.
reusable-git-object-name.ymlworkflow to output the human-readable git object name
reusable-docker-ecr.ymlworkflow now ensures docker image names are all lower case
- Depreciated truffleHog action; use the
reusable-secrets-analysis.ymlworkflow instead - Depreciated bump-version action; use the
reusable-bump-version.ymlworkflow instead
reusable-bump-version.ymlreusable workflow to create a new version tag for a repository based on Pull Request labels using bump2versionreusable-changelog-check.ymlreusable workflow to ensure the changelog has been updatedreusable-docker-ecr.ymlreusable workflow to build a Docker image from theDockerfilein the repository root and pushes it to the Amazon Elastic Container Registryreusable-docker-ghcr.ymlreusable workflow to build a Docker image from theDockerfilein the repository root and pushes it to the GitHub Container Registryreusable-flake8.ymleusable workflow to enforce ASFHyP3's Python style guide with flake8reusable-labeled-pr-check.ymlreusable workflow to ensure a Pull Request has been appropriately labeled for a releasereusable-pytest.ymlreusable workflow to runs pytest in the repository's conda environmentreusable-release.ymlreusable workflow to create a release from aCHANGELOG.mdfile and synchronize the release and development branchesreusable-secrets-analysis.ymlreusable workflow to scan a PR for potentially committed secrets using git-leaks and truffleHogreusable-version-info.ymlreusable workflow to outputs the repository's Python package version number
These actions are being depreciated and will be removed in the next release:
- The bump-version action in favor of the
reusable-bump-version.ymlreusable workflow - The trufflehog action in favor of the
reusable-secrets-analysis.ymlreusable workflow
- A trufflehog action that looks for secrets in the git commit history back to the last tag
- A bump-version action that creates a new tag for a repository based on Pull Request labels using bump2version