Skip to content

Commit 209c413

Browse files
committed
Merge branch 'main' into 873-metadata-entry-not-filled-should-show-null
2 parents f1db5fe + 898bcd2 commit 209c413

File tree

609 files changed

+47721
-13318
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

609 files changed

+47721
-13318
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.venv

.flake8

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[flake8]
2+
max-line-length = 180
3+
extend-ignore = E203, E266, E501, W503, E741, E711, E712
4+
exclude = .svn,CVS,.bzr,.hg,.git,__pycache__,venv/*,src/*,.rst,build
5+
max-complexity=16

.github/workflows/backend.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
uses: docker/setup-buildx-action@v2
2929
-
3030
name: Checkout
31-
uses: actions/checkout@v2
31+
uses: actions/checkout@v4
3232
-
3333
name: Login to DockerHub
3434
if: github.event_name != 'pull_request'
@@ -85,7 +85,8 @@ jobs:
8585
name: Build and push
8686
uses: docker/build-push-action@v3
8787
with:
88-
context: ./backend
88+
context: .
89+
file: ./backend/Dockerfile
8990
platforms: linux/amd64,linux/arm64
9091
push: ${{ github.event_name != 'pull_request' }}
9192
tags: ${{ steps.backendMeta.outputs.tags }}
@@ -95,20 +96,20 @@ jobs:
9596
name: Build and push
9697
uses: docker/build-push-action@v3
9798
with:
98-
context: ./backend
99+
context: .
100+
file: ./backend/heartbeat.Dockerfile
99101
platforms: linux/amd64,linux/arm64
100102
push: ${{ github.event_name != 'pull_request' }}
101103
tags: ${{ steps.heartbeatMeta.outputs.tags }}
102-
file: ./backend/heartbeat.Dockerfile
103104
labels: ${{ steps.heartbeatMeta.outputs.labels }}
104105

105106
-
106107
name: Build and push
107108
uses: docker/build-push-action@v3
108109
with:
109-
context: ./backend
110+
context: .
111+
file: ./backend/messages.Dockerfile
110112
platforms: linux/amd64,linux/arm64
111113
push: ${{ github.event_name != 'pull_request' }}
112114
tags: ${{ steps.messagesMeta.outputs.tags }}
113-
file: ./backend/messages.Dockerfile
114-
labels: ${{ steps.messagesMeta.outputs.labels }}
115+
labels: ${{ steps.messagesMeta.outputs.labels }}

.github/workflows/black.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- uses: actions/checkout@v2
24-
- uses: psf/black@stable
24+
- uses: psf/black@23.3.0

.github/workflows/codegen.yaml

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,38 +17,26 @@ jobs:
1717
timeout-minutes: 10
1818
runs-on: ubuntu-latest
1919

20-
strategy:
21-
fail-fast: false
22-
matrix:
23-
node:
24-
- "14"
25-
2620
steps:
27-
- name: Set up QEMU
28-
uses: docker/setup-qemu-action@v2
29-
30-
- name: Set up Docker Buildx
31-
uses: docker/setup-buildx-action@v2
32-
3321
- name: Checkout
34-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
3523

3624
- name: Build Backend no push
3725
uses: docker/build-push-action@v3
3826
with:
39-
context: ./backend
27+
context: .
28+
file: ./backend/Dockerfile
4029
platforms: linux/amd64
4130
push: false
4231
tags: github-action
4332

4433
- name: Start containers
45-
run: docker-compose -f "docker-compose.test.yml" up -d --build
34+
run: docker compose -f "docker-compose.yml" up -d --build
4635

47-
# setup node
4836
- name: Install node
4937
uses: actions/setup-node@v3
5038
with:
51-
node-version: ${{ matrix.node }}
39+
node-version: 16
5240

5341
- name: Install dependencies
5442
working-directory: frontend
@@ -57,7 +45,7 @@ jobs:
5745
- name: Run Codegen
5846
working-directory: frontend
5947
run: npm run codegen:v2:test
60-
48+
6149
- name: Verify Changed files
6250
uses: tj-actions/verify-changed-files@v14
6351
id: verify-changed-files
@@ -73,4 +61,4 @@ jobs:
7361
7462
- name: Stop containers
7563
if: always()
76-
run: docker-compose -f "docker-compose.test.yml" down
64+
run: docker compose -f "docker-compose.yml" down
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Release Helm Charts
2+
3+
defaults:
4+
run:
5+
working-directory: deployments/kubernetes/charts/clowder2
6+
7+
on:
8+
release:
9+
types: [published]
10+
11+
env:
12+
MAIN_REPO: clowder-framework/clowder2
13+
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Get dependencies
24+
run: |
25+
helm repo add bitnami https://charts.bitnami.com/bitnami
26+
helm repo add ncsa https://opensource.ncsa.illinois.edu/charts
27+
helm dep build
28+
29+
- name: Get release info
30+
id: release_info
31+
run: |
32+
version="$(awk '/^version:/ { print $2} ' Chart.yaml)"
33+
changelog="$(sed -e "1,/^### ${version}/d" -e "/^###/,\$d" -e '/^$/d' README.md)"
34+
changelog="${changelog//'%'/'%25'}"
35+
changelog="${changelog//$'\n'/'%0A'}"
36+
changelog="${changelog//$'\r'/'%0D'}"
37+
echo "version=${version}" >> $GITHUB_ENV
38+
echo "changelog=${changelog}" >> $GITHUB_ENV
39+
echo "version: ${version}"
40+
echo "changelog: ${changelog}"
41+
42+
- name: Print Github Info
43+
run: |
44+
echo "github.event_name: ${{ github.event_name }}"
45+
echo "github.repository: ${{ github.repository }}"
46+
echo "github.ref: ${{ github.ref }}"
47+
48+
- name: run helm template
49+
run: helm template .
50+
51+
- name: Publish to NCSA OpenSource
52+
if: |
53+
github.event_name != 'pull_request'
54+
&& github.repository == env.MAIN_REPO
55+
uses: bsord/[email protected]
56+
with:
57+
username: ${{ secrets.HELM_USERNAME }}
58+
password: ${{ secrets.HELM_PASSWORD }}
59+
registry-url: "https://opensource.ncsa.illinois.edu/charts"
60+
chart-folder: "deployments/kubernetes/charts/clowder2"
61+
force: true

.github/workflows/pytest.yml

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,32 @@
11
name: Pytest
2+
23
on: push
34

45
defaults:
56
run:
67
working-directory: backend
78

89
jobs:
9-
test:
10+
uv-example:
11+
name: python
1012
runs-on: ubuntu-latest
11-
timeout-minutes: 10
1213

1314
steps:
14-
- name: Check out repository code
15-
uses: actions/checkout@v2
16-
17-
- name: Setup Python
18-
uses: actions/setup-python@v4
19-
with:
20-
python-version: "3.9"
21-
22-
- name: Install pipenv
23-
run: |
24-
python -m pip install --upgrade pipenv wheel
15+
- uses: actions/checkout@v4
2516

26-
- id: cache-pipenv
27-
uses: actions/cache@v3
28-
with:
29-
path: ~/.local/share/virtualenvs
30-
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v5
3119

32-
- name: Install dependencies
33-
if: steps.cache-pipenv.outputs.cache-hit != 'true'
34-
run: |
35-
pipenv install --deploy --dev
20+
- name: Install the project
21+
run: uv sync --all-extras --dev
3622

3723
- name: Start env
38-
run: docker-compose -f ../docker-compose.dev.yml up -d
24+
run: docker compose -f ../docker-compose.dev.yml up -d
3925

4026
# wait for docker containers to come up before running tests
4127
- name: Sleep for 60 seconds
4228
run: sleep 60s
4329
shell: bash
4430

45-
- name: Run test suite
46-
run: |
47-
pipenv run pytest -v
31+
- name: Run tests
32+
run: uv run pytest app/tests/

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ scripts/keycloak/data/*
5959
# ignore clowder chart deps
6060
deployments/kubernetes/charts/clowder2/charts
6161
deployments/kubernetes/charts/clowder2/*clowder2-software-dev.yaml
62+
*secret*.yaml
6263

6364
# Environments
6465
.env
@@ -82,3 +83,4 @@ secrets.yaml
8283
# faker
8384
official.csv
8485
fact.png
86+
jupyterhub/.env-dev

.pre-commit-config.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
repos:
2+
- repo: local
3+
hooks:
4+
- id: extract-openapi
5+
name: extract-openapi
6+
entry: python backend/extract-openapi.py app.main:app
7+
language: system
8+
pass_filenames: false
9+
- repo: local
10+
hooks:
11+
- id: generate-frontend-api-client
12+
name: generate-frontend-api-client
13+
entry: bash -c 'cd frontend && npm run codegen:v2:file'
14+
language: system
15+
pass_filenames: false
16+
- repo: local
17+
hooks:
18+
- id: eslint
19+
name: eslint
20+
entry: bash -c "cd frontend && npx eslint --fix src"
21+
language: system
22+
- repo: local
23+
hooks:
24+
- id: prettier
25+
name: prettier
26+
entry: bash -c "cd frontend && npx prettier src --write"
27+
language: system
28+
- repo: https://github.com/pre-commit/pre-commit-hooks
29+
rev: v5.0.0
30+
hooks:
31+
- id: check-yaml
32+
exclude: deployments/kubernetes/charts
33+
- id: end-of-file-fixer
34+
exclude: 'openapi.json|frontend/src/openapi/v2/'
35+
- id: trailing-whitespace
36+
exclude: 'openapi.json|frontend/src/openapi/v2/'
37+
- repo: https://github.com/astral-sh/ruff-pre-commit
38+
# Ruff version.
39+
rev: v0.9.4
40+
hooks:
41+
# Run the linter.
42+
- id: ruff
43+
args: [ --fix ]
44+
# Run the formatter.
45+
- id: ruff-format

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10

0 commit comments

Comments
 (0)