From 641adf06f12ae541ceda70027ab1be2853882744 Mon Sep 17 00:00:00 2001 From: mart-r Date: Fri, 17 Oct 2025 10:48:51 +0100 Subject: [PATCH 1/3] CU-869avu9pv: Add docs link to pyproject.toml --- medcat-v2/pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/medcat-v2/pyproject.toml b/medcat-v2/pyproject.toml index 581d5df6..2389025c 100644 --- a/medcat-v2/pyproject.toml +++ b/medcat-v2/pyproject.toml @@ -127,6 +127,7 @@ test = [] # TODO - list [project.urls] "Homepage" = "https://cogstack.org/" +"Documentation" = "https://docs.cogstack.org/projects/nlp/en/latest/" "Bug Reports" = "https://discourse.cogstack.org/" "Source" = "https://github.com/CogStack/cogstack-nlp/" From 7be5ebbcea246541c417a66ee309e6bbe4b53c93 Mon Sep 17 00:00:00 2001 From: mart-r Date: Fri, 17 Oct 2025 10:50:35 +0100 Subject: [PATCH 2/3] CU-869avu9pv: Try to dynamically set version from tag --- medcat-v2/docs/conf.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/medcat-v2/docs/conf.py b/medcat-v2/docs/conf.py index 19c96c0e..a6a21e95 100644 --- a/medcat-v2/docs/conf.py +++ b/medcat-v2/docs/conf.py @@ -13,6 +13,7 @@ # import os import sys +import re sys.path.insert(0, os.path.abspath('..')) @@ -23,7 +24,14 @@ author = 'CogStack Org' # The full version, including alpha/beta/rc tags -release = ':latest' # where is the version retrievable from? +# apprently shoudl be able ot read from env +release = os.getenv("READTHEDOCS_VERSION", ":latest") + +# Simplify medcat/v2.3.1rc2 → v2.3.1rc2 +m = re.match(r"^medcat/(v[\w\.\-]+)$", release) +if m: + # get (e.g) v2.1.0 from medcat/v2.1.0 tag + release = m.group(1) # -- General configuration --------------------------------------------------- From 01618941c393a816fc8d28328df6240700557e6b Mon Sep 17 00:00:00 2001 From: mart-r Date: Fri, 17 Oct 2025 12:15:10 +0100 Subject: [PATCH 3/3] CU-869avu9pv: Update the release change in conf --- medcat-v2/docs/conf.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/medcat-v2/docs/conf.py b/medcat-v2/docs/conf.py index a6a21e95..baba5db5 100644 --- a/medcat-v2/docs/conf.py +++ b/medcat-v2/docs/conf.py @@ -13,7 +13,6 @@ # import os import sys -import re sys.path.insert(0, os.path.abspath('..')) @@ -27,11 +26,11 @@ # apprently shoudl be able ot read from env release = os.getenv("READTHEDOCS_VERSION", ":latest") -# Simplify medcat/v2.3.1rc2 → v2.3.1rc2 -m = re.match(r"^medcat/(v[\w\.\-]+)$", release) -if m: - # get (e.g) v2.1.0 from medcat/v2.1.0 tag - release = m.group(1) +# Simplify medcat-v2.3.1rc2 → v2.3.1rc2 +# NOTE: in case of tag based releases, the environmental variable +# should contain the sanitised tag as the slug, so the / is +# replaced with the - +release = release.removeprefix("medcat-") # -- General configuration ---------------------------------------------------