Skip to content

Commit

Permalink
Revert GitHub-based registry for backend (#587)
Browse files Browse the repository at this point in the history
* Revert "Fix which PySR gets installed in dev test"

This reverts commit 7ba43b5.

* Revert "Update CI for new source"

This reverts commit a3b6f7f.

* Revert "Bump backend version and switch to GitHub version"

This reverts commit 69b4db6.

* Revert git-based backend

* Move pip install to end of dev test

* Undo revert in dev test
  • Loading branch information
MilesCranmer authored Mar 26, 2024
1 parent 5df1590 commit 09bfff6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update_backend_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
major, minor, patch, *dev = pyproject_data["project"]["version"].split(".")
pyproject_data["project"]["version"] = f"{major}.{minor}.{int(patch)+1}"

juliapkg_data["packages"]["SymbolicRegression"]["rev"] = f"v{new_backend_version}"
juliapkg_data["packages"]["SymbolicRegression"]["version"] = f"={new_backend_version}"

with open(pyproject_toml, "w") as toml_file:
toml_file.write(tomlkit.dumps(pyproject_data))
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pysr"
version = "0.18.0"
version = "0.18.1"
authors = [
{name = "Miles Cranmer", email = "miles.cranmer@gmail.com"},
]
Expand Down
3 changes: 1 addition & 2 deletions pysr/juliapkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"packages": {
"SymbolicRegression": {
"uuid": "8254be44-1295-4e6a-a16d-46603ac705cb",
"url": "https://github.com/MilesCranmer/SymbolicRegression.jl",
"rev": "v0.24.1"
"version": "=0.24.1"
},
"Serialization": {
"uuid": "9e88b42a-f829-5b0c-bbe9-9e923198166b",
Expand Down
6 changes: 3 additions & 3 deletions pysr/test/test_dev_pysr.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ RUN mkdir /pysr/pysr/test

# Now, we create a custom version of SymbolicRegression.jl
# First, we get the version from juliapkg.json:
RUN python3 -c 'import json; print(json.load(open("/pysr/pysr/juliapkg.json", "r"))["packages"]["SymbolicRegression"]["rev"])' > /pysr/sr_version
RUN python3 -c 'import json; print(json.load(open("/pysr/pysr/juliapkg.json", "r"))["packages"]["SymbolicRegression"]["version"])' > /pysr/sr_version

# Remove v from the version:
RUN cat /pysr/sr_version | sed 's/^v//g' > /pysr/sr_version_processed
# Remove any = or ^ or ~ from the version:
RUN cat /pysr/sr_version | sed 's/[\^=~]//g' > /pysr/sr_version_processed

# Now, we check out the version of SymbolicRegression.jl that PySR is using:
RUN git clone -b "v$(cat /pysr/sr_version_processed)" --single-branch https://github.com/MilesCranmer/SymbolicRegression.jl /srjl
Expand Down

0 comments on commit 09bfff6

Please sign in to comment.