biocore / pyqi

Tools for developing and testing command line interfaces in Python.
Other
9 stars 13 forks source link

Added new option: existing_dirpaths #199

Closed josenavas closed 10 years ago

josenavas commented 10 years ago

A new option type is added: existing_dirpaths. This option allows to the user to provide a comma-separated list of directories, and it checks its existence and that it is a directory.

I have a use case for that in the QIIME-Scaling project, and I'm sure that there are more use cases out there.

wasade commented 10 years ago

Thanks @josenavas. Could you please add a unit test?

jairideout commented 10 years ago

Can you please also update the documentation?

http://bipy.github.io/pyqi/doc/tutorials/defining_new_interfaces.html#optparseoption-types

josenavas commented 10 years ago

Sure. Where are exactly the unit tests for that? I'm looking at tests/test_core/test_interfaces/test_optparse/test_init.py and I'm not seeing any test for the checking functions...

ghost commented 10 years ago

Build results will soon be (or already are) available at: http://ci.qiime.org/job/pyqi-github-pr/22/

josenavas commented 10 years ago

I have updated the documentation and I added all the unit tests for the type checker functions.

Furthermore, I notices that the check_new_filepath and check_new_dirpath were not doing anything, when we can check something there: if the passed path exists, we should check that it is not a directory or a file, respectivelly.

If you see an use case where this checks will make the application fail, let me know and I will revert this changes.

ghost commented 10 years ago

Build results will soon be (or already are) available at: http://ci.qiime.org/job/pyqi-github-pr/23/

jairideout commented 10 years ago

Thanks @josenavas! @wasade do you have bandwidth to review?

ghost commented 10 years ago

Build results will soon be (or already are) available at: http://ci.qiime.org/job/pyqi-github-pr/24/

jairideout commented 10 years ago

@josenavas sorry this fell off our radar. I reviewed it and it looks good. Can you please fix the merge conflict? After that, I'll merge.

josenavas commented 10 years ago

@jrrideout The merge conflict should be solved, let me know if there is any other issue!

ghost commented 10 years ago

Build results will soon be (or already are) available at: http://ci.qiime.org/job/pyqi-github-pr/50/

jairideout commented 10 years ago

Looks good, thanks @josenavas!