Spaces:
Sleeping
Sleeping
WilliamBChf
commited on
Commit
•
01ec39f
1
Parent(s):
37a4ac2
Added more informative help message
Browse files- pysr/__main__.py +2 -2
- pysr/_cli/main.py +26 -7
pysr/__main__.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
from pysr._cli.main import
|
2 |
|
3 |
if __name__ == '__main__':
|
4 |
-
_cli(prog_name="
|
|
|
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("
|
6 |
@click.pass_context
|
7 |
-
def
|
8 |
ctx = context
|
9 |
|
10 |
|
11 |
-
@
|
12 |
-
|
13 |
-
@click.option("-
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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)
|