Skip to content

replace/complement ,-separated listing with standard nargs="+" handling #409

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

Open
yarikoptic opened this issue Feb 7, 2025 · 0 comments

Comments

@yarikoptic
Copy link
Member

ATM, e.g. for query (but also others)

Options:
  -nl, --nidm_file_list TEXT      A comma separated list of NIDM files with
                                  full path  [required]
  -nc, --cde_file_list TEXT       A comma separated list of NIDM CDE files
                                  with full path. Can also be set in the
                                  CDE_DIR environment variable

which is VERY inconvenient to operate from shell since I cannot rely on globbing etc, and need to come up with workarounds like @seanhatton did in notes and I implemented in https://github.com/ReproNim/OpenNeuroDerivatives-NIDM/blob/master/code/do-segstats2nidm-perds#L32

pynidm concat -nl "$(echo $(ls -1 sub-*/*"$ttl"_nidm.ttl) | tr " " "," )" -o "$ttl"_nidm.ttl

I think it would have been much better as

pynidm concat -o "$ttl"_nidm.ttl -nl sub-*/*"$ttl"_nidm.ttl

-- could be added, where needed, to separate out end of options from positional args - python argparse already does that by default IIRC.

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

No branches or pull requests

1 participant