-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #549 from ImperialCollegeLondon/release/0.1.1a5
Release/0.1.1a5
- Loading branch information
Showing
289 changed files
with
29,705 additions
and
11,055 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
name: Publishing | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
# First, run the standard test suite - for this to work correctly, the workflow needs | ||
# to inherit the organisation secrets used to authenticate to CodeCov. | ||
# https://github.com/actions/runner/issues/1413 | ||
test: | ||
uses: ./.github/workflows/ci.yml | ||
secrets: inherit | ||
|
||
# Next, build the package wheel and source releases and add them to the release assets | ||
build-wheel: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# Build the package - this could use `poetry build` directly but pyproject.toml | ||
# already has the build-system configured to use poetry so `pip` should pick that | ||
# up automatically. | ||
- name: Build sdist | ||
run: | | ||
python -m pip install --upgrade build | ||
python -m build | ||
# Upload the build outputs as job artifacts - these will be two files with x.y.z | ||
# version numbers: | ||
# - virtual_ecosystem-x.y.z-py3-none-any.whl | ||
# - virtual_ecosystem-x.y.z.tar.gz | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: dist/virtual_ecosystem* | ||
|
||
# Add the built files to the release assets, alongside the repo archives | ||
# automatically added by GitHub. These files should then match exactly to the | ||
# published files on PyPI. | ||
- uses: softprops/action-gh-release@v1 | ||
with: | ||
files: dist/virtual_ecosystem* | ||
|
||
# Now attempt to publish the package to the TestPyPI site, where the virtual_ecosystem | ||
# project has been configured to allow trusted publishing from this repo and workflow. | ||
# | ||
# The skip-existing option allows the publication step to pass even when the release | ||
# files already exists on PyPI. That suggests something has gone wrong with the | ||
# release or the build file staging and the release should not be allowed to continue | ||
# to publish on PyPI. | ||
|
||
publish-TestPyPI: | ||
needs: build-wheel | ||
name: Publish virtual_ecosystem to TestPyPI | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
# Download the built package files from the job artifacts | ||
- name: Download sdist artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
# Information step to show the contents of the job artifacts | ||
- name: Display structure of downloaded files | ||
run: ls -R dist | ||
|
||
# Use trusted publishing to release the files downloaded into dist to TestPyPI | ||
- name: Publish package distributions to TestPyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
# skip-existing: true | ||
|
||
# The final job in the workflow is to publish to the real PyPI as long as the release | ||
# name does not contain the tag 'test-pypi-only' | ||
publish-PyPI: | ||
if: ${{ ! contains(github.event.release.name, 'test-pypi-only')}} | ||
needs: publish-TestPyPI | ||
name: Publish virtual_ecosystem to PyPI | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
# Download the built package files from the job artifacts | ||
- name: Download sdist artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
# Information step to show the contents of the job artifacts | ||
- name: Display structure of downloaded files | ||
run: ls -R dist | ||
|
||
# Use trusted publishing to release the files downloaded into dist to PyPI | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,22 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-merge-conflict | ||
- id: debug-statements | ||
- repo: https://github.com/PyCQA/isort | ||
rev: "5.13.2" | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.6.2 | ||
hooks: | ||
- id: isort | ||
additional_dependencies: [toml] | ||
- repo: https://github.com/psf/black | ||
rev: "24.2.0" | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 7.0.0 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: [flake8-docstrings] | ||
- id: ruff # Run the linter. | ||
args: [--fix, --exit-non-zero-on-fix] | ||
- id: ruff-format # Run the formatter. | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: "v1.8.0" | ||
rev: "v1.11.2" | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: [types-jsonschema, xarray] | ||
additional_dependencies: [types-jsonschema, xarray, types-tabulate, numpy] | ||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: v0.39.0 | ||
rev: v0.41.0 | ||
hooks: | ||
- id: markdownlint | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.15.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py310-plus] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.