Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yangky11 committed Jul 15, 2024
1 parent 0295641 commit 3638b86
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
project = "LeanDojo"
copyright = "2023, LeanDojo Team"
author = "Kaiyu Yang"
release = "2.0.1"
release = "2.0.2"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ exclude = [

[project]
name = "lean-dojo"
version = "2.0.1"
version = "2.0.2"
authors = [
{ name="Kaiyu Yang", email="[email protected]" },
]
Expand Down
2 changes: 1 addition & 1 deletion src/lean_dojo/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

load_dotenv()

__version__ = "2.0.1"
__version__ = "2.0.2"

logger.remove()
if "VERBOSE" in os.environ or "DEBUG" in os.environ:
Expand Down
14 changes: 1 addition & 13 deletions src/lean_dojo/data_extraction/lean.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@
LEAN4_REPO = GITHUB.get_repo("leanprover/lean4")
"""The GitHub Repo for Lean 4 itself."""

LEAN4_NIGHTLY_REPO = GITHUB.get_repo("leanprover/lean4-nightly")
"""The GitHub Repo for Lean 4 nightly releases."""

_URL_REGEX = re.compile(r"(?P<url>.*?)/*")


Expand Down Expand Up @@ -333,18 +330,9 @@ def get_lean4_commit_from_config(config_dict: Dict[str, Any]) -> str:
assert "content" in config_dict, "config_dict must have a 'content' field"
config = config_dict["content"].strip()
prefix = "leanprover/lean4:"

if config == f"{prefix}nightly":
latest_tag = LEAN4_NIGHTLY_REPO.get_tags()[0]
return latest_tag.commit.sha

assert config.startswith(prefix), f"Invalid Lean 4 version: {config}"
version = config[len(prefix) :]

if version.startswith("nightly"):
return _to_commit_hash(LEAN4_NIGHTLY_REPO, version)
else:
return _to_commit_hash(LEAN4_REPO, version)
return _to_commit_hash(LEAN4_REPO, version)


URL = TAG = COMMIT = str
Expand Down

0 comments on commit 3638b86

Please sign in to comment.