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

feat(neon_framework): add neon_storage library #2487

Merged
merged 1 commit into from
Sep 29, 2024

Conversation

Leptopoda
Copy link
Member

We talked about it a lot, and it's finally here.
The neon_storage package does not depend on any platform plugin, thus it's 100% dart only. This would also allow our repositories to not depend on flutter for testing.

Long term, I'd like the custom storage magic to be removed and every storage component to use a custom table.
I already have a branch for the account_repository that I can share if that helps you understand this PR.

This also moves the entire platform selection logic into the package so it can be used separately.

@Leptopoda Leptopoda force-pushed the feat/neon_framework/sotrage_library branch 2 times, most recently from 40478d6 to 15dea3e Compare September 13, 2024 19:48
Copy link

codecov bot commented Sep 13, 2024

Codecov Report

Attention: Patch coverage is 94.66667% with 4 lines in your changes missing coverage. Please review.

Project coverage is 28.56%. Comparing base (116219f) to head (db04e40).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...rk/packages/neon_storage/lib/src/sqlite/table.dart 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2487      +/-   ##
==========================================
+ Coverage   28.52%   28.56%   +0.03%     
==========================================
  Files         355      359       +4     
  Lines      136003   136078      +75     
==========================================
+ Hits        38794    38865      +71     
- Misses      97209    97213       +4     
Flag Coverage Δ *Carryforward flag
account_repository 98.76% <ø> (ø)
cookie_store 99.48% <ø> (ø) Carriedforward from 116219f
dashboard_app 96.05% <ø> (ø)
dynamite 31.05% <ø> (ø) Carriedforward from 116219f
dynamite_end_to_end_test 61.69% <ø> (ø) Carriedforward from 116219f
dynamite_runtime 85.40% <ø> (ø) Carriedforward from 116219f
interceptor_http_client 97.18% <ø> (ø) Carriedforward from 116219f
neon_dashboard 96.05% <ø> (ø) Carriedforward from 116219f
neon_framework 59.27% <ø> (ø)
neon_http_client 97.50% <ø> (ø) Carriedforward from 116219f
neon_notifications 100.00% <ø> (ø) Carriedforward from 116219f
neon_storage 94.66% <94.66%> (?)
neon_talk 99.45% <ø> (ø) Carriedforward from 116219f
nextcloud 24.26% <ø> (ø) Carriedforward from 116219f
notifications_app 97.40% <ø> (ø)
sort_box 90.90% <ø> (ø) Carriedforward from 116219f
talk_app 98.94% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
...n_storage/lib/src/sqlite/_io_database_factory.dart 100.00% <100.00%> (ø)
...on_storage/lib/src/sqlite/database_path_utils.dart 100.00% <100.00%> (ø)
...n_storage/lib/src/sqlite/multi_table_database.dart 100.00% <100.00%> (ø)
...rk/packages/neon_storage/lib/src/sqlite/table.dart 0.00% <0.00%> (ø)

@Leptopoda Leptopoda force-pushed the feat/neon_framework/sotrage_library branch from 15dea3e to 43e5390 Compare September 21, 2024 15:25
@Leptopoda
Copy link
Member Author

I rebased it onto main and dropped the neon_framework migration.
This should make it easier to review.

Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

LGTM, just a few suggestions.

Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

Can you also add the verifyNever() after each verify() (except for cases with no arguments)?

@Leptopoda
Copy link
Member Author

Can you also add the verifyNever() after each verify() (except for cases with no arguments)?

The teardown will now check that all calls are covered by a verify. I see this as redundant.
I'll change the use of equals.

@provokateurin
Copy link
Member

The teardown will now check that all calls are covered by a verify. I see this as redundant.

I missed that 👍

@Leptopoda Leptopoda merged commit f1ecc61 into main Sep 29, 2024
10 checks passed
@Leptopoda Leptopoda deleted the feat/neon_framework/sotrage_library branch September 29, 2024 09:38
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