From b8ad1f2042ed414e06b120ca46ddfe425dcda2f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hensgen?= Date: Wed, 9 Apr 2025 23:16:40 -0400 Subject: [PATCH 1/6] [GEOPY-2049] relock on published geoh5py 0.11.0a3 --- poetry.lock | 26 +++++++++++--------------- pyproject.toml | 4 ++-- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/poetry.lock b/poetry.lock index 93122b8..caf33ab 100644 --- a/poetry.lock +++ b/poetry.lock @@ -293,24 +293,20 @@ test = ["pytest (>=6)"] [[package]] name = "geoh5py" -version = "0.11.0-alpha.3" +version = "0.11.0a3" description = "Python API for geoh5, an open file format for geoscientific data" optional = false -python-versions = "^3.10" -files = [] -develop = false +python-versions = "<4.0,>=3.10" +files = [ + {file = "geoh5py-0.11.0a3-py3-none-any.whl", hash = "sha256:ad6137f0f0829b3e75f8ca44483f6f38730ae985efe67968743c2ee39c86d273"}, + {file = "geoh5py-0.11.0a3.tar.gz", hash = "sha256:add591b909e9282de9b0b96bd96f71b4b21bcf78d62d5b9043e8fac32267f4de"}, +] [package.dependencies] -h5py = "^3.2.1" -numpy = "~1.26.0" -Pillow = "~10.3.0" -pydantic = "^2.5.2" - -[package.source] -type = "git" -url = "https://github.com/MiraGeoscience/geoh5py.git" -reference = "release/0.11.0" -resolved_reference = "adfe3987a9637b148c440234e67df9c16315a8d6" +h5py = ">=3.2.1,<4.0.0" +numpy = ">=1.26.0,<1.27.0" +Pillow = ">=10.3.0,<10.4.0" +pydantic = ">=2.5.2,<3.0.0" [[package]] name = "h5py" @@ -1259,4 +1255,4 @@ numpy = ">=1.7" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "3bac09b73f6ffd7d2f694e98b028830cffcc2226fd15527f26c3c9f361fe0df5" +content-hash = "ed6f0bfd00b9f07cbebb3616b2ae27fedcaa6c4643c4380b110bd4158f84723d" diff --git a/pyproject.toml b/pyproject.toml index 69daed8..d9f18b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,8 +55,8 @@ vectormath = "0.2.*" ## dependencies from Git repositories #------------------------------------ -#geoh5py = {version = ">=0.11.0a1, <0.12.dev", allow-prereleases = true} -geoh5py = {git = "https://github.com/MiraGeoscience/geoh5py.git", rev = "release/0.11.0"} +geoh5py = {version = ">=0.11.0a3, <0.12.dev", allow-prereleases = true} +#geoh5py = {git = "https://github.com/MiraGeoscience/geoh5py.git", rev = "release/0.11.0"} #geoh5py = {path = "../geoh5py", develop = true} [tool.poetry.group.dev.dependencies] From bd05f12413101563a345079b4b82e9414cb54acc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hensgen?= Date: Wed, 9 Apr 2025 23:48:25 -0400 Subject: [PATCH 2/6] [GEOPY-2049] bump version to alpha.2 point again geoh5py release branch --- omf/__init__.py | 2 +- poetry.lock | 26 +++++++++++++++----------- pyproject.toml | 6 +++--- recipe.yaml | 2 +- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/omf/__init__.py b/omf/__init__.py index 4eef6aa..e34363c 100644 --- a/omf/__init__.py +++ b/omf/__init__.py @@ -44,7 +44,7 @@ from .volume import VolumeElement, VolumeGridGeometry -__version__ = "3.3.1-alpha.1" +__version__ = "3.3.1-alpha.2" __author__ = "Global Mining Standards and Guidelines Group, Mira Geoscience Ltd." __license__ = "MIT License" __copyright__ = ( diff --git a/poetry.lock b/poetry.lock index caf33ab..93122b8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -293,20 +293,24 @@ test = ["pytest (>=6)"] [[package]] name = "geoh5py" -version = "0.11.0a3" +version = "0.11.0-alpha.3" description = "Python API for geoh5, an open file format for geoscientific data" optional = false -python-versions = "<4.0,>=3.10" -files = [ - {file = "geoh5py-0.11.0a3-py3-none-any.whl", hash = "sha256:ad6137f0f0829b3e75f8ca44483f6f38730ae985efe67968743c2ee39c86d273"}, - {file = "geoh5py-0.11.0a3.tar.gz", hash = "sha256:add591b909e9282de9b0b96bd96f71b4b21bcf78d62d5b9043e8fac32267f4de"}, -] +python-versions = "^3.10" +files = [] +develop = false [package.dependencies] -h5py = ">=3.2.1,<4.0.0" -numpy = ">=1.26.0,<1.27.0" -Pillow = ">=10.3.0,<10.4.0" -pydantic = ">=2.5.2,<3.0.0" +h5py = "^3.2.1" +numpy = "~1.26.0" +Pillow = "~10.3.0" +pydantic = "^2.5.2" + +[package.source] +type = "git" +url = "https://github.com/MiraGeoscience/geoh5py.git" +reference = "release/0.11.0" +resolved_reference = "adfe3987a9637b148c440234e67df9c16315a8d6" [[package]] name = "h5py" @@ -1255,4 +1259,4 @@ numpy = ">=1.7" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "ed6f0bfd00b9f07cbebb3616b2ae27fedcaa6c4643c4380b110bd4158f84723d" +content-hash = "3bac09b73f6ffd7d2f694e98b028830cffcc2226fd15527f26c3c9f361fe0df5" diff --git a/pyproject.toml b/pyproject.toml index d9f18b2..9012c20 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "mira-omf" -version = "3.3.1-alpha.1" +version = "3.3.1-alpha.2" description = "API Library for Open Mining Format" license = "MIT" authors = [ @@ -55,8 +55,8 @@ vectormath = "0.2.*" ## dependencies from Git repositories #------------------------------------ -geoh5py = {version = ">=0.11.0a3, <0.12.dev", allow-prereleases = true} -#geoh5py = {git = "https://github.com/MiraGeoscience/geoh5py.git", rev = "release/0.11.0"} +#geoh5py = {version = ">=0.11.0a3, <0.12.dev", allow-prereleases = true} +geoh5py = {git = "https://github.com/MiraGeoscience/geoh5py.git", rev = "release/0.11.0"} #geoh5py = {path = "../geoh5py", develop = true} [tool.poetry.group.dev.dependencies] diff --git a/recipe.yaml b/recipe.yaml index b505475..3782c94 100644 --- a/recipe.yaml +++ b/recipe.yaml @@ -2,7 +2,7 @@ schema_version: 1 context: name: "mira-omf" - version: "3.3.1a1" + version: "3.3.1a2" python_min: "3.10" package: From 08dc716195a0a51abf42d3eedb87d5cf00a6dfcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hensgen?= Date: Wed, 9 Apr 2025 23:51:02 -0400 Subject: [PATCH 3/6] [GEOPY-2049] automate version in doc --- docs/conf.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 6b3e50f..a54d4f3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,6 +14,8 @@ import sys import os +from importlib.metadata import version +from packaging.version import Version # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -54,17 +56,19 @@ # General information about the project. project = u'omf' -copyright = u'2017, Global Mining Standards and Guidelines Group' +project_copyright = ( + u'2017, Global Mining Standards and Guidelines Group\n' + u'%Y, Mira Geoscience') author = u'Global Mining Standards and Guidelines Group' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. -# -# The short X.Y version. -version = u'3.4.0' -# The full version, including alpha/beta/rc tags. -release = u'3.4.0-alpha.2' + +# The full version. +release = version("omf") +# The base X.Y.Z version. +version = Version(release).base_version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From 621e4d43bb1f4f37590f5c57a9defe48a8ed1813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hensgen?= Date: Thu, 10 Apr 2025 00:15:32 -0400 Subject: [PATCH 4/6] [GEOPY-2049] try to fix doc tests --- docs/Makefile | 21 +++++++++++++++++++++ docs/conf.py | 6 ++++-- docs/test_docs.py | 17 ++++++++++++++++- 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 56c37d0..ac8f44f 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -6,6 +6,7 @@ SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build +PIP = pip # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) @@ -53,36 +54,42 @@ clean: .PHONY: html html: + $(PIP) install .. --no-deps --root $(BUILDDIR) $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." .PHONY: dirhtml dirhtml: + $(PIP) install .. --no-deps --root $(BUILDDIR) $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." .PHONY: singlehtml singlehtml: + $(PIP) install .. --no-deps --root $(BUILDDIR) $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." .PHONY: pickle pickle: + $(PIP) install .. --no-deps --root $(BUILDDIR) $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." .PHONY: json json: + $(PIP) install .. --no-deps --root $(BUILDDIR) $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." .PHONY: htmlhelp htmlhelp: + $(PIP) install .. --no-deps --root $(BUILDDIR) $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ @@ -90,6 +97,7 @@ htmlhelp: .PHONY: qthelp qthelp: + $(PIP) install .. --no-deps --root $(BUILDDIR) $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ @@ -100,6 +108,7 @@ qthelp: .PHONY: applehelp applehelp: + $(PIP) install .. --no-deps --root $(BUILDDIR) $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp @echo @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." @@ -109,6 +118,7 @@ applehelp: .PHONY: devhelp devhelp: + $(PIP) install .. --no-deps --root $(BUILDDIR) $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @@ -119,12 +129,14 @@ devhelp: .PHONY: epub epub: + $(PIP) install .. --no-deps --root $(BUILDDIR) $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." .PHONY: latex latex: + $(PIP) install .. --no-deps --root $(BUILDDIR) $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @@ -133,6 +145,7 @@ latex: .PHONY: latexpdf latexpdf: + $(PIP) install .. --no-deps --root $(BUILDDIR) $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @@ -140,6 +153,7 @@ latexpdf: .PHONY: latexpdfja latexpdfja: + $(PIP) install .. --no-deps --root $(BUILDDIR) $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @@ -147,18 +161,21 @@ latexpdfja: .PHONY: text text: + $(PIP) install .. --no-deps --root $(BUILDDIR) $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." .PHONY: man man: + $(PIP) install .. --no-deps --root $(BUILDDIR) $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." .PHONY: texinfo texinfo: + $(PIP) install .. --no-deps --root $(BUILDDIR) $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @@ -167,6 +184,7 @@ texinfo: .PHONY: info info: + $(PIP) install .. --no-deps --root $(BUILDDIR) $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @@ -174,6 +192,7 @@ info: .PHONY: gettext gettext: + $(PIP) install .. --no-deps --root $(BUILDDIR) $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." @@ -205,12 +224,14 @@ coverage: .PHONY: xml xml: + $(PIP) install .. --no-deps --root $(BUILDDIR) $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." .PHONY: pseudoxml pseudoxml: + $(PIP) install .. --no-deps --root $(BUILDDIR) $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/docs/conf.py b/docs/conf.py index a54d4f3..e6fa4c9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,8 +14,9 @@ import sys import os -from importlib.metadata import version +from importlib import metadata from packaging.version import Version +from pathlib import Path # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -66,7 +67,8 @@ # built documents. # The full version. -release = version("omf") +dist = metadata.PathDistribution(Path(__file__).parent / '_build') +release = dist.version("omf") # The base X.Y.Z version. version = Version(release).base_version diff --git a/docs/test_docs.py b/docs/test_docs.py index e389c48..2f51328 100644 --- a/docs/test_docs.py +++ b/docs/test_docs.py @@ -1,7 +1,7 @@ import os import subprocess import unittest - +from pathlib import Path class TestDoc(unittest.TestCase): @property @@ -10,6 +10,8 @@ def docs_dir(self): return os.path.sep.join(dirname.split(os.path.sep)[:-1] + ["docs"]) def setUp(self): + self.src_root = Path(__file__).resolve().parents[1] + self.build_dir = os.path.sep.join(self.docs_dir.split(os.path.sep) + ["_build"]) if not os.path.isdir(self.build_dir): os.makedirs(f"{self.build_dir}") @@ -24,6 +26,19 @@ def setUp(self): if not os.path.isdir(self.html_dir): os.makedirs(f"{self.html_dir}") + check = subprocess.call( + [ + "pip", + "install", + "--no-deps", + f"{self.src_root}", + "--root", + f"{self.build_dir}", + ] + ) + assert check == 0 + + def test_html(self): check = subprocess.call( [ From 78db484a775e2ce85036aa2277215ba82d313655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hensgen?= Date: Thu, 10 Apr 2025 00:35:20 -0400 Subject: [PATCH 5/6] [GEOPY-2049] try again to fix doc tests --- docs/Makefile | 40 ++++++++++++++++++++-------------------- docs/conf.py | 6 ++---- docs/test_docs.py | 4 +--- 3 files changed, 23 insertions(+), 27 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index ac8f44f..37e8de2 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -54,42 +54,42 @@ clean: .PHONY: html html: - $(PIP) install .. --no-deps --root $(BUILDDIR) + $(PIP) install .. --no-deps $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." .PHONY: dirhtml dirhtml: - $(PIP) install .. --no-deps --root $(BUILDDIR) + $(PIP) install .. --no-deps $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." .PHONY: singlehtml singlehtml: - $(PIP) install .. --no-deps --root $(BUILDDIR) + $(PIP) install .. --no-deps $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." .PHONY: pickle pickle: - $(PIP) install .. --no-deps --root $(BUILDDIR) + $(PIP) install .. --no-deps $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." .PHONY: json json: - $(PIP) install .. --no-deps --root $(BUILDDIR) + $(PIP) install .. --no-deps $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." .PHONY: htmlhelp htmlhelp: - $(PIP) install .. --no-deps --root $(BUILDDIR) + $(PIP) install .. --no-deps $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ @@ -97,7 +97,7 @@ htmlhelp: .PHONY: qthelp qthelp: - $(PIP) install .. --no-deps --root $(BUILDDIR) + $(PIP) install .. --no-deps $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ @@ -108,7 +108,7 @@ qthelp: .PHONY: applehelp applehelp: - $(PIP) install .. --no-deps --root $(BUILDDIR) + $(PIP) install .. --no-deps $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp @echo @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." @@ -118,7 +118,7 @@ applehelp: .PHONY: devhelp devhelp: - $(PIP) install .. --no-deps --root $(BUILDDIR) + $(PIP) install .. --no-deps $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @@ -129,14 +129,14 @@ devhelp: .PHONY: epub epub: - $(PIP) install .. --no-deps --root $(BUILDDIR) + $(PIP) install .. --no-deps $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." .PHONY: latex latex: - $(PIP) install .. --no-deps --root $(BUILDDIR) + $(PIP) install .. --no-deps $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @@ -145,7 +145,7 @@ latex: .PHONY: latexpdf latexpdf: - $(PIP) install .. --no-deps --root $(BUILDDIR) + $(PIP) install .. --no-deps $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @@ -153,7 +153,7 @@ latexpdf: .PHONY: latexpdfja latexpdfja: - $(PIP) install .. --no-deps --root $(BUILDDIR) + $(PIP) install .. --no-deps $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @@ -161,21 +161,21 @@ latexpdfja: .PHONY: text text: - $(PIP) install .. --no-deps --root $(BUILDDIR) + $(PIP) install .. --no-deps $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." .PHONY: man man: - $(PIP) install .. --no-deps --root $(BUILDDIR) + $(PIP) install .. --no-deps $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." .PHONY: texinfo texinfo: - $(PIP) install .. --no-deps --root $(BUILDDIR) + $(PIP) install .. --no-deps $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @@ -184,7 +184,7 @@ texinfo: .PHONY: info info: - $(PIP) install .. --no-deps --root $(BUILDDIR) + $(PIP) install .. --no-deps $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @@ -192,7 +192,7 @@ info: .PHONY: gettext gettext: - $(PIP) install .. --no-deps --root $(BUILDDIR) + $(PIP) install .. --no-deps $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." @@ -224,14 +224,14 @@ coverage: .PHONY: xml xml: - $(PIP) install .. --no-deps --root $(BUILDDIR) + $(PIP) install .. --no-deps $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." .PHONY: pseudoxml pseudoxml: - $(PIP) install .. --no-deps --root $(BUILDDIR) + $(PIP) install .. --no-deps $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/docs/conf.py b/docs/conf.py index e6fa4c9..a54d4f3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,9 +14,8 @@ import sys import os -from importlib import metadata +from importlib.metadata import version from packaging.version import Version -from pathlib import Path # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -67,8 +66,7 @@ # built documents. # The full version. -dist = metadata.PathDistribution(Path(__file__).parent / '_build') -release = dist.version("omf") +release = version("omf") # The base X.Y.Z version. version = Version(release).base_version diff --git a/docs/test_docs.py b/docs/test_docs.py index 2f51328..68d285a 100644 --- a/docs/test_docs.py +++ b/docs/test_docs.py @@ -30,10 +30,8 @@ def setUp(self): [ "pip", "install", - "--no-deps", f"{self.src_root}", - "--root", - f"{self.build_dir}", + "--no-deps", ] ) assert check == 0 From 6954900c482b4d9a91d8640c410edd423a67a884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hensgen?= Date: Thu, 10 Apr 2025 00:39:47 -0400 Subject: [PATCH 6/6] [GEOPY-2049] try again to fix doc tests --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index a54d4f3..f36b586 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -66,7 +66,7 @@ # built documents. # The full version. -release = version("omf") +release = version("mira-omf") # The base X.Y.Z version. version = Version(release).base_version