WilliamBChf commited on
Commit
9941a00
1 Parent(s): 6c1caad

Updated instructions to install Julia dependencies

Browse files
.github/workflows/CI.yml CHANGED
@@ -54,7 +54,7 @@ jobs:
54
  python -m pip install --upgrade pip
55
  pip install -r requirements.txt
56
  python setup.py install
57
- python -c 'import pysr; pysr.install()'
58
  - name: "Install Coverage tool"
59
  run: pip install coverage coveralls
60
  - name: "Run tests"
@@ -112,7 +112,7 @@ jobs:
112
  - name: "Install PySR"
113
  run: |
114
  python3 -m pip install .
115
- python3 -c 'import pysr; pysr.install()'
116
  - name: "Run tests"
117
  run: cd /tmp && python -m pysr.test main
118
 
 
54
  python -m pip install --upgrade pip
55
  pip install -r requirements.txt
56
  python setup.py install
57
+ python -m pysr install
58
  - name: "Install Coverage tool"
59
  run: pip install coverage coveralls
60
  - name: "Run tests"
 
112
  - name: "Install PySR"
113
  run: |
114
  python3 -m pip install .
115
+ python3 -m pysr install
116
  - name: "Run tests"
117
  run: cd /tmp && python -m pysr.test main
118
 
.github/workflows/CI_Windows.yml CHANGED
@@ -54,7 +54,7 @@ jobs:
54
  python -m pip install --upgrade pip
55
  pip install -r requirements.txt
56
  python setup.py install
57
- python -c 'import pysr; pysr.install()'
58
  - name: "Run tests"
59
  run: python -m pysr.test main
60
  - name: "Install Torch"
 
54
  python -m pip install --upgrade pip
55
  pip install -r requirements.txt
56
  python setup.py install
57
+ python -m pysr install
58
  - name: "Run tests"
59
  run: python -m pysr.test main
60
  - name: "Install Torch"
.github/workflows/CI_large_nightly.yml CHANGED
@@ -42,7 +42,7 @@ jobs:
42
  python -m pip install --upgrade pip
43
  pip install -r requirements.txt
44
  python setup.py install
45
- python -c 'import pysr; pysr.install()'
46
  - name: "Run tests"
47
  run: python -m pysr.test main
48
  - name: "Run new env test"
 
42
  python -m pip install --upgrade pip
43
  pip install -r requirements.txt
44
  python setup.py install
45
+ python -m pysr install
46
  - name: "Run tests"
47
  run: python -m pysr.test main
48
  - name: "Run new env test"
.github/workflows/CI_mac.yml CHANGED
@@ -54,7 +54,7 @@ jobs:
54
  python -m pip install --upgrade pip
55
  pip install -r requirements.txt
56
  python setup.py install
57
- python -c 'import pysr; pysr.install()'
58
  - name: "Run tests"
59
  run: python -m pysr.test main
60
  - name: "Install JAX"
 
54
  python -m pip install --upgrade pip
55
  pip install -r requirements.txt
56
  python setup.py install
57
+ python -m pysr install
58
  - name: "Run tests"
59
  run: python -m pysr.test main
60
  - name: "Install JAX"
Dockerfile CHANGED
@@ -28,7 +28,7 @@ ADD ./pysr/ /pysr/pysr/
28
  RUN pip3 install .
29
 
30
  # Install Julia pre-requisites:
31
- RUN python3 -c 'import pysr; pysr.install()'
32
 
33
  # metainformation
34
  LABEL org.opencontainers.image.authors = "Miles Cranmer"
 
28
  RUN pip3 install .
29
 
30
  # Install Julia pre-requisites:
31
+ RUN python3 -m pysr install
32
 
33
  # metainformation
34
  LABEL org.opencontainers.image.authors = "Miles Cranmer"
README.md CHANGED
@@ -83,7 +83,7 @@ pip install -U pysr
83
  ```
84
  3. Finally, to install Julia dependencies:
85
  ```bash
86
- python3 -c 'import pysr; pysr.install()'
87
  ```
88
 
89
  ---
 
83
  ```
84
  3. Finally, to install Julia dependencies:
85
  ```bash
86
+ python3 -m pysr install
87
  ```
88
 
89
  ---
environment.yml CHANGED
@@ -9,4 +9,5 @@ dependencies:
9
  - setuptools
10
  - pyjulia
11
  - openlibm
12
- - openspecfun
 
 
9
  - setuptools
10
  - pyjulia
11
  - openlibm
12
+ - openspecfun
13
+ - click
pysr/_cli/main.py CHANGED
@@ -8,7 +8,7 @@ def cli(context):
8
  ctx = context
9
 
10
 
11
- @cli.command("install")
12
  @click.option("--julia_project", default=None)
13
  @click.option("--quiet", default=False)
14
  @click.option("--precompile", default=None)
 
8
  ctx = context
9
 
10
 
11
+ @cli.command("install", help="Install required Julia dependencies")
12
  @click.option("--julia_project", default=None)
13
  @click.option("--quiet", default=False)
14
  @click.option("--precompile", default=None)
pysr/julia_helpers.py CHANGED
@@ -110,10 +110,8 @@ def install(julia_project=None, quiet=False, precompile=None): # pragma: no cov
110
 
111
  def _import_error():
112
  return """
113
- Required dependencies are not installed or built. Run the following code in the Python REPL:
114
-
115
- >>> import pysr
116
- >>> pysr.install()
117
  """
118
 
119
 
@@ -286,14 +284,14 @@ def _backend_version_assertion(Main):
286
  f"does not match expected version {expected_backend_version}. "
287
  "Things may break. "
288
  "Please update your PySR installation with "
289
- "`python -c 'import pysr; pysr.install()'`."
290
  )
291
  except JuliaError: # pragma: no cover
292
  warnings.warn(
293
  "You seem to have an outdated version of SymbolicRegression.jl. "
294
  "Things may break. "
295
  "Please update your PySR installation with "
296
- "`python -c 'import pysr; pysr.install()'`."
297
  )
298
 
299
 
 
110
 
111
  def _import_error():
112
  return """
113
+ Required dependencies are not installed or built. Run the following command:
114
+ python -m pysr install
 
 
115
  """
116
 
117
 
 
284
  f"does not match expected version {expected_backend_version}. "
285
  "Things may break. "
286
  "Please update your PySR installation with "
287
+ "`python -m pysr install`."
288
  )
289
  except JuliaError: # pragma: no cover
290
  warnings.warn(
291
  "You seem to have an outdated version of SymbolicRegression.jl. "
292
  "Things may break. "
293
  "Please update your PySR installation with "
294
+ "`python -m pysr install`."
295
  )
296
 
297