generated from StanfordBDHG/SwiftPackageTemplate
-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Task model using SwiftData and Schedule creation using Calendar Recurrence Rule #44
Open
Supereg
wants to merge
44
commits into
main
Choose a base branch
from
feature/infinity-loop
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
0db1f38
Initial draft state
Supereg c9efcc7
Use Foundation RecurrenceRule for Schedule. Remove schedule component…
Supereg 8c444c7
Public init
Supereg 010dfd7
Ensure it compiles
Supereg a3f0f3d
Iterate on Model and add support to query events
Supereg 2b7c443
Make environment accessible
Supereg 1ca335c
Some progress
Supereg 102dd7d
Iterate
Supereg 7848353
A working version
Supereg 5c0dc60
Some docs and cleanup
Supereg 6d65471
Keep it working for now
Supereg 8394cd5
Fix some previews
Supereg 5961889
Refining a lot of things
Supereg 9d52d0a
Initial preview release
Supereg 136fe89
Bug fixes and adjustments and initial unit tests
Supereg 61a9a5a
Run on latest Xcode
Supereg 79e9398
redo
Supereg e6cf165
Concurrency for Xcode beta 5
Supereg 952bf47
Do not require the macOS job right now
Supereg 1f95c28
Finalize UI components
Supereg 92f0cc3
Add macros :rocket:
Supereg ea7e1e9
Remove previous scheduler and provide most of the documentation
Supereg 0ef47b8
Add UI tests
Supereg dcea771
Additional changes
Supereg 117e466
Add unit tests for macro
Supereg 49e2f2c
REUSE
Supereg 77ae023
SchedulerUI target and redo category infrastructure to be more easy a…
Supereg 7cc6590
Add snapshot testing for ui components
Supereg 9e0618a
Fix REUSE
Supereg a81aaf0
Update scheme
Supereg c608f87
Declare SpeziSchedulerUI as a dependency for UI tests
Supereg 5af6d19
Only run macOS unit tests if major version is 15
Supereg dac8d08
Use new environment file based output
Supereg 39df9f4
Fix missing imports
Supereg aa31601
Moved Tile infrastructure to SpeziViews
Supereg 478c777
Create TodayList
Supereg b57e276
Docs
Supereg e1e2986
SwiftData is insanity
Supereg 55ed104
Fix description
Supereg a3c6ba6
Final restructuring and documentation
Supereg c609cf2
Do not purge previous storage for now
Supereg 4a92a88
Move some tests do a different target
Supereg 68895a9
Fix imports
Supereg b08e806
Fix import
Supereg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | ||
|
||
Files: Tests/SpeziSchedulerUITests/__Snapshots__/* | ||
Copyright: 2024 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
License: MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// swift-tools-version:5.9 | ||
// swift-tools-version:6.0 | ||
|
||
// | ||
// This source file is part of the Stanford Spezi open-source project | ||
|
@@ -8,41 +8,61 @@ | |
// SPDX-License-Identifier: MIT | ||
// | ||
|
||
import CompilerPluginSupport | ||
import class Foundation.ProcessInfo | ||
import PackageDescription | ||
|
||
|
||
#if swift(<6) | ||
let swiftConcurrency: SwiftSetting = .enableExperimentalFeature("StrictConcurrency") | ||
#else | ||
let swiftConcurrency: SwiftSetting = .enableUpcomingFeature("StrictConcurrency") | ||
#endif | ||
|
||
|
||
let package = Package( | ||
name: "SpeziScheduler", | ||
defaultLocalization: "en", | ||
platforms: [ | ||
.iOS(.v17), | ||
.macOS(.v14), | ||
.visionOS(.v1), | ||
.watchOS(.v10) | ||
.iOS(.v18), | ||
.macOS(.v15), | ||
.visionOS(.v2), | ||
.watchOS(.v11) | ||
], | ||
products: [ | ||
.library(name: "SpeziScheduler", targets: ["SpeziScheduler"]) | ||
.library(name: "SpeziScheduler", targets: ["SpeziScheduler"]), | ||
.library(name: "SpeziSchedulerUI", targets: ["SpeziSchedulerUI"]) | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/StanfordSpezi/SpeziFoundation", from: "2.0.0-beta.2"), | ||
.package(url: "https://github.com/StanfordSpezi/Spezi", from: "1.7.0"), | ||
.package(url: "https://github.com/StanfordSpezi/SpeziStorage", from: "1.1.2") | ||
.package(url: "https://github.com/StanfordSpezi/SpeziViews", branch: "feature/additional-infrastructure"), | ||
.package(url: "https://github.com/StanfordSpezi/SpeziStorage", from: "1.1.2"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO to use a release before we merge the PR. |
||
.package(url: "https://github.com/swiftlang/swift-syntax", from: "600.0.0-prerelease-2024-08-14"), | ||
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing.git", from: "1.17.2") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could probably update this to https://github.com/swiftlang/swift-syntax/releases/tag/600.0.1 |
||
] + swiftLintPackage(), | ||
targets: [ | ||
.macro( | ||
name: "SpeziSchedulerMacros", | ||
dependencies: [ | ||
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"), | ||
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"), | ||
.product(name: "SwiftDiagnostics", package: "swift-syntax") | ||
], | ||
plugins: [] + swiftLintPlugin() | ||
), | ||
.target( | ||
name: "SpeziScheduler", | ||
dependencies: [ | ||
.target(name: "SpeziSchedulerMacros"), | ||
.product(name: "SpeziFoundation", package: "SpeziFoundation"), | ||
.product(name: "Spezi", package: "Spezi"), | ||
.product(name: "SpeziViews", package: "SpeziViews"), | ||
.product(name: "SpeziLocalStorage", package: "SpeziStorage") | ||
], | ||
swiftSettings: [ | ||
swiftConcurrency | ||
plugins: [] + swiftLintPlugin() | ||
), | ||
.target( | ||
name: "SpeziSchedulerUI", | ||
dependencies: [ | ||
.target(name: "SpeziScheduler"), | ||
.product(name: "SpeziViews", package: "SpeziViews") | ||
], | ||
resources: [ | ||
.process("Resources") | ||
], | ||
plugins: [] + swiftLintPlugin() | ||
), | ||
|
@@ -53,8 +73,24 @@ let package = Package( | |
.product(name: "XCTSpezi", package: "Spezi"), | ||
.product(name: "SpeziLocalStorage", package: "SpeziStorage") | ||
], | ||
swiftSettings: [ | ||
swiftConcurrency | ||
plugins: [] + swiftLintPlugin() | ||
), | ||
.testTarget( | ||
name: "SpeziSchedulerUITests", | ||
dependencies: [ | ||
.target(name: "SpeziScheduler"), | ||
.target(name: "SpeziSchedulerUI"), | ||
.product(name: "XCTSpezi", package: "Spezi"), | ||
.product(name: "SnapshotTesting", package: "swift-snapshot-testing") | ||
], | ||
plugins: [] + swiftLintPlugin() | ||
), | ||
.testTarget( | ||
name: "SpeziSchedulerMacrosTest", | ||
dependencies: [ | ||
"SpeziSchedulerMacros", | ||
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"), | ||
.product(name: "SwiftSyntaxMacrosTestSupport", package: "swift-syntax") | ||
], | ||
plugins: [] + swiftLintPlugin() | ||
) | ||
|
@@ -73,7 +109,7 @@ func swiftLintPlugin() -> [Target.PluginUsage] { | |
|
||
func swiftLintPackage() -> [PackageDescription.Package.Dependency] { | ||
if ProcessInfo.processInfo.environment["SPEZI_DEVELOPMENT_SWIFTLINT"] != nil { | ||
[.package(url: "https://github.com/realm/SwiftLint.git", from: "0.55.1")] | ||
[.package(url: "https://github.com/realm/SwiftLint.git", from: "0.56.2")] | ||
} else { | ||
[] | ||
} | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All our runners should be update to macOS 15, we should be able to remove this now.