Skip to content

Commit

Permalink
get version information for Sphinx from toml
Browse files Browse the repository at this point in the history
skip-checks: true
  • Loading branch information
arashbm committed Jul 6, 2024
1 parent a498bd6 commit 613a061
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,17 @@
project = u'pymnet: Multilayer Networks Library'
copyright = u'2013, Mikko Kivela'

import toml
project_data = toml.load("../pyproject.toml")

# 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 = '0.1'
version = project_data["project"]["version"]
# The full version, including alpha/beta/rc tags.
release = '0.1'
release = project_data["project"]["version"]

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -112,7 +115,7 @@
# documentation.
html_theme_options = {
"source_repository":
"https://github.com/bolozna/Multilayer-networks-library",
"https://github.com/mnets/pymnet",
"source_branch": "master",
"source_directory": "doc/",
}
Expand All @@ -125,7 +128,7 @@
# A shorter title for the navigation bar. Default is the same as html_title.
# html_short_title = None

html_baseurl = "http://www.mkivela.com/pymnet/"
html_baseurl = "https://mnets.github.io/pymnet/"

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
Expand Down Expand Up @@ -208,7 +211,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'MultilayerNetworksLibrary.tex', u'Multilayer Networks Library Documentation',
('index', 'pymnet.tex', u'Multilayer Networks Library Documentation',
u'Mikko Kivela', 'manual'),
]

Expand Down

0 comments on commit 613a061

Please sign in to comment.