From a8e40117846472fd5b1daa6437c5d64147b951d4 Mon Sep 17 00:00:00 2001 From: j1c Date: Sun, 7 Apr 2024 19:17:27 -0400 Subject: [PATCH 1/5] black --- m2g/graph.py | 1 - m2g/stats/qa_skullstrip.py | 1 - 2 files changed, 2 deletions(-) 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 ): From 360a5f1da4a5ab66b9a2119ce6af3f99d1212657 Mon Sep 17 00:00:00 2001 From: j1c Date: Sun, 7 Apr 2024 19:17:36 -0400 Subject: [PATCH 2/5] update actions --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b60ac9f6..11704c1a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,6 +37,7 @@ jobs: # Deployment job deploy: runs-on: ubuntu-latest + needs: build steps: - name: "GitHub Pages action" uses: peaceiris/actions-gh-pages@v3 From ffca8f63dfbd2c004f6a2878f174cdf05853b327 Mon Sep 17 00:00:00 2001 From: j1c Date: Sun, 7 Apr 2024 19:19:45 -0400 Subject: [PATCH 3/5] Try continuous --- .github/workflows/build.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 11704c1a..4e8ecca0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ permissions: id-token: write jobs: - build: + build-and-deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -33,12 +33,6 @@ jobs: with: name: documentation-site path: docs/_build/html - - # Deployment job - deploy: - runs-on: ubuntu-latest - needs: build - steps: - name: "GitHub Pages action" uses: peaceiris/actions-gh-pages@v3 with: From 056a260797b3a4b2156e98451aa17ef3d2766df6 Mon Sep 17 00:00:00 2001 From: j1c Date: Sun, 7 Apr 2024 19:27:53 -0400 Subject: [PATCH 4/5] update actions --- .github/workflows/build.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e8ecca0..3f5bef7b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,13 +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 - 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 From c45a679bc241f341c99db801a41fbb28913e8c49 Mon Sep 17 00:00:00 2001 From: j1c Date: Sun, 7 Apr 2024 19:31:25 -0400 Subject: [PATCH 5/5] separate build and checks --- .github/workflows/build.yml | 16 +--------------- .github/workflows/checks.yml | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/checks.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f5bef7b..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 @@ -33,17 +33,3 @@ jobs: 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