Skip to content

Commit a30defa

Browse files
committed
Merge branch 'main' into portal
2 parents 66387d4 + b5b5cca commit a30defa

File tree

130 files changed

+1984
-1336
lines changed

Some content is hidden

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

130 files changed

+1984
-1336
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.gitlab.com/finestructure/spi-base:1.1.1
1+
FROM registry.gitlab.com/finestructure/spi-base:1.2.0
22

33
# Install SPM build dependencies
44
RUN apt-get update && apt-get install -y curl git make unzip \

.devcontainer/devcontainer.json

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
{
22
"name": "spi-base",
33
"build": { "dockerfile": "Dockerfile" },
4-
"extensions": [
5-
"sswg.swift-lang"
6-
],
7-
"settings": {
8-
"lldb.library": "/usr/lib/liblldb.so"
4+
"forwardPorts": [8080],
5+
"customizations": {
6+
"vscode": {
7+
"extensions": [
8+
"sswg.swift-lang"
9+
],
10+
"settings": {
11+
"lldb.library": "/usr/lib/liblldb.so"
12+
}
13+
}
914
},
10-
"forwardPorts": [8080]
15+
"runArgs": [
16+
"--network=spi_test"
17+
]
1118
}

.env.testing.template

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
DATABASE_HOST=localhost
2-
DATABASE_PORT=5432
1+
# DATABASE_HOST - localhost
2+
# DATABASE_PORT - unused
3+
# CI uses a hard-coded range 6000-6007 of ports and corresponding hosts,
4+
# locally it discovers running containers
5+
# and launches dbs as needed.
36
DATABASE_NAME=spi_test
47
DATABASE_USERNAME=spi_test
58
DATABASE_PASSWORD=xxx

.github/workflows/ci.yml

Lines changed: 101 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,8 @@ jobs:
2929
name: Test
3030
runs-on: ubuntu-latest
3131
container:
32-
image: registry.gitlab.com/finestructure/spi-base:1.1.1
32+
image: registry.gitlab.com/finestructure/spi-base:1.2.0
3333
options: --privileged
34-
services:
35-
postgres:
36-
image: postgres:16-alpine
37-
env:
38-
POSTGRES_DB: spi_test
39-
POSTGRES_USER: spi_test
40-
POSTGRES_PASSWORD: xxx
41-
ports:
42-
- '5432:5432'
43-
options: >-
44-
--health-cmd pg_isready
45-
--health-interval 10s
46-
--health-timeout 5s
47-
--health-retries 5
4834
steps:
4935
- name: GH Runner bug workaround
5036
run: sysctl -w vm.mmap_rnd_bits=28
@@ -57,23 +43,118 @@ jobs:
5743
run: cp .env.testing.template .env.testing && make test
5844
env:
5945
COLLECTION_SIGNING_PRIVATE_KEY: ${{ secrets.COLLECTION_SIGNING_PRIVATE_KEY }}
60-
DATABASE_HOST: postgres
61-
DATABASE_PORT: '5432'
46+
services:
47+
spi_test_0:
48+
image: postgres:16-alpine
49+
env:
50+
POSTGRES_DB: spi_test
51+
POSTGRES_USER: spi_test
52+
POSTGRES_PASSWORD: xxx
53+
options: >-
54+
--health-cmd pg_isready
55+
--health-interval 10s
56+
--health-timeout 5s
57+
--health-retries 5
58+
spi_test_1:
59+
image: postgres:16-alpine
60+
env:
61+
POSTGRES_DB: spi_test
62+
POSTGRES_USER: spi_test
63+
POSTGRES_PASSWORD: xxx
64+
options: >-
65+
--health-cmd pg_isready
66+
--health-interval 10s
67+
--health-timeout 5s
68+
--health-retries 5
69+
spi_test_2:
70+
image: postgres:16-alpine
71+
env:
72+
POSTGRES_DB: spi_test
73+
POSTGRES_USER: spi_test
74+
POSTGRES_PASSWORD: xxx
75+
options: >-
76+
--health-cmd pg_isready
77+
--health-interval 10s
78+
--health-timeout 5s
79+
--health-retries 5
80+
spi_test_3:
81+
image: postgres:16-alpine
82+
env:
83+
POSTGRES_DB: spi_test
84+
POSTGRES_USER: spi_test
85+
POSTGRES_PASSWORD: xxx
86+
options: >-
87+
--health-cmd pg_isready
88+
--health-interval 10s
89+
--health-timeout 5s
90+
--health-retries 5
91+
spi_test_4:
92+
image: postgres:16-alpine
93+
env:
94+
POSTGRES_DB: spi_test
95+
POSTGRES_USER: spi_test
96+
POSTGRES_PASSWORD: xxx
97+
options: >-
98+
--health-cmd pg_isready
99+
--health-interval 10s
100+
--health-timeout 5s
101+
--health-retries 5
102+
spi_test_5:
103+
image: postgres:16-alpine
104+
env:
105+
POSTGRES_DB: spi_test
106+
POSTGRES_USER: spi_test
107+
POSTGRES_PASSWORD: xxx
108+
options: >-
109+
--health-cmd pg_isready
110+
--health-interval 10s
111+
--health-timeout 5s
112+
--health-retries 5
113+
spi_test_6:
114+
image: postgres:16-alpine
115+
env:
116+
POSTGRES_DB: spi_test
117+
POSTGRES_USER: spi_test
118+
POSTGRES_PASSWORD: xxx
119+
options: >-
120+
--health-cmd pg_isready
121+
--health-interval 10s
122+
--health-timeout 5s
123+
--health-retries 5
124+
spi_test_7:
125+
image: postgres:16-alpine
126+
env:
127+
POSTGRES_DB: spi_test
128+
POSTGRES_USER: spi_test
129+
POSTGRES_PASSWORD: xxx
130+
options: >-
131+
--health-cmd pg_isready
132+
--health-interval 10s
133+
--health-timeout 5s
134+
--health-retries 5
62135
63136
release-build-linux:
64137
name: Release build
65138
runs-on: ubuntu-latest
66139
container:
67-
image: registry.gitlab.com/finestructure/spi-base:1.1.1
140+
image: registry.gitlab.com/finestructure/spi-base:1.2.0
68141
options: --privileged
69142
steps:
70143
- name: GH Runner bug workaround
71144
run: sysctl -w vm.mmap_rnd_bits=28
72145
- name: Checkout code
73146
uses: actions/checkout@v4
74147
with: { 'fetch-depth': 0 }
75-
- name: Build release
76-
run: swift build -c release --static-swift-stdlib -Xlinker -ljemalloc
148+
- name: Test release
149+
run: |
150+
# Since we're only pinging the version api endpoint, no database is needed and
151+
# we can just copy the development template to ensure the db env variables are set.
152+
cp .env.development.template .env.development
153+
swift build -c release --static-swift-stdlib -Xlinker -ljemalloc
154+
$(swift build --show-bin-path -c release)/Run serve --port 8080 --hostname 0.0.0.0 &
155+
sleep 10
156+
echo Probing api/version...
157+
bash -c '[ "$(curl -sL -w "%{http_code}" -o /dev/null http://127.0.0.1:8080/api/version)" == "200" ] || (echo Connection failed ; exit 1)'
77158
78159
# test-macos:
79160
# name: Test macOS
@@ -85,8 +166,6 @@ jobs:
85166
# POSTGRES_DB: spi_dev
86167
# POSTGRES_USER: spi_dev
87168
# POSTGRES_PASSWORD: xxx
88-
# ports:
89-
# - 5432:5432
90169
# options: >-
91170
# --health-cmd pg_isready
92171
# --health-interval 10s

.github/workflows/query-performance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
runs-on: ubuntu-latest
2929
continue-on-error: true
3030
container:
31-
image: registry.gitlab.com/finestructure/spi-base:1.1.1
31+
image: registry.gitlab.com/finestructure/spi-base:1.2.0
3232
steps:
3333
- name: Checkout code
3434
uses: actions/checkout@v4
74.2 KB
Loading

.stylelintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = {
1313
ignoreAtRules: ['else'],
1414
},
1515
],
16-
'color-function-notation': 'legacy',
16+
'color-function-notation': 'modern',
1717
'color-hex-length': 'long',
1818
'custom-property-empty-line-before': null,
1919
'declaration-block-no-redundant-longhand-properties': null,

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# ================================
1919
# Build image
2020
# ================================
21-
FROM registry.gitlab.com/finestructure/spi-base:1.1.1 as build
21+
FROM registry.gitlab.com/finestructure/spi-base:1.2.0 as build
2222

2323
# Set up a build area
2424
WORKDIR /build
@@ -61,7 +61,7 @@ RUN [ -d /build/Resources ] && { mv /build/Resources ./Resources && chmod -R a-w
6161
# ================================
6262
# Run image
6363
# ================================
64-
FROM registry.gitlab.com/finestructure/spi-base:1.1.1
64+
FROM registry.gitlab.com/finestructure/spi-base:1.2.0
6565

6666
# NB sas 2022-09-23: We're not using a dedicated `vapor` user to run the executable, because it
6767
# makes managing the data in the checkouts volume difficult. See

FrontEnd/docc.scss

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ header.spi,
2222
footer.spi {
2323
position: sticky;
2424
width: 100%;
25-
font-family: -apple-system, BlinkMacSystemFont, 'SF Hello', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,
25+
font-family:
26+
-apple-system, BlinkMacSystemFont, 'SF Hello', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,
2627
'Apple Color Emoji', 'Segoe UI Emoji' !important;
2728
font-size: 16px;
2829
line-height: 1.4;
@@ -135,14 +136,14 @@ header.spi {
135136
min-width: 200px;
136137
padding: 15px 0;
137138
background-color: var(--header-background);
138-
border-top: 3px rgba(255, 255, 255, 20%) solid;
139+
border-top: 3px rgb(255 255 255 / 20%) solid;
139140
box-shadow: var(--panel-shadow);
140141

141142
li {
142143
padding: 2px 15px 2px 20px;
143144

144145
&.current {
145-
background-color: rgba(255, 255, 255, 15%);
146+
background-color: rgb(255 255 255 / 15%);
146147
}
147148
}
148149
}
@@ -172,10 +173,10 @@ header.spi {
172173
}
173174

174175
.latest-stable-wrap {
175-
background-color: rgba(255, 255, 255, 7.5%);
176+
background-color: rgb(255 255 255 / 7.5%);
176177

177178
@media (prefers-color-scheme: dark) {
178-
background-color: rgba(0, 0, 0, 12.5%);
179+
background-color: rgb(0 0 0 / 12.5%);
179180
}
180181
}
181182

@@ -212,7 +213,7 @@ header.spi {
212213
font-size: 10px;
213214
text-align: center;
214215
color: var(--header-text);
215-
background-color: rgba(255, 255, 255, 20%);
216+
background-color: rgb(255 255 255 / 20%);
216217
border-radius: 4px;
217218
}
218219
}

FrontEnd/scripts/controllers/vega_chart_controller.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ export class VegaChartController extends Controller {
8989

9090
const labelTextElement = document.createTextNode(dataSet.name)
9191
labelElement.appendChild(labelTextElement)
92-
labelElement.replaceChild
9392
})
9493
return formElement
9594
}
@@ -239,7 +238,7 @@ class ReadyForSwift6Chart {
239238
{
240239
name: 'xscale',
241240
type: 'time',
242-
domain: [{ signal: 'datetime("2024-05-01")' }, { signal: 'datetime("2024-12-31")' }],
241+
domain: { fields: data.map((d) => ({ data: d.id, field: 'date' })) },
243242
range: 'width',
244243
},
245244
{
@@ -257,7 +256,6 @@ class ReadyForSwift6Chart {
257256
{
258257
orient: 'bottom',
259258
scale: 'xscale',
260-
grid: true,
261259
labelAngle: { value: -45 },
262260
labelAlign: { value: 'right' },
263261
},
@@ -321,7 +319,7 @@ class ReadyForSwift6Chart {
321319
y: { scale: 'yscale', signal: 'minYScale' },
322320
y2: { scale: 'yscale', signal: 'maxYScale' },
323321
fill: { value: '#000000' },
324-
opacity: { value: 0.3 },
322+
opacity: { value: 0.1 },
325323
tooltip: {
326324
signal: 'datum.value',
327325
},

0 commit comments

Comments
 (0)