diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b60ac9f6..6129ad05 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -14,7 +14,7 @@ permissions: id-token: write jobs: - build: + build-and-deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -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 diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 00000000..1491617a --- /dev/null +++ b/.github/workflows/checks.yml @@ -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 diff --git a/m2g/graph.py b/m2g/graph.py index 029800e5..b12d9736 100644 --- a/m2g/graph.py +++ b/m2g/graph.py @@ -36,7 +36,6 @@ from matplotlib import pyplot as plt - class GraphTools: """Initializes the graph with nodes corresponding to the number of ROIS diff --git a/m2g/stats/qa_skullstrip.py b/m2g/stats/qa_skullstrip.py index 0ed5e34b..ee627a79 100644 --- a/m2g/stats/qa_skullstrip.py +++ b/m2g/stats/qa_skullstrip.py @@ -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 ):