Skip to content

Commit

Permalink
Merge pull request #13 from jaspersiebring/version_parse
Browse files Browse the repository at this point in the history
Added toml parsing for automated docs versioning
  • Loading branch information
jaspersiebring authored Sep 26, 2023
2 parents 91c7826 + a5e3c40 commit f0c41dd
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 18 deletions.
37 changes: 22 additions & 15 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,40 @@

import os
import sys
sys.path.insert(0, os.path.abspath('..'))
import toml
import pathlib
from datetime import datetime

# Appending project root to PATH
sys.path.insert(0, os.path.abspath(".."))

# Getting package version from pyproject toml
meta_path = pathlib.Path(__file__).parents[1] / "pyproject.toml"
meta_info = toml.load(meta_path)

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'geococo'
copyright = '2023, Jasper Siebring'
author = 'Jasper Siebring'
release = '0.5.2'
project = meta_info["tool"]["poetry"]["name"]
copyright = f"{datetime.now().year}, Jasper Siebring"
author = "Jasper Siebring"
version = release = meta_info["tool"]["poetry"]["version"]

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'sphinx.ext.autosummary',
'myst_parser'
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.autosummary",
"myst_parser",
]

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']


templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]
26 changes: 24 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "geococo"
version = "0.5.3"
version = "0.5.4"
description = "Converts GIS annotations to Microsoft's Common Objects In Context (COCO) dataset format"
authors = ["Jasper Siebring <[email protected]>"]
readme = "README.md"
Expand Down Expand Up @@ -41,6 +41,8 @@ types-python-dateutil = "^2.8.19.14"
sphinx = "^7.2.6"
sphinx-rtd-theme = "^1.3.0"
myst-parser = "^2.0.0"
toml = "^0.10.2"
types-toml = "^0.10.8.7"

[[tool.mypy.overrides]]
module = [
Expand Down

0 comments on commit f0c41dd

Please sign in to comment.