Skip to content

Commit 48cfb06

Browse files
Grove (#45)
### ♻️ Current situation & Problem Grove renamed its targets and dropped the vendor prefix from the study bundle extension, so the exporter no longer matched the framework it builds against. Separately, ten questionnaires carried no canonical `url`. ### ⚙️ Release Notes - Adopt Grove, pinned to `0.3.0-beta.1`. - Study bundles export as `mhcStudyBundle.studybundle.tar.zst`. - `meta.profile` now references `https://grovealliance.org/fhir/core/StructureDefinition/sdf-Questionnaire`. - Every questionnaire carries a `https://myheartcounts.stanford.edu/fhir/survey/<slug>` url; slugs follow the component ids in `Study.swift`. - `studyRevision` 43 → 44. ### 📚 Documentation No public interface changes beyond the renamed imports, which are documented inline where they appear. ### ✅ Testing `swift test` passes and `validate` succeeds. The export round-trip test pins `studyRevision == 44`, so any future definition change has to bump it deliberately. ### Code of Conduct & Contributing Guidelines By creating and submitting this pull request, you agree to follow our [Code of Conduct](https://github.com/SchmiedmayerLab/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/SchmiedmayerLab/.github/blob/main/CONTRIBUTING.md): - [x] I agree to follow the [Code of Conduct](https://github.com/SchmiedmayerLab/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/SchmiedmayerLab/.github/blob/main/CONTRIBUTING.md).
1 parent 06e410c commit 48cfb06

36 files changed

Lines changed: 69 additions & 59 deletions

.github/workflows/publish-study-definition.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
uses: actions/upload-artifact@v4
9191
with:
9292
name: study-bundle
93-
path: mhcStudyBundle.spezistudybundle.tar.zst
93+
path: mhcStudyBundle.studybundle.tar.zst
9494

9595
authenticate-and-publish:
9696
name: (Development/Staging) Publish Study Bundle to Firebase Storage
@@ -130,9 +130,9 @@ jobs:
130130
131131
- name: Upload study bundle to Firebase Storage
132132
run: |
133-
gsutil cp mhcStudyBundle.spezistudybundle.tar.zst gs://${{ needs.vars.outputs.FIREBASE_PROJECT_ID }}.firebasestorage.app/public/
133+
gsutil cp mhcStudyBundle.studybundle.tar.zst gs://${{ needs.vars.outputs.FIREBASE_PROJECT_ID }}.firebasestorage.app/public/
134134
135-
gsutil acl ch -u AllUsers:R gs://${{ needs.vars.outputs.FIREBASE_PROJECT_ID }}.firebasestorage.app/public/mhcStudyBundle.spezistudybundle.tar.zst
135+
gsutil acl ch -u AllUsers:R gs://${{ needs.vars.outputs.FIREBASE_PROJECT_ID }}.firebasestorage.app/public/mhcStudyBundle.studybundle.tar.zst
136136
137137
- name: Verify upload
138138
run: |
@@ -187,9 +187,9 @@ jobs:
187187
188188
- name: (US production) Upload study bundle to Firebase Storage
189189
run: |
190-
gsutil cp mhcStudyBundle.spezistudybundle.tar.zst gs://${{ needs.vars.outputs.FIREBASE_PROJECT_ID_PRODUCTION_US }}.firebasestorage.app/public/
190+
gsutil cp mhcStudyBundle.studybundle.tar.zst gs://${{ needs.vars.outputs.FIREBASE_PROJECT_ID_PRODUCTION_US }}.firebasestorage.app/public/
191191
192-
gsutil acl ch -u AllUsers:R gs://${{ needs.vars.outputs.FIREBASE_PROJECT_ID_PRODUCTION_US }}.firebasestorage.app/public/mhcStudyBundle.spezistudybundle.tar.zst
192+
gsutil acl ch -u AllUsers:R gs://${{ needs.vars.outputs.FIREBASE_PROJECT_ID_PRODUCTION_US }}.firebasestorage.app/public/mhcStudyBundle.studybundle.tar.zst
193193
194194
- name: (US production) Verify upload
195195
run: |
@@ -221,9 +221,9 @@ jobs:
221221
- name: (UK production) Upload study bundle to Firebase Storage
222222
if: ${{ false }}
223223
run: |
224-
gsutil cp mhcStudyBundle.spezistudybundle.tar.zst gs://${{ needs.vars.outputs.FIREBASE_PROJECT_ID_PRODUCTION_UK }}.firebasestorage.app/public/
224+
gsutil cp mhcStudyBundle.studybundle.tar.zst gs://${{ needs.vars.outputs.FIREBASE_PROJECT_ID_PRODUCTION_UK }}.firebasestorage.app/public/
225225
226-
gsutil acl ch -u AllUsers:R gs://${{ needs.vars.outputs.FIREBASE_PROJECT_ID_PRODUCTION_UK }}.firebasestorage.app/public/mhcStudyBundle.spezistudybundle.tar.zst
226+
gsutil acl ch -u AllUsers:R gs://${{ needs.vars.outputs.FIREBASE_PROJECT_ID_PRODUCTION_UK }}.firebasestorage.app/public/mhcStudyBundle.studybundle.tar.zst
227227
228228
- name: (UK production) Verify upload
229229
if: ${{ false }}

Package.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,24 @@ let package = Package(
2626
.executable(name: "MHCStudyDefinitionExporterCLI", targets: ["MHCStudyDefinitionExporterCLI"])
2727
],
2828
dependencies: [
29-
.package(url: "https://github.com/SchmiedmayerLab/Spezi.git", .upToNextMinor(from: "0.2.1")),
29+
.package(url: "https://github.com/SchmiedmayerLab/Grove.git", exact: "0.3.0-beta.2"),
3030
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.6.2")
3131
],
3232
targets: [
3333
.target(
3434
name: "MHCStudyDefinition",
3535
dependencies: [
36-
.product(name: "SpeziStudyDefinition", package: "Spezi"),
37-
.product(name: "SpeziLocalization", package: "Spezi")
36+
.product(name: "GroveStudyDefinition", package: "Grove"),
37+
.product(name: "GroveLocalization", package: "Grove")
3838
],
3939
resources: [.process("Resources")]
4040
),
4141
.target(
4242
name: "MHCStudyDefinitionExporter",
4343
dependencies: [
4444
"MHCStudyDefinition",
45-
.product(name: "SpeziStudyDefinition", package: "Spezi"),
46-
.product(name: "SpeziLocalization", package: "Spezi")
45+
.product(name: "GroveStudyDefinition", package: "Grove"),
46+
.product(name: "GroveLocalization", package: "Grove")
4747
],
4848
resources: [
4949
.copy("Resources/consent"),
@@ -57,7 +57,7 @@ let package = Package(
5757
dependencies: [
5858
"MHCStudyDefinition",
5959
"MHCStudyDefinitionExporter",
60-
.product(name: "SpeziStudyDefinition", package: "Spezi"),
60+
.product(name: "GroveStudyDefinition", package: "Grove"),
6161
.product(name: "ArgumentParser", package: "swift-argument-parser")
6262
]
6363
),
@@ -66,7 +66,7 @@ let package = Package(
6666
dependencies: [
6767
"MHCStudyDefinition",
6868
"MHCStudyDefinitionExporter",
69-
.product(name: "SpeziStudyDefinition", package: "Spezi")
69+
.product(name: "GroveStudyDefinition", package: "Grove")
7070
]
7171
)
7272
]

Sources/MHCStudyDefinition/Shared.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
// SPDX-License-Identifier: MIT
77
//
88

9-
import SpeziLocalization
10-
import SpeziStudyDefinition
9+
import GroveLocalization
10+
import GroveStudyDefinition
1111

1212

1313
extension StudyBundle.FileReference.Category {

Sources/MHCStudyDefinitionExporter/Exporter.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
//
88

99
import Foundation
10-
import SpeziFoundation
11-
import SpeziLocalization
10+
import GroveFoundation
11+
import GroveLocalization
1212
@_spi(APISupport)
13-
import SpeziStudyDefinition
13+
import GroveStudyDefinition
1414

1515

1616
public enum Format: String, Codable, CaseIterable {

Sources/MHCStudyDefinitionExporter/Resources/questionnaire/ActivityFitness+en-US.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"status": "draft",
77
"meta": {
88
"profile": [
9-
"http://spezi.health/fhir/StructureDefinition/sdf-Questionnaire"
9+
"https://grovealliance.org/fhir/core/StructureDefinition/sdf-Questionnaire"
1010
],
1111
"tag": [
1212
{
@@ -37,6 +37,7 @@
3737
"Patient"
3838
],
3939
"purpose": "Your activity levels, exercise habits, and sleep",
40+
"url": "https://myheartcounts.stanford.edu/fhir/survey/activityFitness",
4041
"item": [
4142
{
4243
"linkId": "7dce4af9-fee1-4abf-a68f-b226b35c13e1",

Sources/MHCStudyDefinitionExporter/Resources/questionnaire/ActivityFitness+es-US.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"status": "draft",
77
"meta": {
88
"profile": [
9-
"http://spezi.health/fhir/StructureDefinition/sdf-Questionnaire"
9+
"https://grovealliance.org/fhir/core/StructureDefinition/sdf-Questionnaire"
1010
],
1111
"tag": [
1212
{
@@ -37,6 +37,7 @@
3737
"Patient"
3838
],
3939
"purpose": "Sus niveles de actividad, hábitos de ejercicio y sueño",
40+
"url": "https://myheartcounts.stanford.edu/fhir/survey/activityFitness",
4041
"item": [
4142
{
4243
"linkId": "7dce4af9-fee1-4abf-a68f-b226b35c13e1",

Sources/MHCStudyDefinitionExporter/Resources/questionnaire/Chronotype+en-US.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"id": "C7BE4197-FD34-4741-9C6D-CD939F9CC232",
77
"meta": {
88
"profile": [
9-
"http://spezi.health/fhir/StructureDefinition/sdf-Questionnaire"
9+
"https://grovealliance.org/fhir/core/StructureDefinition/sdf-Questionnaire"
1010
],
1111
"tag": [
1212
{
@@ -37,6 +37,7 @@
3737
"Patient"
3838
],
3939
"purpose": "Workday vs. weekend sleep pattern snapshot",
40+
"url": "https://myheartcounts.stanford.edu/fhir/survey/chronotype",
4041
"item": [
4142
{
4243
"linkId": "90cb3e9c-71f6-4a48-8fca-47776be52a99",

Sources/MHCStudyDefinitionExporter/Resources/questionnaire/Chronotype+es-US.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"id": "C7BE4197-FD34-4741-9C6D-CD939F9CC232",
77
"meta": {
88
"profile": [
9-
"http://spezi.health/fhir/StructureDefinition/sdf-Questionnaire"
9+
"https://grovealliance.org/fhir/core/StructureDefinition/sdf-Questionnaire"
1010
],
1111
"tag": [
1212
{
@@ -37,6 +37,7 @@
3737
"Patient"
3838
],
3939
"purpose": "Instantánea del patrón de sueño: días laborales vs. fines de semana",
40+
"url": "https://myheartcounts.stanford.edu/fhir/survey/chronotype",
4041
"item": [
4142
{
4243
"linkId": "90cb3e9c-71f6-4a48-8fca-47776be52a99",

Sources/MHCStudyDefinitionExporter/Resources/questionnaire/Diet+en-US.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"status": "draft",
77
"meta": {
88
"profile": [
9-
"http://spezi.health/fhir/StructureDefinition/sdf-Questionnaire"
9+
"https://grovealliance.org/fhir/core/StructureDefinition/sdf-Questionnaire"
1010
],
1111
"tag": [
1212
{

Sources/MHCStudyDefinitionExporter/Resources/questionnaire/Diet+es-US.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"status": "draft",
77
"meta": {
88
"profile": [
9-
"http://spezi.health/fhir/StructureDefinition/sdf-Questionnaire"
9+
"https://grovealliance.org/fhir/core/StructureDefinition/sdf-Questionnaire"
1010
],
1111
"tag": [
1212
{

0 commit comments

Comments
 (0)