Skip to content

Commit 49e5ab1

Browse files
authored
simplify DocusaurusRenderer by removing version; bump version (#11)
1 parent fd0eeed commit 49e5ab1

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# SPDX-FileCopyrightText: 2024-present deepset GmbH <[email protected]>
22
#
33
# SPDX-License-Identifier: Apache-2.0
4-
__version__ = "0.6.0"
4+
__version__ = "0.6.1"

src/haystack_pydoc_tools/renderers.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -239,20 +239,6 @@ class DocusaurusRenderer(Renderer):
239239

240240
def init(self, context: Context) -> None:
241241
self.markdown.init(context)
242-
self.version = os.environ.get("PYDOC_TOOLS_HAYSTACK_DOC_VERSION", self._doc_version())
243-
244-
def _doc_version(self) -> str:
245-
"""
246-
Returns the docs version.
247-
"""
248-
# We're assuming hatch is installed and working
249-
res = subprocess.run(["hatch", "version"], capture_output=True, check=True)
250-
res.check_returncode()
251-
full_version = res.stdout.decode().strip()
252-
major, minor = full_version.split(".")[:2]
253-
if "rc0" in full_version:
254-
return f"v{major}.{minor}-unstable"
255-
return f"v{major}.{minor}"
256242

257243
def render(self, modules: t.List[docspec.Module]) -> None:
258244
if self.markdown.filename is None:

0 commit comments

Comments
 (0)