-
Notifications
You must be signed in to change notification settings - Fork 59
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
[WIP] function that read and write to file #96
Conversation
a few notes:
|
i should clarify that relative paths are allowed within the context of the dir within which the code executes, but you cannot pop out of the directory and into another directory. this is mostly to allow for checksum based look ups in the future. |
but I thought that default should be that we run in one file system and we add the relative path to the How the function and test should look like? |
think of it within a container context, we may mount an output directory into the container, and everything will be expected to reside within that output directory. the output directory may well be the checksum dir. relative inside is ok, relative outside is not (so, not |
@satra - ok, but I think for now it doesn't know that if I provide |
the general assumption (like nipype) is that people would provide absolute paths. right now there is no type checking or path checking. for pydra we want to keep assumptions minimum so if you provide and if it is not absolute it should crash per normal python. without type annotation there is no way to determine if the input is a file or a string, so we simply rely on user rather than internal mechanics. similar for outputs, the function should return an absolute path, there is no way pydra can determine if it is returning a file or a string without annotation. once file annotations are in place, we can augment some of these things (just like the hash). |
anyone has experience with pickling new types? Trying to use
|
I might open an issue on cloudpickle. |
@effigies - will do, was just thinking that maybe I'm breaking some basic pickling assumption that I'm not aware of. |
opened the issue: cloudpipe/cloudpickle#301 |
@djarecka It looks like the problem is that we're using Lines 137 to 138 in f59083f
And these should be Lines 143 to 144 in f59083f
|
@effigies - that's because cloudpickle at that time did not support mappingproxy objects. it may be worthwhile checking if cloudpickle works for everything. |
@satra looks like your cloudpipe/cloudpickle#223 was closed by cloudpipe/cloudpickle#245. I can submit a PR with this fix to make sure no old tests are failing. |
@effigies - sure, this will be helpful! I'm still not completely sure if I understand, since my small example (that used only cloudpickle) was really failing, but happy to see fix |
I haven't been able to reproduce a cloudpickle failure, either. What's your |
@effigies - i also can't reproduce the error today... I'm not sure if I can explain how did it happen... I was sure that I was testing with these exact lines... But I also missed the fact that we are using two different pickling libraries, so it's possible that I messed up the imports... Anyway, thank you for help! |
Codecov Report
@@ Coverage Diff @@
## master #96 +/- ##
==========================================
+ Coverage 86.5% 86.55% +0.05%
==========================================
Files 14 14
Lines 2178 2179 +1
Branches 545 545
==========================================
+ Hits 1884 1886 +2
Misses 205 205
+ Partials 89 88 -1
Continue to review full report at Codecov.
|
Enh/file - allow support for hashing Files - closes #96
Types of changes
Summary
we removed all tests with function that operates on files
something is not working properly, can't provide relative paths
Checklist
(we are using
black
: you canpip install pre-commit
,run
pre-commit install
in thepydra
directoryand
black
will be run automatically with each commit)Acknowledgment