Skip to content

Commit 92d31e3

Browse files
authored
Merge branch 'master' into feat/1075/forms-order
2 parents 008c230 + c24c845 commit 92d31e3

57 files changed

Lines changed: 982 additions & 1347 deletions

Some content is hidden

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

.github/labeler.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@
44
- "app/shared/jobs/migrations/*"
55

66
dependencies:
7-
- "poetry.lock"
87
- "pyproject.toml"
9-
- "app/workers/poetry.lock"
10-
- "app/workers/pyproject.toml"
11-
- "app/shared/poetry.lock"
8+
- "app/airflow/pyproject.toml"
129
- "app/shared/pyproject.toml"
13-
- "app/api/poetry.lock"
1410
- "app/api/pyproject.toml"
1511
- "app/next-client-app/package-lock.json"
1612
- "app/next-client-app/package.json"
@@ -25,5 +21,5 @@ dependencies:
2521
"Area: Frontend":
2622
- "app/next-client-app/**"
2723

28-
"Area: Workers":
29-
- "app/workers/**"
24+
"Area: Airflow":
25+
- "app/airflow/**"

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: ci
22
on: [pull_request]
33

4+
permissions:
5+
contents: read
6+
47
jobs:
58
format_python_code:
69
runs-on: ubuntu-latest

.github/workflows/deploy.production.yml

Lines changed: 1 addition & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ on:
55
types: [released]
66

77
env:
8-
AZURE_FUNCTIONAPP_PACKAGE_PATH: "./app/workers"
98
AZURE_WEBAPP_PACKAGE_PATH: "./app/next-client-app"
10-
PYTHON_VERSION: "3.11"
119
NODE_VERSION: 20
1210
app-name: carrot
1311
repo-owner: health-informatics-uon
@@ -18,43 +16,6 @@ permissions:
1816
packages: write # Required to publish packages
1917

2018
jobs:
21-
build-and-publish-workers:
22-
runs-on: ubuntu-latest
23-
steps:
24-
- name: "Checkout GitHub Action"
25-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26-
27-
- name: Setup Python ${{ env.PYTHON_VERSION }} Environment
28-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
29-
with:
30-
python-version: ${{ env.PYTHON_VERSION }}
31-
32-
- name: "Install UV and Pip"
33-
run: |
34-
python -m pip install --upgrade pip
35-
pip install uv
36-
37-
- name: "Resolve Project Dependencies Using UV"
38-
run: |
39-
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
40-
uv pip compile pyproject.toml --output-file requirements.txt
41-
popd
42-
shell: bash
43-
44-
- name: "Install Dependencies Using Pip"
45-
shell: bash
46-
run: |
47-
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
48-
pip install -r requirements.txt --target=".python_packages/lib/site-packages"
49-
popd
50-
51-
- name: Upload artifact for deployment job
52-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
53-
with:
54-
name: functionsapp
55-
path: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
56-
include-hidden-files: true
57-
5819
build-and-publish-web:
5920
runs-on: "ubuntu-latest"
6021

@@ -191,32 +152,10 @@ jobs:
191152
platforms: linux/amd64,linux/arm64
192153
tags: ${{ steps.scheduler_meta.outputs.tags }}
193154

194-
# Deploy Workers Production
195-
deploy-workers-production:
196-
runs-on: ubuntu-latest
197-
needs: build-and-publish-workers
198-
environment: production
199-
200-
steps:
201-
- name: Download artifact from build job
202-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
203-
with:
204-
path: functionsapp
205-
name: functionsapp
206-
207-
- name: "Run Azure Functions Action"
208-
uses: Azure/functions-action@0bd707f87c0b6385742bab336c74e1afc61f6369 # v1.5.3
209-
id: fa
210-
with:
211-
app-name: ${{ vars.AZURE_FUNCTIONS_NAME }}
212-
slot-name: "production"
213-
package: ${{ github.workspace }}/functionsapp
214-
publish-profile: ${{ secrets.AZURE_FUNCAPP_PUBLISH_PROFILE }}
215-
216155
# Deploy Web App Production
217156
deploy-web-production:
218157
runs-on: ubuntu-latest
219-
needs: [build-and-publish-web, deploy-workers-production]
158+
needs: [build-and-publish-web]
220159
environment:
221160
name: "production"
222161
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

.github/workflows/deploy.yml

Lines changed: 2 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ on:
77
workflow_dispatch:
88

99
env:
10-
AZURE_FUNCTIONAPP_PACKAGE_PATH: "./app/workers"
1110
AZURE_WEBAPP_PACKAGE_PATH: "./app/next-client-app"
12-
PYTHON_VERSION: "3.11"
1311
NODE_VERSION: 20
1412
app-name: carrot
1513
repo-owner: health-informatics-uon
@@ -20,43 +18,6 @@ permissions:
2018
packages: write # Required to publish packages
2119

2220
jobs:
23-
build-and-publish-workers:
24-
runs-on: ubuntu-latest
25-
steps:
26-
- name: "Checkout GitHub Action"
27-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28-
29-
- name: Setup Python ${{ env.PYTHON_VERSION }} Environment
30-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
31-
with:
32-
python-version: ${{ env.PYTHON_VERSION }}
33-
34-
- name: "Install UV and Pip"
35-
run: |
36-
python -m pip install --upgrade pip
37-
pip install uv
38-
39-
- name: "Resolve Project Dependencies Using UV"
40-
run: |
41-
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
42-
uv pip compile pyproject.toml --output-file requirements.txt
43-
popd
44-
shell: bash
45-
46-
- name: "Install Dependencies Using Pip"
47-
shell: bash
48-
run: |
49-
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
50-
pip install -r requirements.txt --target=".python_packages/lib/site-packages"
51-
popd
52-
53-
- name: Upload artifact for deployment job
54-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
55-
with:
56-
name: functionsapp
57-
path: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
58-
include-hidden-files: true
59-
6021
build-and-publish-web:
6122
runs-on: "ubuntu-latest"
6223

@@ -193,32 +154,10 @@ jobs:
193154
platforms: linux/amd64,linux/arm64
194155
tags: ${{ steps.scheduler_meta.outputs.tags }}
195156

196-
# Deploy Workers Dev
197-
deploy-workers-dev:
198-
runs-on: ubuntu-latest
199-
needs: [build-and-publish-workers, build-and-publish-web]
200-
environment: dev
201-
202-
steps:
203-
- name: Download artifact from build job
204-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
205-
with:
206-
path: functionsapp
207-
name: functionsapp
208-
209-
- name: "Run Azure Functions Action"
210-
uses: Azure/functions-action@0bd707f87c0b6385742bab336c74e1afc61f6369 # v1.5.3
211-
id: fa
212-
with:
213-
app-name: ${{ vars.AZURE_FUNCTIONS_NAME }}
214-
slot-name: "production"
215-
package: ${{ github.workspace }}/functionsapp
216-
publish-profile: ${{ secrets.AZURE_FUNCAPP_PUBLISH_PROFILE }}
217-
218157
# Deploy Web App Dev
219158
deploy-web-dev:
220159
runs-on: ubuntu-latest
221-
needs: [build-and-publish-web, deploy-workers-dev]
160+
needs: [build-and-publish-web]
222161
environment:
223162
name: "dev"
224163
url: ${{ steps.deploy-web-dev.outputs.webapp-url }}
@@ -330,32 +269,10 @@ jobs:
330269
publish-profile: ${{ secrets.AIRFLOW_SCHEDULER_PUBLISH_PROFILE }}
331270
images: ${{ env.registry }}/${{ env.repo-owner }}/${{ env.app-name }}/airflow-scheduler:${{ github.sha }}
332271

333-
# Deploy Workers Test
334-
deploy-workers-test:
335-
runs-on: ubuntu-latest
336-
needs: deploy-workers-dev
337-
environment: test
338-
339-
steps:
340-
- name: Download artifact from build job
341-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
342-
with:
343-
path: functionsapp
344-
name: functionsapp
345-
346-
- name: "Run Azure Functions Action"
347-
uses: Azure/functions-action@0bd707f87c0b6385742bab336c74e1afc61f6369 # v1.5.3
348-
id: fa
349-
with:
350-
app-name: ${{ vars.AZURE_FUNCTIONS_NAME }}
351-
slot-name: "production"
352-
package: ${{ github.workspace }}/functionsapp
353-
publish-profile: ${{ secrets.AZURE_FUNCAPP_PUBLISH_PROFILE }}
354-
355272
# Deploy Web App Test
356273
deploy-web-test:
357274
runs-on: ubuntu-latest
358-
needs: [deploy-web-dev, deploy-workers-test]
275+
needs: [deploy-web-dev]
359276
environment:
360277
name: "test"
361278
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

.github/workflows/publish.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -73,23 +73,3 @@ jobs:
7373
push: true
7474
platforms: linux/amd64,linux/arm64
7575
tags: ${{ steps.backend_meta.outputs.tags }}
76-
77-
# Tag and build workers
78-
- name: Extract workers Docker metadata
79-
id: workers_meta
80-
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
81-
with:
82-
images: ${{ env.registry }}/${{ env.repo-owner }}/${{ env.app-name }}/workers
83-
tags: |
84-
${{ github.event.release.tag_name }}
85-
${{ github.sha }}
86-
${{ env.RUN_TIMESTAMP }}
87-
88-
- name: Build and push workers image
89-
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
90-
with:
91-
context: ./app
92-
file: ./app/workers/Dockerfile
93-
push: true
94-
platforms: linux/amd64,linux/arm64
95-
tags: ${{ steps.workers_meta.outputs.tags }}

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
name: test
2+
permissions:
3+
contents: read
24

35
on: [pull_request]
46

app/next-client-app/app/(protected)/datasets/columns.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const columns: ColumnDef<DataSet>[] = [
3737
<Link href={`/datasets/${id}/`}>
3838
<Button
3939
variant="link"
40-
className="font-bold text-black dark:text-white"
40+
className="font-bold"
4141
>
4242
{name}
4343
</Button>

app/next-client-app/app/(protected)/layout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import React from "react";
33
import { getServerSession } from "next-auth";
44
import { options } from "@/auth/options";
55
import { MenuBar } from "@/components/core/menubar";
6+
import Footer from "@/components/core/footer";
67

78
export default async function ProtectedLayout({
89
children,
@@ -14,10 +15,11 @@ export default async function ProtectedLayout({
1415

1516
return (
1617
<>
17-
<section className="container mb-5">
18+
<section className="container flex flex-col min-h-svh">
1819
<MenuBar user={user} />
1920
{children}
2021
</section>
22+
<Footer />
2123
</>
2224
);
2325
}

app/next-client-app/app/(protected)/projects/columns.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const columns: ColumnDef<Project>[] = [
2020
<Link href={`/projects/${id}/`}>
2121
<Button
2222
variant="link"
23-
className="font-bold text-black dark:text-white"
23+
className="font-bold"
2424
>
2525
{name}
2626
</Button>

app/next-client-app/app/(protected)/scanreports/[id]/actions-download-menu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ export function ActionsDownloadMenu({ scanreportId }: Props) {
3131
<DropdownMenuGroup>
3232
<DropdownMenuLabel>Downloads</DropdownMenuLabel>
3333
<DropdownMenuItem onSelect={() => handleDownload("application/json")}>
34-
<FileJson className="mr-2 size-4" />
34+
<FileJson />
3535
Mapping JSON
3636
</DropdownMenuItem>
3737
<DropdownMenuItem onSelect={() => handleDownload("text/csv")}>
38-
<FileSpreadsheet className="mr-2 size-4" />
38+
<FileSpreadsheet />
3939
Mapping CSV
4040
</DropdownMenuItem>
4141
</DropdownMenuGroup>

0 commit comments

Comments
 (0)