Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -53,43 +54,50 @@ clean:

.PHONY: html
html:
$(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
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."

.PHONY: singlehtml
singlehtml:
$(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
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."

.PHONY: json
json:
$(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
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."

.PHONY: qthelp
qthelp:
$(PIP) install .. --no-deps
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
Expand All @@ -100,6 +108,7 @@ qthelp:

.PHONY: applehelp
applehelp:
$(PIP) install .. --no-deps
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
Expand All @@ -109,6 +118,7 @@ applehelp:

.PHONY: devhelp
devhelp:
$(PIP) install .. --no-deps
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
Expand All @@ -119,12 +129,14 @@ devhelp:

.PHONY: epub
epub:
$(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
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
Expand All @@ -133,32 +145,37 @@ latex:

.PHONY: latexpdf
latexpdf:
$(PIP) install .. --no-deps
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."

.PHONY: latexpdfja
latexpdfja:
$(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
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."

.PHONY: text
text:
$(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
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."

.PHONY: texinfo
texinfo:
$(PIP) install .. --no-deps
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
Expand All @@ -167,13 +184,15 @@ texinfo:

.PHONY: info
info:
$(PIP) install .. --no-deps
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."

.PHONY: gettext
gettext:
$(PIP) install .. --no-deps
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
Expand Down Expand Up @@ -205,12 +224,14 @@ coverage:

.PHONY: xml
xml:
$(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
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
16 changes: 10 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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("mira-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.
Expand Down
15 changes: 14 additions & 1 deletion docs/test_docs.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import subprocess
import unittest

from pathlib import Path

class TestDoc(unittest.TestCase):
@property
Expand All @@ -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}")
Expand All @@ -24,6 +26,17 @@ def setUp(self):
if not os.path.isdir(self.html_dir):
os.makedirs(f"{self.html_dir}")

check = subprocess.call(
[
"pip",
"install",
f"{self.src_root}",
"--no-deps",
]
)
assert check == 0


def test_html(self):
check = subprocess.call(
[
Expand Down
2 changes: 1 addition & 1 deletion omf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__ = (
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 = [
Expand Down Expand Up @@ -55,7 +55,7 @@ vectormath = "0.2.*"

## dependencies from Git repositories
#------------------------------------
#geoh5py = {version = ">=0.11.0a1, <0.12.dev", allow-prereleases = true}
#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}

Expand Down
2 changes: 1 addition & 1 deletion recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ schema_version: 1

context:
name: "mira-omf"
version: "3.3.1a1"
version: "3.3.1a2"
python_min: "3.10"

package:
Expand Down