-
Notifications
You must be signed in to change notification settings - Fork 532
FIX: Resolving absolute to relative paths in output #2966
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
Conversation
... when a file exists with name coinciding with the value of some output trait (e.g., a file './2' and an integer output v = 2).
Building a solution to nipy#2944, starting from a refactor of ``aggregate_outputs`` to be robuster and perform the referrencing when requested via the new arguiment ``rebase_cwd``.
Codecov Report
@@ Coverage Diff @@
## master #2966 +/- ##
==========================================
- Coverage 67.61% 64.24% -3.37%
==========================================
Files 344 342 -2
Lines 43798 43781 -17
Branches 5471 5482 +11
==========================================
- Hits 29612 28126 -1486
- Misses 13475 14566 +1091
- Partials 711 1089 +378
Continue to review full report at Codecov.
|
@oesteban - just a quick thing if this new release is going to not work with previous versions of pickled files, we should provide an appropriate message. this is mostly an fyi at this point. |
Another issue is really implementing the
w.r.t. the old results files, I could add support to read legacy results files too. |
…rror When ``input_spec`` and/or ``output_spec`` are defined as private classes, pickle has a hard time to find the right type and breaks with Python 2 and 3.4. This problem of pickle has been exposed by the new way of pickling InterfaceResults. I believe we can live with such a restriction - i.e., (In/Out)put specs must not be scoped within the interface (and again, only for Python<3.5). cc/ @satra
@satra, I've split this PR into more digestible pieces, much less involved:
We should also address the questions of how to really implement
It seems that the original intent was indeed to prescribe whether results files contain relative or absolute paths. IMHO results files should have relative paths for the outputs, and we could try to have so for the inputs (although that would require a smarter rebasing function that can identify parents of the base directory). Then, we could have Please let me know if you see something else that can be rescued from this closed PR - in particular, whether there is an appetite to change how results are pickled (without all the unroll/combine process we have right now, which was there to make the data structure amenable to WDYT? |
@oesteban - thanks for all this work and this very descriptive comment. since this requires some extra gray cells, i will read this tonight and make any comments. in general all of this sounds reasonable. one quick note. with relative paths, we would have to consider symlinks on different filesystems/mount points, which is why it was not fully realized. it was primarily created for moving the working directory, which only works with content hashing and not timestamp hashing. |
Building a solution to #2944, starting from a refactor of
aggregate_outputs
to be robuster and perform the referrencing whenrequested via the new arguiment
rebase_cwd
.