WilliamBChf commited on
Commit
01ec39f
1 Parent(s): 37a4ac2

Added more informative help message

Browse files
Files changed (2) hide show
  1. pysr/__main__.py +2 -2
  2. pysr/_cli/main.py +26 -7
pysr/__main__.py CHANGED
@@ -1,4 +1,4 @@
1
- from pysr._cli.main import cli as _cli
2
 
3
  if __name__ == '__main__':
4
- _cli(prog_name="cli")
 
1
+ from pysr._cli.main import pysr as _cli
2
 
3
  if __name__ == '__main__':
4
+ _cli(prog_name="pysr")
pysr/_cli/main.py CHANGED
@@ -2,16 +2,35 @@ import click
2
  from ..julia_helpers import install
3
 
4
 
5
- @click.group("cli")
6
  @click.pass_context
7
- def cli(context):
8
  ctx = context
9
 
10
 
11
- @cli.command("install", help="Install Julia dependencies for PySR")
12
- @click.option("-p", "julia_project", "--project", default=None, type=str)
13
- @click.option("-q", "--quiet", is_flag=True, default=False)
14
- @click.option("--precompile", 'precompile', flag_value=True, default=None)
15
- @click.option("--no-precompile", 'precompile', flag_value=False, default=None)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  def _install(julia_project, quiet, precompile):
17
  install(julia_project, quiet, precompile)
 
2
  from ..julia_helpers import install
3
 
4
 
5
+ @click.group("pysr")
6
  @click.pass_context
7
+ def pysr(context):
8
  ctx = context
9
 
10
 
11
+ @pysr.command("install",
12
+ help="Install Julia dependencies for PySR.")
13
+ @click.option("-p",
14
+ "julia_project",
15
+ "--project",
16
+ default=None,
17
+ type=str,
18
+ help="Install in a specific Julia project (e.g., a local copy of SymbolicRegression.jl).",
19
+ metavar="PROJECT_DIRECTORY")
20
+ @click.option("-q",
21
+ "--quiet",
22
+ is_flag=True,
23
+ default=False,
24
+ help="Disable logging.")
25
+ @click.option("--precompile",
26
+ 'precompile',
27
+ flag_value=True,
28
+ default=None,
29
+ help="Force precompilation of Julia libraries.")
30
+ @click.option("--no-precompile",
31
+ 'precompile',
32
+ flag_value=False,
33
+ default=None,
34
+ help="Disable precompilation.")
35
  def _install(julia_project, quiet, precompile):
36
  install(julia_project, quiet, precompile)