Spaces:
Running
Running
MilesCranmer
commited on
Commit
•
7ba43b5
1
Parent(s):
a3b6f7f
Fix which PySR gets installed in dev test
Browse files
pysr/test/generate_dev_juliapkg.py
CHANGED
@@ -9,10 +9,11 @@ path_to_srjl = sys.argv[2]
|
|
9 |
with open(juliapkg_json, "r") as f:
|
10 |
juliapkg = json.load(f)
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
16 |
|
17 |
with open(juliapkg_json, "w") as f:
|
18 |
json.dump(juliapkg, f, indent=4)
|
|
|
9 |
with open(juliapkg_json, "r") as f:
|
10 |
juliapkg = json.load(f)
|
11 |
|
12 |
+
juliapkg["packages"]["SymbolicRegression"] = {
|
13 |
+
"uuid": juliapkg["packages"]["SymbolicRegression"]["uuid"],
|
14 |
+
"path": path_to_srjl,
|
15 |
+
"dev": True,
|
16 |
+
}
|
17 |
|
18 |
with open(juliapkg_json, "w") as f:
|
19 |
json.dump(juliapkg, f, indent=4)
|
pysr/test/test_dev_pysr.dockerfile
CHANGED
@@ -33,8 +33,6 @@ ADD ./pysr/_cli/*.py /pysr/pysr/_cli/
|
|
33 |
|
34 |
RUN mkdir /pysr/pysr/test
|
35 |
|
36 |
-
RUN pip3 install --no-cache-dir .
|
37 |
-
|
38 |
# Now, we create a custom version of SymbolicRegression.jl
|
39 |
# First, we get the version from juliapkg.json:
|
40 |
RUN python3 -c 'import json; print(json.load(open("/pysr/pysr/juliapkg.json", "r"))["packages"]["SymbolicRegression"]["rev"])' > /pysr/sr_version
|
@@ -53,5 +51,5 @@ RUN sed -i 's/module SymbolicRegression/module SymbolicRegression\n__test_functi
|
|
53 |
ADD ./pysr/test/generate_dev_juliapkg.py /generate_dev_juliapkg.py
|
54 |
RUN python3 /generate_dev_juliapkg.py /pysr/pysr/juliapkg.json /srjl
|
55 |
|
56 |
-
#
|
57 |
-
RUN python3 -c 'import pysr'
|
|
|
33 |
|
34 |
RUN mkdir /pysr/pysr/test
|
35 |
|
|
|
|
|
36 |
# Now, we create a custom version of SymbolicRegression.jl
|
37 |
# First, we get the version from juliapkg.json:
|
38 |
RUN python3 -c 'import json; print(json.load(open("/pysr/pysr/juliapkg.json", "r"))["packages"]["SymbolicRegression"]["rev"])' > /pysr/sr_version
|
|
|
51 |
ADD ./pysr/test/generate_dev_juliapkg.py /generate_dev_juliapkg.py
|
52 |
RUN python3 /generate_dev_juliapkg.py /pysr/pysr/juliapkg.json /srjl
|
53 |
|
54 |
+
# Install and pre-compile
|
55 |
+
RUN pip3 install --no-cache-dir . && python3 -c 'import pysr'
|