[ENH]: Simplify Storage interface #472

Merged
synchon merged 24 commits from refactor/storage into main 2025-11-07 11:57:58 +00:00
synchon commented 2025-10-27 13:48:44 +00:00 (Migrated from github.com)
  • description of feature/fix
  • tests added/passed
  • add an entry for the latest changes

This PR refactors the Storage interface to simplify implementation logic and update typing annotations.

* [x] description of feature/fix * [x] tests added/passed * [x] add an entry for the latest changes This PR refactors the `Storage` interface to simplify implementation logic and update typing annotations.
codecov[bot] commented 2025-10-27 14:04:19 +00:00 (Migrated from github.com)

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.64%. Comparing base (6eb4899) to head (eca0f41).
⚠️ Report is 25 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #472      +/-   ##
==========================================
+ Coverage   91.60%   91.64%   +0.03%     
==========================================
  Files         146      146              
  Lines        5919     5862      -57     
  Branches      950      934      -16     
==========================================
- Hits         5422     5372      -50     
+ Misses        321      318       -3     
+ Partials      176      172       -4     
Flag Coverage Δ
docs 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
junifer/storage/base.py 80.35% <ø> (+3.88%) ⬆️
junifer/storage/hdf5.py 93.60% <ø> (-0.43%) ⬇️
junifer/storage/pandas_base.py 95.12% <ø> (-0.63%) ⬇️
junifer/storage/sqlite.py 96.07% <ø> (-0.36%) ⬇️
junifer/storage/utils.py 94.87% <ø> (+2.10%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
## [Codecov](https://app.codecov.io/gh/juaml/junifer/pull/472?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) Report :white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 91.64%. Comparing base ([`6eb4899`](https://app.codecov.io/gh/juaml/junifer/commit/6eb48995c191c116c8f8b831939821a04dd82afe?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml)) to head ([`eca0f41`](https://app.codecov.io/gh/juaml/junifer/commit/eca0f41e4ef7f909c98e40367f75a5d090a6aaf0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml)). :warning: Report is 25 commits behind head on main. <details><summary>Additional details and impacted files</summary> [![Impacted file tree graph](https://app.codecov.io/gh/juaml/junifer/pull/472/graphs/tree.svg?width=650&height=150&src=pr&token=5H21JuZXMw&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml)](https://app.codecov.io/gh/juaml/junifer/pull/472?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) ```diff @@ Coverage Diff @@ ## main #472 +/- ## ========================================== + Coverage 91.60% 91.64% +0.03% ========================================== Files 146 146 Lines 5919 5862 -57 Branches 950 934 -16 ========================================== - Hits 5422 5372 -50 + Misses 321 318 -3 + Partials 176 172 -4 ``` | [Flag](https://app.codecov.io/gh/juaml/junifer/pull/472/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) | Coverage Δ | | |---|---|---| | [docs](https://app.codecov.io/gh/juaml/junifer/pull/472/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) | `100.00% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/juaml/junifer/pull/472?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) | Coverage Δ | | |---|---|---| | [junifer/storage/base.py](https://app.codecov.io/gh/juaml/junifer/pull/472?src=pr&el=tree&filepath=junifer%2Fstorage%2Fbase.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9zdG9yYWdlL2Jhc2UucHk=) | `80.35% <ø> (+3.88%)` | :arrow_up: | | [junifer/storage/hdf5.py](https://app.codecov.io/gh/juaml/junifer/pull/472?src=pr&el=tree&filepath=junifer%2Fstorage%2Fhdf5.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9zdG9yYWdlL2hkZjUucHk=) | `93.60% <ø> (-0.43%)` | :arrow_down: | | [junifer/storage/pandas\_base.py](https://app.codecov.io/gh/juaml/junifer/pull/472?src=pr&el=tree&filepath=junifer%2Fstorage%2Fpandas_base.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9zdG9yYWdlL3BhbmRhc19iYXNlLnB5) | `95.12% <ø> (-0.63%)` | :arrow_down: | | [junifer/storage/sqlite.py](https://app.codecov.io/gh/juaml/junifer/pull/472?src=pr&el=tree&filepath=junifer%2Fstorage%2Fsqlite.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9zdG9yYWdlL3NxbGl0ZS5weQ==) | `96.07% <ø> (-0.36%)` | :arrow_down: | | [junifer/storage/utils.py](https://app.codecov.io/gh/juaml/junifer/pull/472?src=pr&el=tree&filepath=junifer%2Fstorage%2Futils.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9zdG9yYWdlL3V0aWxzLnB5) | `94.87% <ø> (+2.10%)` | :arrow_up: | </details> <details><summary> :rocket: New features to boost your workflow: </summary> - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems. </details>
github-actions[bot] commented 2025-10-27 14:47:22 +00:00 (Migrated from github.com)
PR Preview Action v1.6.2
Preview removed because the pull request was closed.
2025-11-07 13:36 UTC
[PR Preview Action](https://github.com/rossjrw/pr-preview-action) v1.6.2 :---: Preview removed because the pull request was closed. 2025-11-07 13:36 UTC <!-- Sticky Pull Request Commentpr-preview -->
synchon commented 2025-10-27 15:16:57 +00:00 (Migrated from github.com)

CI passes on juseless.

CI passes on juseless.
fraimondo (Migrated from github.com) requested changes 2025-11-06 12:45:23 +00:00
fraimondo (Migrated from github.com) commented 2025-11-06 12:41:54 +00:00

What about the timeseries 2d?

What about the timeseries 2d?
fraimondo (Migrated from github.com) commented 2025-11-06 12:43:53 +00:00

What about a remote URI like in the SQLite case? Is this still a "Path"?

This was set downstream because an URI can be anything, not only a path.

What about a remote URI like in the SQLite case? Is this still a "Path"? This was set downstream because an URI can be anything, not only a path.
synchon (Migrated from github.com) reviewed 2025-11-06 13:11:43 +00:00
synchon (Migrated from github.com) commented 2025-11-06 13:11:42 +00:00

SQLiteFeatureStorage doesn't support timeseries_2d.

SQLiteFeatureStorage doesn't support timeseries_2d.
synchon (Migrated from github.com) reviewed 2025-11-06 13:15:24 +00:00
synchon (Migrated from github.com) commented 2025-11-06 13:15:24 +00:00

Implementations of SQLite and HDF5 feature storage both need to point to a file which can be expressed as a Path. I don't understand what you mean by "remote URI", an example might help.

Implementations of SQLite and HDF5 feature storage both need to point to a file which can be expressed as a Path. I don't understand what you mean by "remote URI", an example might help.
fraimondo (Migrated from github.com) reviewed 2025-11-07 10:56:53 +00:00
fraimondo (Migrated from github.com) commented 2025-11-07 10:56:53 +00:00

It was thought to work with remote SQL databases too. SQLite was just an implementation of the SQL interface. Though for the moment, might be ok to keep it like this.

It was thought to work with remote SQL databases too. SQLite was just an implementation of the SQL interface. Though for the moment, might be ok to keep it like this.
fraimondo (Migrated from github.com) approved these changes 2025-11-07 10:57:07 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
juaml/junifer!472
No description provided.