File tree Expand file tree Collapse file tree 3 files changed +28
-2
lines changed
Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 11from importlib .metadata import version
22
3- __all__ = ["__version__" , "MapsManager" ]
3+ __all__ = ["__version__" ]
44
55__version__ = version ("clinicadl" )
Original file line number Diff line number Diff line change 1+ import argparse
2+
3+ from clinicadl import __version__
4+
5+
6+ def main ():
7+ parser = argparse .ArgumentParser (
8+ prog = "clinicadl" ,
9+ description = "ClinicaDL - Deep learning Library for neuroimaging analysis." ,
10+ epilog = (
11+ "For more information, visit the documentation at "
12+ "https://clinicadl.readthedocs.io/en/stable/\n "
13+ ),
14+ )
15+ parser .add_argument (
16+ "--version" ,
17+ action = "version" ,
18+ version = f"ClinicaDL version { __version__ } " ,
19+ help = "Show the ClinicaDL version and exit." ,
20+ )
21+
22+ args = parser .parse_args ()
23+
24+ if not vars (args ):
25+ print ("ClinicaDL is a deep learning library for neuroimaging analysis." )
26+ print ("Use `clinicadl --help` to see available options." )
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ sphinx-design = "^0.6"
7878sphinx-autodoc-typehints = " ^2"
7979
8080[tool .poetry .scripts ]
81- clinicadl = " clinicadl.cmdline: cli"
81+ clinicadl = " clinicadl.cli:main "
8282
8383[build-system ]
8484requires = [" poetry-core>=1.0.0" ]
You can’t perform that action at this time.
0 commit comments