Skip to content

Commit

Permalink
Update to ResearchKit 3.0 (#27)
Browse files Browse the repository at this point in the history
# Update to ResearchKit 3.0

## ⚙️ Release Notes 
- Updates the project to ResearchKit 3.0

### Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md).
  • Loading branch information
PSchmiedmayer authored May 18, 2024
2 parents 3f70adf + 73026c4 commit e37b463
Show file tree
Hide file tree
Showing 5,089 changed files with 200,983 additions and 322,510 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build

on:
push:
branches: [ 'main', 'stable' ]
pull_request:
branches: [ 'main', 'stable' ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: macos-14
strategy:
matrix:
destination: ['platform=iOS\ Simulator,OS=17.4,name=iPhone\ 15\ Pro']
scheme: ['ResearchKit']
name: ${{ matrix.scheme }} Unit Tests
steps:
- uses: actions/checkout@v4
- name: Set Xcode Version
run: sudo xcode-select -s /Applications/Xcode_15.3.app
- name: Test
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -verbose -workspace RKWorkspace.xcworkspace -scheme ${{ matrix.scheme }} -destination ${{ matrix.destination }} build test | xcpretty
28 changes: 25 additions & 3 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

name: Build XCArchive

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
workflow_dispatch:
Expand All @@ -19,17 +23,33 @@ on:
required: true

jobs:
create-xcframework-and-release-workflow:
create-xcframework-and-release-workflow-researchkit:
name: XCFramework
uses: StanfordBDHG/.github/.github/workflows/xcframework.yml@v2
strategy:
matrix:
framework: [ResearchKit, ResearchKitUI]
with:
runsonlabels: '["macOS", "self-hosted"]'
workspaceFile: RKWorkspace.xcworkspace
xcFrameworkName: ResearchKit
scheme: ResearchKit
xcFrameworkName: ${{ matrix.framework }}
scheme: ${{ matrix.framework }}
dryRun: true
version: ${{ inputs.version }}
configuration: Release
sdk: '["iphoneos", "iphonesimulator", "xros", "xrsimulator"]'
create-xcframework-and-release-workflow-researchkit-active-tasks:
name: XCFramework (ResearchKitActiveTask)
uses: StanfordBDHG/.github/.github/workflows/xcframework.yml@v2
with:
runsonlabels: '["macOS", "self-hosted"]'
workspaceFile: RKWorkspace.xcworkspace
xcFrameworkName: ResearchKitActiveTask
scheme: ResearchKitActiveTask
dryRun: true
version: ${{ inputs.version }}
configuration: Release
sdk: '["iphoneos", "iphonesimulator"]'
ios:
name: Build and Test iOS
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
Expand All @@ -45,3 +65,5 @@ jobs:
uses: StanfordBDHG/.github/.github/workflows/create-and-upload-coverage-report.yml@v2
with:
coveragereports: TestApp-iOS.xcresult
secrets:
token: ${{ secrets.CODECOV_TOKEN }}
30 changes: 27 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

name: Create XCFramework and Release

concurrency:
group: Release
cancel-in-progress: false

on:
workflow_dispatch:
inputs:
Expand All @@ -17,16 +21,36 @@ on:
required: true

jobs:
create-xcframework-and-release-workflow:
create-xcframework-and-release-workflow-researchkit:
name: XCFramework
uses: StanfordBDHG/.github/.github/workflows/xcframework.yml@v2
strategy:
matrix:
framework: [ResearchKit, ResearchKitUI]
with:
workspaceFile: RKWorkspace.xcworkspace
xcFrameworkName: ${{ matrix.framework }}
scheme: ${{ matrix.framework }}
version: ${{ inputs.version }}
configuration: Release
runsonlabels: '["macOS", "self-hosted"]'
sdk: '["iphoneos", "iphonesimulator", "xros", "xrsimulator"]'
outputpath: './Sources'
user: PaulsAutomationBot
secrets:
access-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
create-xcframework-and-release-workflow-researchkit-active-tasks:
name: XCFramework (ResearchKitActiveTask)
uses: StanfordBDHG/.github/.github/workflows/xcframework.yml@v2
with:
workspaceFile: RKWorkspace.xcworkspace
xcFrameworkName: ResearchKit
scheme: ResearchKit
xcFrameworkName: ResearchKitActiveTask
scheme: ResearchKitActiveTask
version: ${{ inputs.version }}
configuration: Release
runsonlabels: '["macOS", "self-hosted"]'
sdk: '["iphoneos", "iphonesimulator", "xros", "xrsimulator"]'
outputpath: './Sources'
user: PaulsAutomationBot
secrets:
access-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
2 changes: 2 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,8 @@ excluded: # paths to ignore during linting. Takes precedence over `included`.
- docs
- docs-standalone
- ResearchKit
- ResearchKitActiveTask
- ResearchKitUI
- ResearchKitTests
- samples
- scripts
Expand Down
35 changes: 16 additions & 19 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ codebase. However, other types of contributions are welcome too, in
keeping with the ResearchKit™ framework [best practices](../../wiki/best-practices). For example,
contributions of original free-to-use survey content, back-end integrations,
validation data, and analysis or processing tools are all welcome. Ask
on the [*ResearchKit* Forum](https://forums.developer.apple.com/community/researchkit) or [contact us](https://developer.apple.com/contact/researchkit/) for guidance.
on the [*ResearchKit* Forum](https://developer.apple.com/forums/tags/researchkit) or [contact us](mailto:researchkit@apple.com) for guidance.


Contributing software
Expand All @@ -16,8 +16,7 @@ This page assumes you already know how to check out and build the
code. Contributions to the ResearchKit framework are expected to comply with the
[ResearchKit Contribution Terms and License Policy](#contribution); please familiarize yourself
with this policy prior to submitting a pull request. For any contribution, ensure that you own
the rights or have permission from the copyright holder. (e.g. code, images, surveys, videos
and other content you may include)
the rights or have permission from the copyright holder (e.g. code, images, surveys, videos and other content you may include).

To contribute to ResearchKit:

Expand All @@ -27,7 +26,7 @@ To contribute to ResearchKit:
4. [Run the tests.](#test)
5. [Submit a pull request.](#request)
6. Make any changes requested by the reviewer, and update your pull request as needed.
7. Once accepted, your pull request will be merged into master.
7. Once accepted, your pull request will be merged into main.

Choosing an issue to work on<a name="create"></a>
----------------------------
Expand All @@ -36,13 +35,12 @@ To find an issue to work on, either pick something that you need for
your app, or select one of the issues from our [issue list](../../issues). Or,
consider one of the areas where we'd like to extend ResearchKit:

* Faster 'get started' to a useful app
* More active tasks
* Data analysis for active tasks
* More consent sections
* Back end integrations
* Improving the APIs needed to get started with a ResearchKit project
* New Active Tasks
* Data analysis for Active Tasks
* Backend integrations

If in doubt, bring your idea up on the [*ResearchKit* Forum](https://forums.developer.apple.com/community/researchkit).
If in doubt, bring your idea up on the [ResearchKit Forum](https://developer.apple.com/forums/tags/researchkit).


Creating a personal fork<a name="fork"></a>
Expand All @@ -56,8 +54,7 @@ Develop your changes in your fork<a name="develop"></a>
---------------------------------

Develop your changes using your normal development process. If you
already have code from an existing project, you may need to adjust its
style to more closely match the [ResearchKit framework coding style](./docs-standalone/coding-style-guide.md).
already have code from an existing project, you may need to adjust its style to more closely match the [ResearchKit framework coding style](./docs-standalone/coding-style-guide.md).

New components may need to expose new Public or Private
headers. Public headers are for APIs that are likely to be a stable
Expand All @@ -78,7 +75,7 @@ code to other existing demo apps to exercise your feature.
When adding UI driven components, make sure that they are accessible.
Follow the steps outlined in the [Best Practices](../../wiki/best-practices)
section under Accessibility. Before submitting the pull request, you should
audit your components with Voice Over (or other relevant assistive technologies)
audit your components with VoiceOver (or other relevant assistive technologies)
enabled.

Keep changes that fix different issues separate. For bug fixes,
Expand All @@ -99,11 +96,11 @@ verify that test apps run on both device and simulator.

Where your code affects UI presentation, also test:

* Multiple device form factors (for instance, iPhone 4S, iPhone 5, iPhone 6, iPhone 6 Plus).
* Multiple device form factors (for instance, iPhone SE, iPhone 14, iPhone 15 Pro, iPhone 15 Pro Max).
* Dynamic text, especially at the "Large" setting.
* Rotation between portrait and landscape, where appropriate.

You can use the apps in the `Testing` and `samples` directories to
You can use the `ORKCatalog` app in the `samples` directory to
test your changes.

Submit a pull request<a name="request"></a>
Expand All @@ -120,7 +117,7 @@ After acceptance<a name="after"></a>
----------------

Once your pull request has been accepted, your changes will be merged
to master. You are still responsible for your change after it is
to main. You are still responsible for your change after it is
accepted. Stay in contact, in case bugs are detected that may require
your attention.

Expand All @@ -134,17 +131,17 @@ documentation, or other issues during this process.
Release process
-----------------

The `master` branch is used for work in progress. On `master`:
The `main` branch is used for work in progress. On `main`:

* All test apps should build and run error free.
* Unit tests should all pass.
* Everything should be continuously in working order in English (the
base language).

The project will make periodic releases. When preparing a stable release, we
will branch from `master` to a convergence branch. During this process,
will branch from `main` to a convergence branch. During this process,
changes will be made first to the convergence branch, and then merged into
`master`. On the convergence branch, changes will be made only to:
`main`. On the convergence branch, changes will be made only to:

* Fix high priority issues.
* Update documentation.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015, Apple Inc. All rights reserved.
Copyright (c) 2015-2024, Apple Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Expand Down
21 changes: 17 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,25 +1,38 @@
// swift-tools-version:5.9
// swift-tools-version:5.10
import PackageDescription


let package = Package(
name: "ResearchKit",
platforms: [
.iOS(.v15)
.iOS(.v17),
.visionOS(.v1)
],
products: [
.library(name: "ResearchKit", targets: ["ResearchKit"]),
.library(name: "ResearchKitUI", targets: ["ResearchKitUI"]),
.library(name: "ResearchKitActiveTask", targets: ["ResearchKitActiveTask"]),
.library(name: "ResearchKitSwiftUI", targets: ["ResearchKitSwiftUI"])
],
targets: [
.binaryTarget(
name: "ResearchKit",
path: "./ResearchKit.xcframework"
path: "./Sources/ResearchKit.xcframework"
),
.binaryTarget(
name: "ResearchKitUI",
path: "./Sources/ResearchKitUI.xcframework"
),
.binaryTarget(
name: "ResearchKitActiveTask",
path: "./Sources/ResearchKitActiveTask.xcframework"
),
.target(
name: "ResearchKitSwiftUI",
dependencies: [
.target(name: "ResearchKit")
.target(name: "ResearchKit"),
.target(name: "ResearchKitUI"),
.target(name: "ResearchKitActiveTask", condition: .when(platforms: [.iOS]))
]
)
]
Expand Down
Loading

0 comments on commit e37b463

Please sign in to comment.