diff --git a/README.md b/README.md index b18c8ff3..a1eee7a6 100644 --- a/README.md +++ b/README.md @@ -50,11 +50,11 @@ This project is supported by Région Bretagne (Boost MIND) and by Inria (Explora ## Credits -This project is developed in the Empenn team by Boris Clenet, Elodie Germani, Jeremy Lefort-Besnard and Camille Maumet with contributions by Rémi Gau. +This project is developed in the Empenn team by Boris Clénet, Elodie Germani, Jeremy Lefort-Besnard and Camille Maumet with contributions by Rémi Gau. In addition, this project was presented and received contributions during the following events: - - [OHBM Brainhack 2022](https://ohbm.github.io/hackathon2022/) (June 2022): Elodie Germani, Arshitha Basavaraj, Trang Cao, Rémi Gau, Anna Menacher, Camille Maumet. - - [e-ReproNim FENS NENS Cluster Brainhack](https://repro.school/2023-e-repronim-brainhack/) (June 2023) : Liz Bushby, Boris Clénet, Michael Dayan, Aimee Westbrook. - - [OHBM Brainhack 2023](https://ohbm.github.io/hackathon2023/) (July 2023): Arshitha Basavaraj, Boris Clénet, Rémi Gau, Élodie Germani, Yaroslav Halchenko, Camille Maumet, Paul Taylor. - - [ORIGAMI lab](https://neurodatascience.github.io/) hackathon (September 2023): - [Brainhack Marseille 2023](https://brainhack-marseille.github.io/) (December 2023): + - [ORIGAMI lab](https://neurodatascience.github.io/) hackathon (September 2023): + - [OHBM Brainhack 2023](https://ohbm.github.io/hackathon2023/) (July 2023): Arshitha Basavaraj, Boris Clénet, Rémi Gau, Élodie Germani, Yaroslav Halchenko, Camille Maumet, Paul Taylor. + - [e-ReproNim FENS NENS Cluster Brainhack](https://repro.school/2023-e-repronim-brainhack/) (June 2023) : Liz Bushby, Boris Clénet, Michael Dayan, Aimee Westbrook. + - [OHBM Brainhack 2022](https://ohbm.github.io/hackathon2022/) (June 2022): Elodie Germani, Arshitha Basavaraj, Trang Cao, Rémi Gau, Anna Menacher, Camille Maumet. diff --git a/narps_open/data/description/__main__.py b/narps_open/data/description/__main__.py index b6c9ead3..a7eaa84b 100644 --- a/narps_open/data/description/__main__.py +++ b/narps_open/data/description/__main__.py @@ -7,6 +7,7 @@ from json import dumps from narps_open.data.description import TeamDescription +from narps_open.pipelines import implemented_pipelines def main(): """ Entry-point for the command line tool narps_description """ @@ -14,7 +15,7 @@ def main(): # Parse arguments parser = ArgumentParser(description='Get description of a NARPS pipeline.') parser.add_argument('-t', '--team', type=str, required=True, - help='the team ID') + help='the team ID', choices=implemented_pipelines.keys()) parser.add_argument('-d', '--dictionary', type=str, required=False, choices=[ 'general', diff --git a/narps_open/data/results/__main__.py b/narps_open/data/results/__main__.py index 88111b87..64bbd34f 100644 --- a/narps_open/data/results/__main__.py +++ b/narps_open/data/results/__main__.py @@ -8,7 +8,6 @@ from narps_open.data.results import ResultsCollectionFactory from narps_open.pipelines import implemented_pipelines - def main(): """ Entry-point for the command line tool narps_results """ @@ -16,7 +15,7 @@ def main(): parser = ArgumentParser(description='Get Neurovault collection of results from NARPS teams.') group = parser.add_mutually_exclusive_group(required = True) group.add_argument('-t', '--teams', nargs='+', type=str, action='extend', - help='a list of team IDs') + help='a list of team IDs', choices=implemented_pipelines.keys()) group.add_argument('-a', '--all', action='store_true', help='download results from all teams') parser.add_argument('-r', '--rectify', action='store_true', default = False, required = False, help='rectify the results') diff --git a/narps_open/pipelines/__main__.py b/narps_open/pipelines/__main__.py new file mode 100644 index 00000000..60fd5c76 --- /dev/null +++ b/narps_open/pipelines/__main__.py @@ -0,0 +1,30 @@ +#!/usr/bin/python +# coding: utf-8 + +""" Provide a command-line interface for the package narps_open.pipelines """ + +from argparse import ArgumentParser + +from narps_open.pipelines import get_implemented_pipelines + +def main(): + """ Entry-point for the command line tool narps_open_pipeline """ + + # Parse arguments + parser = ArgumentParser(description='Get description of a NARPS pipeline.') + parser.add_argument('-v', '--verbose', action='store_true', + help='verbose mode') + arguments = parser.parse_args() + + # Print header + print('NARPS Open Pipelines') + + # Print general information about NARS Open Pipelines + print('A codebase reproducing the 70 pipelines of the NARPS study (Botvinik-Nezer et al., 2020) shared as an open resource for the community.') + + # Print pipelines + implemented_pipelines = get_implemented_pipelines() + print(f'There are currently {len(implemented_pipelines)} implemented pipelines: {implemented_pipelines}') + +if __name__ == '__main__': + main() diff --git a/narps_open/tester.py b/narps_open/tester.py index 1a2cf284..c3b48ecd 100644 --- a/narps_open/tester.py +++ b/narps_open/tester.py @@ -8,13 +8,15 @@ import pytest +from narps_open.pipelines import get_implemented_pipelines + def main(): """ Entry-point for the command line tool narps_open_tester """ # Parse arguments parser = ArgumentParser(description='Test the pipelines from NARPS.') parser.add_argument('-t', '--team', type=str, required=True, - help='the team ID') + help='the team ID', choices=get_implemented_pipelines()) arguments = parser.parse_args() sys.exit(pytest.main([