Spaces:
Running
Running
MilesCranmer
commited on
Commit
•
a3b6f7f
1
Parent(s):
69b4db6
Update CI for new source
Browse files
.github/workflows/update_backend_version.py
CHANGED
@@ -20,7 +20,7 @@ with open(juliapkg_json) as f:
|
|
20 |
major, minor, patch, *dev = pyproject_data["project"]["version"].split(".")
|
21 |
pyproject_data["project"]["version"] = f"{major}.{minor}.{int(patch)+1}"
|
22 |
|
23 |
-
juliapkg_data["packages"]["SymbolicRegression"]["
|
24 |
|
25 |
with open(pyproject_toml, "w") as toml_file:
|
26 |
toml_file.write(tomlkit.dumps(pyproject_data))
|
|
|
20 |
major, minor, patch, *dev = pyproject_data["project"]["version"].split(".")
|
21 |
pyproject_data["project"]["version"] = f"{major}.{minor}.{int(patch)+1}"
|
22 |
|
23 |
+
juliapkg_data["packages"]["SymbolicRegression"]["rev"] = f"v{new_backend_version}"
|
24 |
|
25 |
with open(pyproject_toml, "w") as toml_file:
|
26 |
toml_file.write(tomlkit.dumps(pyproject_data))
|
pysr/test/generate_dev_juliapkg.py
CHANGED
@@ -9,7 +9,8 @@ path_to_srjl = sys.argv[2]
|
|
9 |
with open(juliapkg_json, "r") as f:
|
10 |
juliapkg = json.load(f)
|
11 |
|
12 |
-
del juliapkg["packages"]["SymbolicRegression"]["
|
|
|
13 |
juliapkg["packages"]["SymbolicRegression"]["path"] = path_to_srjl
|
14 |
juliapkg["packages"]["SymbolicRegression"]["dev"] = True
|
15 |
|
|
|
9 |
with open(juliapkg_json, "r") as f:
|
10 |
juliapkg = json.load(f)
|
11 |
|
12 |
+
del juliapkg["packages"]["SymbolicRegression"]["rev"]
|
13 |
+
del juliapkg["packages"]["SymbolicRegression"]["url"]
|
14 |
juliapkg["packages"]["SymbolicRegression"]["path"] = path_to_srjl
|
15 |
juliapkg["packages"]["SymbolicRegression"]["dev"] = True
|
16 |
|
pysr/test/test_dev_pysr.dockerfile
CHANGED
@@ -37,10 +37,10 @@ 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"]["
|
41 |
|
42 |
-
# Remove
|
43 |
-
RUN cat /pysr/sr_version | sed 's
|
44 |
|
45 |
# Now, we check out the version of SymbolicRegression.jl that PySR is using:
|
46 |
RUN git clone -b "v$(cat /pysr/sr_version_processed)" --single-branch https://github.com/MilesCranmer/SymbolicRegression.jl /srjl
|
|
|
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
|
41 |
|
42 |
+
# Remove v from the version:
|
43 |
+
RUN cat /pysr/sr_version | sed 's/^v//g' > /pysr/sr_version_processed
|
44 |
|
45 |
# Now, we check out the version of SymbolicRegression.jl that PySR is using:
|
46 |
RUN git clone -b "v$(cat /pysr/sr_version_processed)" --single-branch https://github.com/MilesCranmer/SymbolicRegression.jl /srjl
|