Open
Conversation
…uring .bdf.csv is available for download still
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1663 +/- ##
==========================================
- Coverage 79.24% 79.16% -0.08%
==========================================
Files 79 79
Lines 6731 6759 +28
==========================================
+ Hits 5334 5351 +17
- Misses 1397 1408 +11
🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the electrochemistry (echem) caching/export path to use a .bdf.parquet cache (instead of pickle), while still producing a .bdf.csv file for download where appropriate.
Changes:
- Replace
.RAW_PARSED.pklcaching with_cached.bdf.parquetcaching inCycleBlock. - Add
_save_bdfto write parquet (cache) and optionally CSV (download), and adjust load paths accordingly. - Add
pyarrowto theappsextra and update tests to validate parquet caching behavior.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
pydatalab/src/pydatalab/apps/echem/blocks.py |
Switches echem caching from pickle to parquet and adjusts single/multi load behavior and export paths. |
pydatalab/tests/apps/test_echem_block.py |
Updates/extends tests to assert .bdf.parquet cache creation and removal of pickle artifacts. |
pydatalab/pyproject.toml |
Adds pyarrow dependency to support parquet writes/reads. |
pydatalab/uv.lock |
Locks pyarrow and related resolved artifacts. |
Comments suppressed due to low confidence (1)
pydatalab/src/pydatalab/apps/echem/blocks.py:217
- The
_load_singledocstring still says “with pickle caching”, but this PR removes pickle caching in favor of.bdf.parquetcaching. Please update the docstring (and any references to “BDF export path” if it’s now specifically the.bdf.csvdownload path) to match the new caching behavior.
def _load_single(self, file_id: ObjectId, reload: bool) -> tuple[pd.DataFrame, Path | None]:
"""Parse a single echem file using navani, with pickle caching.
Returns the raw DataFrame and the BDF export path (or None if the source is already BDF
or export failed).
"""
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
datalab
|
||||||||||||||||||||||||||||
| Project |
datalab
|
| Branch Review |
bes/echem_parquet_cacheing
|
| Run status |
|
| Run duration | 09m 45s |
| Commit |
|
| Committer | Ben Smith |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
488
|
| View all changes introduced in this branch ↗︎ | |
…he cache was never being hit. Added useful debugging statements. Fixed bug where navani "state" column with mixed dtypes couldn't be parqued
… succesfully be saved as parquet cache files
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes the echem cacheing file from a .pkl to a .bdf.parquet file.
Fixes a bug where the cache wasn't being loaded for the single file mode, instead reloading from the raw file each time.
Also bumps navani to v0.1.17 so neware excel files are supported by the echem block