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

DOC: BIDS filter input example #2028

Merged
merged 6 commits into from
Mar 17, 2020

Conversation

utooley
Copy link
Contributor

@utooley utooley commented Mar 10, 2020

#2027, one stab at it.

Added a few lines to the Usage Notes as an example of input to --bids-filter-file. Took me a while of digging through pybids to figure out how to set the config.json up properly; I think that it would be useful to link to an example like that in the discussion of #1770, but couldn't figure out where to put it.

Documentation that should be reviewed

Usage Notes - Positional arguments - bids-filter-file

@auto-comment
Copy link

auto-comment bot commented Mar 10, 2020

Thank your for raising your pull request.

Some of the fMRIPRep maintainers will review your changes as soon as time permits.
I'm attaching below a Review Checklist for the reviewers, to check off during the
review.

PR Review

Please check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide

  • As the reviewer I confirm that there are no conflicts of interest for me to review this work.

Please check what applies in the following aspects of the PR:

Code documentation

  • New functions and modules are documented following the guidelines.
  • Existing code required amendments in documentation and has been updated.
  • Sufficient inline comments ensure readability by other contributors in the long term.

Documentation site

  • The modifications to fMRIPrep in this PR do not require extra documentation. This is a common situation when a bug fix that does not change the code base substantially is submitted.
  • This PR requires documentation. The corresponding documentation will be submitted as an additional PR in the future.
  • This PR requires extra documentation, and will be included within this PR. Please check the boxes that apply best:
    • An existing feature is substantially modified, changing the interface and/or logic of a module.
    • A new feature is being added, therefore full documentation of it will be included
    • This PR addresses an error in existing documentation.
  • Yes, all expected sections of documentation were generated by the CI build, and look as expected

Tests

  • The new functionalities in this PR are covered by the existing tests
  • New test batteries have been included with this PR

Data

  • This PR does not require any additional data to be uploaded to OSF.
  • This PR requires additional data for tests.

Dependencies: smriprep

  • This PR does not require any update on smriprep; or
  • smriprep has correctly been pinned.

Dependencies: niworkflows

  • This PR does not require any update on niworkflows; or
  • niworkflows has correctly been pinned.

Dependencies: sdcflows

  • This PR does not require any update on sdcflows; or
  • sdcflows has correctly been pinned.

Dependencies: Nipype

  • This PR does not require any update on nipype; or
  • nipype has correctly been pinned.

Dependencies: other

  • This PR does not require any update on other dependencies; or
  • other dependencies have correctly been pinned.

Reports generated within CI tests

  • Yes, I have checked the reports of ds005 and they are not modified or the changes are as expected
  • Yes, I have checked the reports of ds054 and they are not modified or the changes are as expected
  • Yes, I have checked the reports of ds010 and they are not modified or the changes are as expected

@oesteban
Copy link
Member

Could you rebase with upstream/master? The latest PR merge should fix the issues you are encountering (namely, dropping one of the flake8 extensions).

@utooley
Copy link
Contributor Author

utooley commented Mar 11, 2020

Sorry, I don't think I did this properly...I was having trouble with rebase, possibly because of a bug in OSX that kept me in an infinite loop, possibly because I haven't ever had to use it before and was trying to learn by doing. Please tell me if I should fix something!

Edit: Building docs locally I ran into issues with fmriprep.cli.parser._build_parser not being found, but the artifact here looks fine.

@effigies
Copy link
Member

Can you show git remote -v? It will make it easier to give rebase instructions.

@utooley
Copy link
Contributor Author

utooley commented Mar 11, 2020

origin	git@github.com:utooley/fmriprep.git (fetch)
origin	git@github.com:utooley/fmriprep.git (push)
upstream	https://github.com/poldracklab/fmriprep.git (fetch)
upstream	https://github.com/poldracklab/fmriprep.git (push)```

I did :

git fetch upstream
git rebase upstream/master

Got caught in a merge conflict, resolved it, but then an infinite loop of "no changes" when trying to git rebase --continue. Apparently there's this which I've now fixed, but not sure if that was really the problem.

@effigies
Copy link
Member

Looks like there's a merge commit. (See network.)

Just git rebase -i upstream/master and set the plan to:

pick ba0af72

Save and quit, and it should go smoothly.

@utooley
Copy link
Contributor Author

utooley commented Mar 11, 2020

Alright, I think I fixed it--let me know if this is wrong! Took me a bit to figure out that I needed to force-push.

@effigies
Copy link
Member

Took me a bit to figure out that I needed to force-push.

Ah, sorry. Yes. I forgot about that. This looks like a good rebase.

Copy link
Collaborator

@mgxd mgxd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Dictionaries are hard to prettify with argparse, I think this would be cleaner as a section of the documentation (perhaps under usage.rst or faq.rst)

Then you could just add a pointer to it similar to how --output-spaces does:
https://github.com/poldracklab/fmriprep/blob/1d93d9e5599d08347ba2b85a4d4590a4c9273814/fmriprep/cli/parser.py#L156

@pep8speaks
Copy link

pep8speaks commented Mar 16, 2020

Hello @utooley! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-03-17 20:15:56 UTC

@utooley
Copy link
Contributor Author

utooley commented Mar 16, 2020

Alright--I added a section to the FAQ, and a pointer in parser.py, though PEP8 doesn't seem to link how long the link is (I tried to break it into a new line in b4eb01b but it didn't seem to work properly?). Not sure what conventions for that are.

Copy link
Collaborator

@mgxd mgxd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good! Hopefully, that suggestion will fix the style error

fmriprep/cli/parser.py Outdated Show resolved Hide resolved
@utooley
Copy link
Contributor Author

utooley commented Mar 17, 2020

Thanks for the tip! I didn't think of formatting that way.

Copy link
Collaborator

@mgxd mgxd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super tiny nitpick but otherwise this is all set, thank you!

docs/faq.rst Outdated Show resolved Hide resolved
@mgxd mgxd changed the base branch from master to maint/20.0.x March 17, 2020 17:26
Copy link
Member

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but I think we can make it a bit more helpful by making clear which queries can be overridden and what exactly is being overridden.

Also some style suggestions.

docs/faq.rst Outdated Show resolved Hide resolved
docs/faq.rst Outdated Show resolved Hide resolved
docs/faq.rst Outdated Show resolved Hide resolved
fmriprep/cli/run.py Outdated Show resolved Hide resolved
For format and clarity on queries.

Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
Copy link
Member

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, and sorry for all the back-and-forth. This LGTM.

@mgxd mgxd merged commit 2f631f8 into nipreps:maint/20.0.x Mar 17, 2020
@mgxd mgxd added this to the 20.0.4 milestone Mar 17, 2020
mgxd added a commit that referenced this pull request Mar 18, 2020
* CLI changes from #2028 were ported to `parser.py`

20.0.4 (March 17, 2020)
=======================
A bug-fix release improving documentation for filtering BIDS files and standardizing CIFTI volume orientation.

With thanks to Ursula Tooley for the contribution.

  * DOC: FAQ section for BIDS filter (#2028)
  * FIX: Ensure BOLD and label orientations are equal (`nipreps/niworkflows#477`_).

.. _`nipreps/niworkflows#477`: nipreps/niworkflows#477
@utooley utooley deleted the docs/bids_filter_input branch April 6, 2024 23:15
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.

5 participants