Skip to content

Commit de90143

Browse files
committed
Make version check insensitive to dev versions
1 parent 5418991 commit de90143

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

scripts/autogen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"keras_tuner": f"{KERAS_TEAM_GH}/keras-tuner/tree/v1.4.7/",
5454
"keras_cv": f"{KERAS_TEAM_GH}/keras-cv/tree/v0.9.0/",
5555
"keras_nlp": f"{KERAS_TEAM_GH}/keras-nlp/tree/v0.15.1/",
56-
"keras_hub": f"{KERAS_TEAM_GH}/keras-hub/tree/v0.16.1.dev202410020340/",
56+
"keras_hub": f"{KERAS_TEAM_GH}/keras-hub/tree/v0.16.1/",
5757
"tf_keras": f"{KERAS_TEAM_GH}/tf-keras/tree/v2.17.0/",
5858
}
5959
USE_MULTIPROCESSING = False

scripts/docstrings.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import inspect
88
import importlib
99
import itertools
10+
import copy
1011

1112
import render_tags
1213

@@ -134,7 +135,9 @@ def make_source_link(cls, project_url):
134135
project_url = project_url[base_module]
135136
assert project_url.endswith("/"), f"{base_module} not found"
136137
project_url_version = project_url.split("/")[-2].removeprefix("v")
137-
module_version = importlib.import_module(base_module).__version__
138+
module_version = copy.copy(importlib.import_module(base_module).__version__)
139+
if ".dev" in module_version:
140+
module_version = project_url_version[:module_version.find(".dev")]
138141
if module_version != project_url_version:
139142
raise RuntimeError(
140143
f"For project {base_module}, URL {project_url} "

0 commit comments

Comments
 (0)