-
Notifications
You must be signed in to change notification settings - Fork 95
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
[REF] Modularize io #692
[REF] Modularize io #692
Conversation
… modularize-io Experienced numerous conflicts; this is probably an incomplete patch. Conflicts: tedana/decomposition/pca.py tedana/io.py tedana/workflows/tedana.py Co-authored-by: Taylor Salo <tsalo006@fiu.edu>
Hm, an interesting problem I'm running into is that when I run |
I'm still going to take a look at what's causing this strange behavior for the tests, but @tsalo if you take a look at the table and the function that uses it to generate filenames, I think you'll get the gist of what this PR does and you can decide if you like the implementation or not. Maybe @dowdlelt could also take a quick look? |
In general I think this looks great, and it is what I was imagining - a system ask minimal changes from the user (specific convention, if you want), but is flexible enough that code remains legible without a litany of if statements. solid 👍 from me. |
As @dowdlelt notes, the current output names are "kundu" and "bids" I think this is doubly problematic because "kundu" isn't particularly informative and "bids" assumes the bids derivatives outputs won't ever change (i.e. we won't end up with bids_v1, bids_v2, etc). My proposal is to have 3ish options: "orig"(I'm ok with kundu), "bids" and "version X". "bids" will always output the most recent version of the bids derivatives output. "version X" will output whatever was the current output for the given version number. That is any version number less than or equal to 0.0.9 would be identical to "orig", but if bids changes in the future, using the same version number as was used for an older execution will produce matching outputted file names. I suggest using only released versions. That is, if v0.0.9+44 is different from v0.0.9+45, that difference will be lost with time. We'll only commit to saving file name changes that made it into a unique release. To do this, the Semi-related, particularly if a non-default Thoughts? |
The json & tsv files always use bids file naming conventions. I previously suggested that we stick BIDS conventions for file type (i.e. json vs tsv), but we do allow for the file name to chance with the options. Do others have opinions on this? |
That all makes sense. I would propose the following, then:
Apparently I forgot to hit "comment" on this when I wrote it earlier this afternoon. I think we should have a table of table-names so that we can switch conventions for the names of tables as well. It would be weird to only do images. |
Codecov Report
@@ Coverage Diff @@
## bids-derivatives #692 +/- ##
====================================================
+ Coverage 93.58% 93.60% +0.02%
====================================================
Files 26 27 +1
Lines 2041 2096 +55
====================================================
+ Hits 1910 1962 +52
- Misses 131 134 +3
Continue to review full report at Codecov.
|
Tests are passing locally and so did the linter, so this is ready for review. I'm pretty open to making minor changes on the function names. In a future PR, I will add functionality to add the entire file manifest to |
It's crashing when I'm trying to run with
It looks to me like there are a few issues. The main one is that, in constants.py, the options are now |
This reverts commit 84aa513.
@tsalo the one thing that seems unresolved is API documentation, because the entire module-level docstring gets rendered on RTD. I feel like we need to retain the documentation so that things are clear to future developers (read: us 6 months from now), but obviously the rendering is unwieldy. Any thoughts on the best approach there? Additionally, it would make the rendering much larger, but I could put the elements that are rendering on one line (mostly function names in various categories) as separate lines instead. |
I will try to review later today and/or over the weekend. I mostly want to take a deeper look at the global variables before I approve. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving now. We can evaluate some stuff (e.g., globals, jsons, and large docstrings) further within the main PR.
Closes None .
Changes proposed in this pull request:
outdir
from a function argument to anio
global--prefix
option to prepend a name to the output, also anio
global--convention
option to specifybids
orkundu
output, withbids
the defaulttest_io
to match these changesNote: the current solution I have is a little wonky for naming the output files, but I think it should be okay.
split
at the end denotes something that has formatting according to echo-number, which is something thatsplit_ts
requires in order to function properly in the way I wrote this. This is a draft PR so I'm happy to make loads of modifications, but I think the spirit of this implementation should work to solve the problem of varying naming conventions over time while retainining backwards compatibility.This current draft does not allow backwards compatibility to keep
.json
files instead of.tsv
files.