[ENH]: Add read() method for storage-like objects #236

Merged
synchon merged 8 commits from feat/storage-read into main 2023-07-03 16:02:58 +00:00
synchon commented 2023-06-28 10:27:30 +00:00 (Migrated from github.com)
  • description of feature/fix
  • tests added/passed
  • add an entry for the latest changes

This PR adds a new read() method for storage-like objects. As of now, only HDF5FeatureStorage is implemented and allows to retrieve a feature as it is stored. This will allow users to do post-processing on the stored feature.

* [x] description of feature/fix * [x] tests added/passed * [x] add an entry for the latest changes This PR adds a new `read()` method for `storage-like` objects. As of now, only `HDF5FeatureStorage` is implemented and allows to retrieve a feature as it is stored. This will allow users to do post-processing on the stored feature.
github-actions[bot] commented 2023-06-28 10:34:41 +00:00 (Migrated from github.com)
PR Preview Action v1.4.4
🚀 Deployed preview to https://juaml.github.io/junifer/pr-preview/pr-236/
on branch gh-pages at 2023-06-28 13:14 UTC
[PR Preview Action](https://github.com/rossjrw/pr-preview-action) v1.4.4 :---: :rocket: Deployed preview to https://juaml.github.io/junifer/pr-preview/pr-236/ on branch [`gh-pages`](https://github.com/juaml/junifer/tree/gh-pages) at 2023-06-28 13:14 UTC <!-- Sticky Pull Request Commentpr-preview -->
codecov[bot] commented 2023-06-28 11:08:44 +00:00 (Migrated from github.com)

Codecov Report

Merging #236 (a8e565f) into main (c811a65) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #236      +/-   ##
==========================================
- Coverage   93.61%   93.57%   -0.05%     
==========================================
  Files          82       82              
  Lines        3460     3578     +118     
  Branches      644      668      +24     
==========================================
+ Hits         3239     3348     +109     
- Misses        144      147       +3     
- Partials       77       83       +6     
Flag Coverage Δ
docs 100.00% <ø> (ø)
junifer 93.57% <100.00%> (-0.05%) ⬇️

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

Impacted Files Coverage Δ
junifer/storage/base.py 82.75% <100.00%> (+0.94%) ⬆️
junifer/storage/hdf5.py 93.30% <100.00%> (+0.07%) ⬆️
junifer/storage/sqlite.py 96.40% <100.00%> (+0.04%) ⬆️

... and 3 files with indirect coverage changes

## [Codecov](https://app.codecov.io/gh/juaml/junifer/pull/236?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) Report > Merging [#236](https://app.codecov.io/gh/juaml/junifer/pull/236?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) (a8e565f) into [main](https://app.codecov.io/gh/juaml/junifer/commit/c811a65c451082252a48a1ddfb94b79161351cac?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) (c811a65) will **decrease** coverage by `0.05%`. > The diff coverage is `100.00%`. [![Impacted file tree graph](https://app.codecov.io/gh/juaml/junifer/pull/236/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/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) ```diff @@ Coverage Diff @@ ## main #236 +/- ## ========================================== - Coverage 93.61% 93.57% -0.05% ========================================== Files 82 82 Lines 3460 3578 +118 Branches 644 668 +24 ========================================== + Hits 3239 3348 +109 - Misses 144 147 +3 - Partials 77 83 +6 ``` | Flag | Coverage Δ | | |---|---|---| | docs | `100.00% <ø> (ø)` | | | junifer | `93.57% <100.00%> (-0.05%)` | :arrow_down: | 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. | [Impacted Files](https://app.codecov.io/gh/juaml/junifer/pull/236?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/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9zdG9yYWdlL2Jhc2UucHk=) | `82.75% <100.00%> (+0.94%)` | :arrow_up: | | [junifer/storage/hdf5.py](https://app.codecov.io/gh/juaml/junifer/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9zdG9yYWdlL2hkZjUucHk=) | `93.30% <100.00%> (+0.07%)` | :arrow_up: | | [junifer/storage/sqlite.py](https://app.codecov.io/gh/juaml/junifer/pull/236?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9zdG9yYWdlL3NxbGl0ZS5weQ==) | `96.40% <100.00%> (+0.04%)` | :arrow_up: | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/juaml/junifer/pull/236/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml)
fraimondo (Migrated from github.com) requested changes 2023-06-30 07:55:49 +00:00
@ -235,6 +235,38 @@ class SQLiteFeatureStorage(PandasBaseFeatureStorage):
out[md5][k] = json.loads(v)
fraimondo (Migrated from github.com) commented 2023-06-30 07:55:45 +00:00

Can you rewrite this message so that users are hinted to contact the junifer devs if they need this feature? Something like that it is with the following: "This feature is not currently planned to be implemented in the near future. If you need such functionality, contact junifer developers (LINK TO HOW TO CONTACT)"

Can you rewrite this message so that users are hinted to contact the junifer devs if they need this feature? Something like that it is with the following: "This feature is not currently planned to be implemented in the near future. If you need such functionality, contact junifer developers (LINK TO HOW TO CONTACT)"
synchon (Migrated from github.com) reviewed 2023-06-30 08:07:44 +00:00
@ -235,6 +235,38 @@ class SQLiteFeatureStorage(PandasBaseFeatureStorage):
out[md5][k] = json.loads(v)
synchon (Migrated from github.com) commented 2023-06-30 08:07:44 +00:00

Maybe ask them to open an issue?

Maybe ask them to open an issue?
fraimondo (Migrated from github.com) reviewed 2023-07-03 09:00:59 +00:00
@ -235,6 +235,38 @@ class SQLiteFeatureStorage(PandasBaseFeatureStorage):
out[md5][k] = json.loads(v)
fraimondo (Migrated from github.com) commented 2023-07-03 09:00:59 +00:00

we have a link on the doc that can be used for that.

we have a link on the doc that can be used for that.
synchon (Migrated from github.com) reviewed 2023-07-03 09:51:58 +00:00
@ -235,6 +235,38 @@ class SQLiteFeatureStorage(PandasBaseFeatureStorage):
out[md5][k] = json.loads(v)
synchon (Migrated from github.com) commented 2023-07-03 09:51:58 +00:00

Are you referring to the Matrix channel link?

Are you referring to the Matrix channel link?
fraimondo (Migrated from github.com) reviewed 2023-07-03 10:26:40 +00:00
@ -235,6 +235,38 @@ class SQLiteFeatureStorage(PandasBaseFeatureStorage):
out[md5][k] = json.loads(v)
fraimondo (Migrated from github.com) commented 2023-07-03 10:26:40 +00:00
https://juaml.github.io/junifer/main/help.html
fraimondo (Migrated from github.com) approved these changes 2023-07-03 13:34:55 +00:00
fraimondo commented 2023-07-03 13:35:37 +00:00 (Migrated from github.com)

docs are failing

docs are failing
synchon commented 2023-07-03 13:37:10 +00:00 (Migrated from github.com)

docs are failing

That's coz of julearn example and it's failing to import from sklearn, my guess would be because of a new version of sklearn. So either we don't run the example for now or pin the version in julearn?

> docs are failing That's coz of julearn example and it's failing to import from sklearn, my guess would be because of a new version of sklearn. So either we don't run the example for now or pin the version in julearn?
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!236
No description provided.