-
Notifications
You must be signed in to change notification settings - Fork 87
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 #695 from zktuong/update-workflow
bump to v0.7.5
- Loading branch information
Showing
40 changed files
with
619 additions
and
485 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,5 +1,5 @@ | ||
[bumpversion] | ||
current_version = 0.7.4 | ||
current_version = 0.7.5 | ||
commit = True | ||
tag = 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# SCM syntax highlighting | ||
pixi.lock linguist-language=YAML linguist-generated=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 |
---|---|---|
|
@@ -9,30 +9,35 @@ jobs: | |
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v5 | ||
|
||
- name: Install black | ||
run: python -m pip install black | ||
|
||
- name: Run black | ||
run: black --config pyproject.toml --check . | ||
- name: Black | ||
uses: psf/black@stable | ||
with: | ||
options: "--config pyproject.toml --check" | ||
src: "." | ||
|
||
interrogate: | ||
name: Check interrogate compliance. | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v5 | ||
|
||
- name: Install interrogate | ||
run: python -m pip install interrogate | ||
- name: Interrogate | ||
uses: JackMcKew/python-interrogate-check@main | ||
|
||
- name: Run interrogate | ||
run: interrogate . | ||
pre-commit: | ||
name: Check pre-commit compliance. | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
- uses: pre-commit/[email protected] |
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 |
---|---|---|
|
@@ -16,27 +16,20 @@ jobs: | |
shell: bash -l {0} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
name: Checkout repository | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# See: https://github.com/marketplace/actions/setup-miniconda | ||
- name: Setup miniconda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
- name: Setup Pixi Environment | ||
uses: prefix-dev/[email protected] | ||
with: | ||
auto-update-conda: true | ||
miniforge-variant: Mambaforge | ||
channels: conda-forge | ||
python-version: 3.9 | ||
activate-environment: nxviz | ||
environment-file: environment.yml | ||
use-mamba: true | ||
environments: docs | ||
pixi-version: v0.39.2 | ||
cache: false | ||
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }} | ||
|
||
- name: Build environment | ||
- name: Build docs | ||
run: | | ||
conda activate nxviz | ||
python -m ipykernel install --user --name nxviz | ||
python -m pip install . | ||
make docs | ||
pixi run -e docs mkdocs | ||
- name: Deploy website | ||
uses: peaceiris/actions-gh-pages@v3 | ||
|
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 |
---|---|---|
|
@@ -2,103 +2,41 @@ name: Pull request checks | |
|
||
on: [pull_request] | ||
|
||
env: | ||
cache-version: "cache-v2" | ||
|
||
jobs: | ||
build-environment: | ||
runs-on: ubuntu-18.04 | ||
name: Build conda environment | ||
steps: | ||
- uses: actions/checkout@v2 | ||
name: Checkout repository | ||
|
||
# See: https://github.com/marketplace/actions/setup-conda | ||
- name: Setup anaconda | ||
uses: s-weigand/setup-conda@v1 | ||
with: | ||
conda-channels: "conda-forge" | ||
|
||
# Build cache of environment | ||
- name: Cache conda environment | ||
id: cache-environment | ||
uses: actions/cache@v2 | ||
with: | ||
path: nxviz.tar.gz | ||
# Note: Remember that whatever files the environment build depends on | ||
# should be hashed and added to the key. | ||
key: ${{ runner.os }}-env.${{ hashFiles('environment.yml') }} | ||
|
||
- name: Build environment | ||
if: steps.cache-environment.outputs.cache-hit != 'true' | ||
run: | | ||
conda env create -f environment.yml | ||
python -m pip install . | ||
- name: Install conda-pack | ||
if: steps.cache-environment.outputs.cache-hit != 'true' | ||
run: conda install -c conda-forge conda-pack | ||
|
||
- name: Run conda-pack | ||
if: steps.cache-environment.outputs.cache-hit != 'true' | ||
run: conda pack -n nxviz -o nxviz.tar.gz | ||
|
||
# See: https://github.com/actions/upload-artifact | ||
- name: Upload environment | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: nxviz-tarball | ||
path: nxviz.tar.gz | ||
|
||
unit-tests: | ||
name: Run unit tests | ||
runs-on: ubuntu-latest | ||
needs: build-environment | ||
|
||
strategy: | ||
max-parallel: 10 | ||
matrix: | ||
environment: [py310, py311, py312, py313] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
name: Build and test | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# https://github.com/actions/download-artifact | ||
- name: Download environment tarball | ||
uses: actions/download-artifact@v2 | ||
uses: actions/checkout@v4 | ||
- name: Setup Pixi Environment | ||
uses: prefix-dev/[email protected] | ||
with: | ||
name: nxviz-tarball | ||
|
||
- name: Unpack environment and activate it | ||
run: | | ||
bash scripts/ci/unpack_environment.sh | ||
environments: ${{ matrix.environment }} | ||
pixi-version: v0.39.2 | ||
cache: false | ||
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }} | ||
|
||
- name: Run tests | ||
- name: Test build, unit tests and docs | ||
run: | | ||
source /tmp/nxviz/bin/activate | ||
python -m pip install -e . | ||
pixi run -e ${{ matrix.environment }} test | ||
pixi run -e ${{ matrix.environment }} mkdocs | ||
docs: | ||
name: Build static site docs | ||
runs-on: ubuntu-latest | ||
# https://www.bradmcgonigle.com/blog/github-action-for-continuous-deployment | ||
# - NETLIFY_SITE_ID maps to the netlify site's API ID | ||
# - NETLIFY_AUTH_TOKEN maps to netlify's Personal Access Token that I set on a per-user basis | ||
netlify-deploy: | ||
needs: build-environment | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# https://github.com/actions/download-artifact | ||
- name: Download environment tarball | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: nxviz-tarball | ||
|
||
- name: Unpack environment and activate it | ||
run: | | ||
bash scripts/ci/unpack_environment.sh | ||
- name: Build docs | ||
run: | | ||
source /tmp/nxviz/bin/activate | ||
python -m ipykernel install --user --name nxviz | ||
make docs | ||
# https://www.bradmcgonigle.com/blog/github-action-for-continuous-deployment | ||
# - NETLIFY_SITE_ID maps to the netlify site's API ID | ||
# - NETLIFY_AUTH_TOKEN maps to netlify's Personal Access Token that I set on a per-user basis | ||
- name: Deploy to Netlify | ||
uses: netlify/actions/cli@master | ||
with: | ||
|
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 |
---|---|---|
|
@@ -71,3 +71,8 @@ target/ | |
.ipynb_checkpoints | ||
site/ | ||
*.md.tmp | ||
|
||
# pixi environments | ||
.pixi | ||
*.egg-info | ||
pixi.lock |
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,15 +1,15 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/psf/black | ||
rev: 24.10.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/kynan/nbstripout | ||
rev: 0.6.1 | ||
- id: black | ||
- repo: https://github.com/kynan/nbstripout | ||
rev: 0.8.1 | ||
hooks: | ||
- id: nbstripout | ||
- id: nbstripout |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.