Skip to content

Commit

Permalink
Update to Spezi 1.0 (#4)
Browse files Browse the repository at this point in the history
# Update to Spezi 1.0

## ⚙️ Release Notes 
- Updates the Spezi Study Application to Spezi 1.0 and the latest fixes
in the Spezi Packages


## 📝 Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md).
  • Loading branch information
PSchmiedmayer authored Mar 10, 2024
1 parent d9a8810 commit f078a9b
Show file tree
Hide file tree
Showing 78 changed files with 464 additions and 522 deletions.
2 changes: 1 addition & 1 deletion .firebaserc.license
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This source file is part of the Stanford Spezi Study Application project
This source file is part of the StudyApplication based on the Stanford Spezi Template Application project

SPDX-FileCopyrightText: 2022 Stanford University and the project authors (see CONTRIBUTORS.md)

Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/beta-deployment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This source file is part of the Stanford Spezi Study Application project
# This source file is part of the StudyApplication based on the Stanford Spezi Template Application project
#
# SPDX-FileCopyrightText: 2023 Stanford University
#
Expand All @@ -19,21 +19,25 @@ jobs:
name: Build and Test
uses: ./.github/workflows/build-and-test.yml
permissions:
security-events: write
actions: read
contents: read
secrets: inherit
iosapptestflightdeployment:
name: iOS App TestFlight Deployment
needs: buildandtest
uses: StanfordSpezi/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
secrets: inherit
permissions:
contents: read
with:
googleserviceinfoplistpath: 'StudyApplication/Supporting Files/GoogleService-Info.plist'
setupsigning: true
fastlanelane: beta
secrets: inherit
deployfirebase:
name: Deploy Firebase Project
needs: iosapptestflightdeployment
uses: StanfordBDHG/.github/.github/workflows/firebase-deploy.yml@v2
permissions:
contents: read
with:
arguments: '--debug'
secrets:
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This source file is part of the Stanford Spezi Study Application project
# This source file is part of the StudyApplication based on the Stanford Spezi Template Application project
#
# SPDX-FileCopyrightText: 2023 Stanford University
#
Expand All @@ -17,23 +17,36 @@ jobs:
reuse_action:
name: REUSE Compliance Check
uses: StanfordBDHG/.github/.github/workflows/reuse.yml@v2
permissions:
contents: read
swiftlint:
name: SwiftLint
uses: StanfordBDHG/.github/.github/workflows/swiftlint.yml@v2
permissions:
contents: read
markdownlinkcheck:
name: Markdown Link Check
uses: StanfordBDHG/.github/.github/workflows/markdown-link-check.yml@v2
permissions:
contents: read
buildandtest:
name: Build and Test
uses: StanfordSpezi/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
permissions:
contents: read
with:
artifactname: StudyApplication.xcresult
runsonlabels: '["macOS", "self-hosted"]'
setupSimulators: true
setupfirebaseemulator: true
customcommand: "firebase emulators:exec 'fastlane test'"
uploadcoveragereport:
name: Upload Coverage Report
needs: buildandtest
uses: StanfordBDHG/.github/.github/workflows/create-and-upload-coverage-report.yml@v2
permissions:
contents: read
with:
coveragereports: StudyApplication.xcresult
secrets:
token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 3 additions & 1 deletion .github/workflows/monthly-markdown-link-check.yml.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This source file is part of the Stanford Spezi open source project
# This source file is part of the StudyApplication based on the Stanford Spezi Template Application project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
#
Expand All @@ -17,3 +17,5 @@ jobs:
markdown_link_check:
name: Markdown Link Check
uses: StanfordBDHG/.github/.github/workflows/markdown-link-check.yml@v2
permissions:
contents: read
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This source file is part of the Stanford Spezi Study Application project
# This source file is part of the StudyApplication based on the Stanford Spezi Template Application project
#
# SPDX-FileCopyrightText: 2023 Stanford University
#
Expand All @@ -11,6 +11,7 @@
.swiftpm
.derivedData
.build
.docs
!StudyApplication.xcodeproj

# IDE related folders
Expand Down Expand Up @@ -41,4 +42,7 @@ firebase-debug.log*
firebase-debug.*.log*

# Firebase cache
.firebase/
.firebase/

# Swift Package List
StudyApplication/package-list.json
2 changes: 1 addition & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This source file is part of the Stanford Spezi Study Application project
# This source file is part of the StudyApplication based on the Stanford Spezi Template Application project
#
# SPDX-FileCopyrightText: 2023 Stanford University
#
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This source file is part of the Stanford Spezi Study Application project
# This source file is part of the StudyApplication based on the Stanford Spezi Template Application project
#
# SPDX-FileCopyrightText: 2023 Stanford University
#
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<!--
This source file is part of the Stanford Spezi Study Application project
This source file is part of the StudyApplication based on the Stanford Spezi Template Application project
SPDX-FileCopyrightText: 2023 Stanford University
SPDX-License-Identifier: MIT
-->

Study Application Contributors
Spezi Study Application Contributors
=================================

* [Paul Schmiedmayer](https://github.com/PSchmiedmayer)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This source file is part of the Stanford Spezi Study Application project
# This source file is part of the StudyApplication based on the Stanford Spezi Template Application project
#
# SPDX-FileCopyrightText: 2023 Stanford University
#
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock.license
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

This source file is part of the Stanford Spezi Study Application project
This source file is part of the StudyApplication based on the Stanford Spezi Template Application project

SPDX-FileCopyrightText: 2023 Stanford University

Expand Down
51 changes: 6 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,20 @@
<!--
This source file is part of the Stanford Spezi Study Application project
This source file is part of the StudyApplication based on the Stanford Spezi Template Application project
SPDX-FileCopyrightText: 2023 Stanford University
SPDX-License-Identifier: MIT
-->

# Spezi Study Application
# StudyApplication

[![Beta Deployment](https://github.com/StanfordSpezi/SpeziStudyApplication/actions/workflows/beta-deployment.yml/badge.svg)](https://github.com/StanfordSpezi/SpeziStudyApplication/actions/workflows/beta-deployment.yml)
This repository contains the StudyApplication.
The StudyApplication is using the [Spezi](https://github.com/StanfordSpezi/Spezi) ecosystem and builds on top of the [Stanford Spezi Template Application](https://github.com/StanfordSpezi/SpeziTemplateApplication).

This repository contains the Spezi Study Application, hosting studies managed by the Stanford Spezi team.


## Build and Run the Application

You can build and run the application using [Xcode](https://developer.apple.com/xcode/) by opening up the **StudyApplication.xcodeproj**.


### Firebase Setup

The application provides a [Firebase Firestore](https://firebase.google.com/docs/firestore)-based data upload.
It is required to have the [Firebase Emulator Suite](https://firebase.google.com/docs/emulator-suite) to be up and running to use these features to build and test the application locally. Please follow the [installation instructions](https://firebase.google.com/docs/emulator-suite/install_and_configure).

> [!NOTE]
> You do not have to make any modifications to the Firebase configuration, login into the `firebase` CLI using your Google account, or create a project in Firebase to run, build, and test the application!
Startup the [Firebase Emulator Suite](https://firebase.google.com/docs/emulator-suite) using
```
$ firebase emulators:start
```

After the emulators have started up, you can run the application in your simulator to build, test, and run the application and see the results show up in Firebase.


### Other Configuration Options

The application also includes the following feature flags that can be configured in the [scheme editor in Xcode](https://help.apple.com/xcode/mac/11.4/index.html?localePath=en.lproj#/dev0bee46f46) and selecting the **StudyApplication** scheme, the **Run** configuration, and to switch to the **Arguments** tab to add, enable, disable, or remove the following arguments passed on launch:
- ``--skipOnboarding``: Skips the onboarding flow to enable easier development of features in the application and to allow UI tests to skip the onboarding flow.
- ``--showOnboarding``: Always show the onboarding when the application is launched. Makes it easy to modify and test the onboarding flow without the need to manually remove the application or reset the simulator.
- ``--disableFirebase``: Disables the Firebase interactions and the Firebase Firestore upload.
- ``--useFirebaseEmulator``: Defines if the application should connect to the local Firebase emulator. Always set to true when using the iOS simulator.


## Continuous Delivery Workflows

The Spezi Study application includes continuous integration (CI) and continuous delivery (CD) setup.
- Automatically build and test the application on every pull request before deploying it. If your organization doesn't have a self-hosted macOS runner modeled after the setup in the [StanfordBDHG ContinuousIntegration](https://github.com/StanfordBDHG/ContinousIntegration) setup, you will need to remove the `runsonlabels` arguments in the `build-and-test.yml` file to ensure that the build runs on the default macOS runners provided by GitHub.
- An automated setup to deploy the application to TestFlight every time there is a new commit on the repository's main branch.
- Ensure a coherent code style by checking the conformance to the SwiftLint rules defined in `.swiftlint.yml` on every pull request and commit.
- Ensure conformance to the [REUSE Specification]() to property license the application and all related code.

Please refer to the [Stanford Biodesign Digital Health Template Application](https://github.com/StanfordBDHG/TemplateApplication) and the [ContinuousDelivery Example by Paul Schmiedmayer](https://github.com/PSchmiedmayer/ContinousDelivery) for more background about the CI and CD setup for the Spezi Study Application.
> [!NOTE] 
> Do you want to learn more about the Stanford Spezi Template Application and how to use, extend, and modify this application? Check out the [Stanford Spezi Template Application documentation](https://stanfordspezi.github.io/SpeziTemplateApplication)

## Contributing
Expand Down
Loading

0 comments on commit f078a9b

Please sign in to comment.