Skip to content

Commit

Permalink
Merge pull request #1514 from Sage-Bionetworks/develop
Browse files Browse the repository at this point in the history
Schematic v24.10.1
  • Loading branch information
lakikowolfe authored Oct 4, 2024
2 parents 7881e11 + 053d042 commit d4dfaf5
Show file tree
Hide file tree
Showing 56 changed files with 6,266 additions and 1,936 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Global owners of whole repo
* @andrewelamb @GiaJordan @linglp
16 changes: 3 additions & 13 deletions .github/workflows/api_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -43,21 +43,11 @@ jobs:
| python3 - --version ${{ env.POETRY_VERSION }};
poetry config virtualenvs.create true;
poetry config virtualenvs.in-project true;
#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

#----------------------------------------------
# install dependencies and root project
#----------------------------------------------
- name: Install dependencies and root project
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --all-extras

#----------------------------------------------
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: schematicbot
password: ${{ secrets.DOCKER_HUB_TOKEN }}
Expand All @@ -36,7 +36,7 @@ jobs:
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
-
name: Build and push (tagged release)
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
if: ${{ github.event_name == 'push' }}
with:
platforms: linux/amd64,linux/arm64
Expand All @@ -48,7 +48,7 @@ jobs:
${{ env.DOCKER_ORG }}/${{ env.DOCKER_REPO }}:commit-${{ steps.vars.outputs.sha_short }}
-
name: Build and push (manual release)
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
platforms: linux/amd64,linux/arm64
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set env variable for version tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_PATH }}
tags: |
Expand All @@ -46,7 +46,7 @@ jobs:
type=semver,pattern={{raw}}
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
uses: docker/build-push-action@v6
with:
file: schematic_api/Dockerfile
push: true
Expand Down
32 changes: 10 additions & 22 deletions .github/workflows/pdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,19 @@ jobs:
runs-on: ubuntu-latest
env:
POETRY_VERSION: 1.3.0
strategy:
matrix:
python-version: ["3.9", "3.10"]
PYTHON_VERSION: "3.10"

steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ env.PYTHON_VERSION }}

#----------------------------------------------
# install & configure poetry
Expand All @@ -54,31 +52,21 @@ jobs:
poetry config virtualenvs.create true;
poetry config virtualenvs.in-project true;
#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

#----------------------------------------------
# install dependencies and root project
#----------------------------------------------
- name: Install dependencies and root project
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --all-extras

# create documentation
- run: poetry add pdoc@13.0.0
- run: poetry add pdoc@14.6.0
- run: poetry show pdoc
- run: poetry run pdoc --docformat google -o docs/schematic schematic/manifest schematic/models schematic/schemas schematic/store schematic/utils schematic/visualization
- run: poetry run pdoc --docformat google --mermaid -o docs/schematic schematic/manifest schematic/models schematic/schemas schematic/store schematic/utils schematic/visualization

- uses: actions/upload-pages-artifact@v1
- uses: actions/upload-pages-artifact@v3
with:
path: docs/schematic
name: github-pages

# Deploy the artifact to GitHub pages.
# This is a separate job so that only actions/deploy-pages has the necessary permissions.
Expand All @@ -93,4 +81,4 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v4
15 changes: 2 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -33,21 +33,10 @@ jobs:
poetry config virtualenvs.create true;
poetry config virtualenvs.in-project true;
#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

#----------------------------------------------
# install dependencies and root project
#----------------------------------------------
- name: Install dependencies and root project
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --all-extras

#----------------------------------------------
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/scan_repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Modified from mono repo: https://github.com/Sage-Bionetworks/sage-monorepo/blob/main/.github/workflows/scan-repo.yml
# Also, reference: https://github.com/aquasecurity/trivy-action?tab=readme-ov-file#using-trivy-to-scan-your-git-repo
name: Scan Git repo
on:
push:
branches:
- develop
pull_request:
workflow_dispatch:

jobs:
trivy:
name: Trivy
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@master
with:
# the scan targets the file system.
scan-type: 'fs'
# it will ignore vulnerabilities without a fix.
ignore-unfixed: true
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH,MEDIUM,LOW'
limit-severities-for-sarif: true

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'
category: Git Repository
Loading

0 comments on commit d4dfaf5

Please sign in to comment.