-
Notifications
You must be signed in to change notification settings - Fork 2
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 #31 from thewtex/ci-actions-bump
ENH: Bump GitHub Actions versions
- Loading branch information
Showing
15 changed files
with
246 additions
and
152 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,21 @@ | ||
name: 'build-test-publish' | ||
name: "build-test-publish" | ||
|
||
on: | ||
[push, pull_request] | ||
|
||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/<your-pypi-project-name> | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build_wheel: | ||
name: Build Python wheels | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- name: "Build pure Python wheels" | ||
run: | | ||
python -m pip wheel -w dist -e src/ | ||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheel | ||
path: ./dist/itk_dreg-*.whl | ||
|
@@ -33,51 +26,57 @@ jobs: | |
needs: | ||
- build_wheel | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Update pip | ||
run: | | ||
python -m pip install --upgrade pip | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- name: Update pip | ||
run: | | ||
python -m pip install --upgrade pip | ||
- name: "Install Dependencies" | ||
shell: bash | ||
run: | | ||
python -m pip install flit | ||
cd src | ||
flit install --deps develop | ||
- name: "Install Dependencies" | ||
shell: bash | ||
run: | | ||
python -m pip install flit | ||
cd src | ||
flit install --deps develop | ||
- name: Download Python Wheel Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: wheel | ||
- name: Download Python Wheel Artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: wheel | ||
|
||
- name: "Install itk_dreg from Wheel Artifact" | ||
run: | | ||
wheel_name_full=`(find . -name "itk_dreg-*.whl")` | ||
python -m pip uninstall -y itk_dreg | ||
python -m pip install ${wheel_name_full} | ||
- name: "Install itk_dreg from Wheel Artifact" | ||
run: | | ||
wheel_name_full=`(find . -name "itk_dreg-*.whl")` | ||
python -m pip uninstall -y itk_dreg | ||
python -m pip install ${wheel_name_full} | ||
- name: "Run Tests" | ||
shell: bash | ||
run: | | ||
pytest ./test -vvv -s -k "not localcluster and not serialize_pairwise_result" | ||
- name: "Run Tests" | ||
shell: bash | ||
run: | | ||
pytest ./test -vvv -s -k "not localcluster and not serialize_pairwise_result" | ||
publish: | ||
needs: | ||
- build_wheel | ||
- pytest | ||
runs-on: ubuntu-22.04 | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/itk-dreg | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
|
||
steps: | ||
- name: Download Python Wheel Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: wheel | ||
path: dist | ||
- name: Download Python Wheel Artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: wheel | ||
path: dist | ||
|
||
- name: "Publish Python wheel to the Python Package Index" | ||
uses: pypa/[email protected] | ||
with: | ||
skip_existing: true | ||
- name: "Publish Python wheel to the Python Package Index" | ||
uses: pypa/[email protected] | ||
with: | ||
skip_existing: true |
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,23 +1,22 @@ | ||
name: 'lint' | ||
name: "lint" | ||
|
||
on: | ||
[push, pull_request] | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
ruff-check: | ||
name: "Lint with Ruff" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: chartboost/ruff-action@v1 | ||
with: | ||
src: "./src" | ||
- uses: actions/checkout@v4 | ||
- uses: chartboost/ruff-action@v1 | ||
with: | ||
src: "./src" | ||
|
||
black-autoformat: | ||
name: "Lint with Black" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: psf/black@stable | ||
with: | ||
src: "./src" | ||
- uses: actions/checkout@v4 | ||
- uses: psf/black@stable | ||
with: | ||
src: "./src" |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -8,3 +8,4 @@ examples/mydask.png | |
data/ | ||
_build/ | ||
tmp/ | ||
docs/apidocs/ |
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,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
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.
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,57 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
from datetime import date | ||
import os | ||
|
||
project = 'itk-dreg' | ||
copyright = f'{date.today().year}, NumFOCUS' | ||
author = 'Insight Software Consortium' | ||
|
||
extensions = [ | ||
'sphinx.ext.autosummary', | ||
'autodoc2', | ||
'myst_parser', | ||
'sphinx.ext.intersphinx', | ||
'sphinx_copybutton', | ||
'sphinxext.opengraph', | ||
'sphinx_design', | ||
] | ||
|
||
myst_enable_extensions = ["colon_fence", "fieldlist"] | ||
|
||
templates_path = ['_templates'] | ||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] | ||
|
||
autodoc2_packages = [ | ||
{ | ||
"path": "../src/itk_dreg", | ||
"exclude_files": [], | ||
}, | ||
] | ||
autodoc2_render_plugin = "myst" | ||
|
||
intersphinx_mapping = { | ||
"python": ("https://docs.python.org/3/", None), | ||
"itkwasm": ("https://itkwasm.readthedocs.io/en/latest/", None), | ||
} | ||
|
||
html_theme = 'furo' | ||
html_static_path = ['_static'] | ||
html_logo = "_static/logo.svg" | ||
html_favicon = "_static/favicon.png" | ||
html_title = f"{project}" | ||
html_baseurl = os.environ.get("SPHINX_BASE_URL", "") | ||
|
||
# Furo options | ||
html_theme_options = { | ||
"top_of_page_button": "edit", | ||
"source_repository": "https://github.com/InsightSoftwareConsortium/itk-dreg", | ||
"source_branch": "main", | ||
"source_directory": "docs", | ||
} |
Oops, something went wrong.