Skip to content
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

Support dynamic initialization of optional dependencies #96

Merged
merged 3 commits into from
Jan 11, 2024

Conversation

Supereg
Copy link
Member

@Supereg Supereg commented Jan 10, 2024

Support dynamic initialization of optional dependencies

♻️ Current situation & Problem

Optional dependencies are already supported by Spezi. However, they lack the ability to dynamically supply a default value. Currently, you can only declare an optional dependency and check if it was configured e.g. by the user. But it wasn't possible to provide a default value (e.g., behind some runtime check) yourself.

⚙️ Release Notes

  • Add support to dynamically provide a default value for optional dependencies.

📚 Documentation

Documentation was added and updated.

✅ Testing

Extensive testing was added for the new initializer, testing all possible combinations of initialization.

📝 Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

Copy link

codecov bot commented Jan 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (bf2f55b) 91.20% compared to head (51a1879) 91.34%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #96      +/-   ##
==========================================
+ Coverage   91.20%   91.34%   +0.14%     
==========================================
  Files          34       34              
  Lines         693      704      +11     
==========================================
+ Hits          632      643      +11     
  Misses         61       61              
Files Coverage Δ
...Spezi/Dependencies/DependencyPropertyWrapper.swift 91.23% <100.00%> (+0.49%) ⬆️
Sources/Spezi/Spezi/SpeziAppDelegate.swift 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bf2f55b...51a1879. Read the comment docs.

@Supereg Supereg marked this pull request as ready for review January 10, 2024 21:37
@Supereg Supereg requested a review from PSchmiedmayer January 10, 2024 21:37
@Supereg
Copy link
Member Author

Supereg commented Jan 10, 2024

Would suggest tagging this as 1.1.0.

Copy link
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the updates, this looks great!

@Supereg Supereg merged commit c4bf0e9 into main Jan 11, 2024
8 checks passed
@Supereg Supereg deleted the feature/optional-dependencies branch January 11, 2024 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants