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

Access *_path with node.use_tmp_paths #749

Merged

Conversation

PythonFZ
Copy link
Member

@PythonFZ PythonFZ commented Dec 15, 2023

In addition to:

return self.state.fs.read_text(self.outs)

you can now use an actual directory through, for tools that do not support the DVCFileSystem

with self.state.use_tmp_paths():
    return self.outs.read_text()

Open questions

  • How to avoid using the temporary directory, if the data already exists within the cwd?

  • loading multiple *_path

  • what if the *_path is a list / dict / ... ?

  • could this be a from_rev or load feature? Where you run:

with zntrack.from_rev(node, use_tmp_path=True):
    ...

use_tmp_path vs use_tmp_paths ?

@PythonFZ PythonFZ linked an issue Dec 15, 2023 that may be closed by this pull request
Copy link

codecov bot commented Dec 15, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (9def0fe) 86.29% compared to head (65cab74) 86.48%.

Files Patch % Lines
zntrack/utils/config.py 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #749      +/-   ##
==========================================
+ Coverage   86.29%   86.48%   +0.18%     
==========================================
  Files          25       25              
  Lines        1948     1990      +42     
  Branches      820      835      +15     
==========================================
+ Hits         1681     1721      +40     
- Misses        267      269       +2     
Flag Coverage Δ
fulltest 86.48% <95.55%> (+0.18%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@PythonFZ PythonFZ merged commit 1a50fc6 into main Dec 19, 2023
12 checks passed
@PythonFZ PythonFZ deleted the 746-access-zntrackouts_path-that-can-not-use-selfstatefs branch December 19, 2023 12:01
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.

access zntrack.outs_path that can not use self.state.fs
1 participant