Skip to content

Commit

Permalink
Website (#420)
Browse files Browse the repository at this point in the history
* black

* update actions

* Try continuous

* update actions

* separate build and checks
  • Loading branch information
j1c authored Apr 7, 2024
1 parent 7eea64c commit 3be0715
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 29 deletions.
30 changes: 3 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- "deploy"
- "main"
pull_request:
# pull_request:
workflow_call:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
Expand All @@ -14,7 +14,7 @@ permissions:
id-token: write

jobs:
build:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -28,32 +28,8 @@ jobs:
pip install -U pip setuptools wheel
pip install -r docs/requirements.txt
sphinx-build -a docs/ docs/_build/html
- name: Archive documentation artifacts
uses: actions/upload-artifact@v4
with:
name: documentation-site
path: docs/_build/html

# Deployment job
deploy:
runs-on: ubuntu-latest
steps:
- name: "GitHub Pages action"
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v3.9.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html

code-format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Run Format Check
run: |
pip install -U pip setuptools wheel black isort
black --check --diff ./m2g
isort --check-only --profile black ./m2g
23 changes: 23 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: m2g code check
on:
push:
branches:
- "deploy"
- "main"
pull_request:
workflow_call:

jobs:
code-format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Run Format Check
run: |
pip install -U pip setuptools wheel black isort
black --check --diff ./m2g
isort --check-only --profile black ./m2g
1 change: 0 additions & 1 deletion m2g/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
from matplotlib import pyplot as plt



class GraphTools:
"""Initializes the graph with nodes corresponding to the number of ROIS
Expand Down
1 change: 0 additions & 1 deletion m2g/stats/qa_skullstrip.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
from m2g.utils.qa_utils import get_min_max, opaque_colorscale, pad_im



def gen_overlay_pngs(
brain, original, outdir, loc=0, mean=False, minthr=2, maxthr=95, edge=False
):
Expand Down

0 comments on commit 3be0715

Please sign in to comment.