diff --git a/docs/conf.py b/docs/conf.py index 365b7ee..710718b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,18 +16,17 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # +import importlib.metadata import logging import os import sys +from typing import Dict logging.disable(logging.CRITICAL) sys.path.insert(0, os.path.abspath("..")) -base_dir = os.path.join(os.path.dirname(__file__), os.pardir) -about = {} -with open(os.path.join(base_dir, "wafer_map", "__about__.py")) as f: - exec(f.read(), about) +__version__ = importlib.metadata.version("wafer_map") # -- General configuration ------------------------------------------------ @@ -74,18 +73,18 @@ master_doc = "index" # General information about the project. -project = about["__project_name__"] -copyright = "2017, {}".format(about["__author__"]) -author = about["__author__"] +project = "wafer_map" +copyright = "2017, Douglas Thor" +author = "Douglas Thor" # 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 = about["__version__"] +version = __version__ # The full version, including alpha/beta/rc tags. -release = about["__version__"] +release = __version__ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -133,7 +132,7 @@ # -- Options for LaTeX output --------------------------------------------- -latex_elements = { +latex_elements: Dict[str, str] = { # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', diff --git a/src/wafer_map/__about__.py b/src/wafer_map/__about__.py deleted file mode 100644 index f0110b2..0000000 --- a/src/wafer_map/__about__.py +++ /dev/null @@ -1,37 +0,0 @@ -""" -Plots up a wafer map. Used in semiconductor processing and analysis. - -Please see README.md and CHANGELOG.md on the -[project homepage](https://github.com/dougthor42/wafer_map). - -""" - -__all__ = ( - "__author__", - "__email__", - "__license__", - "__version__", - "__released__", - "__created__", - "__project_name__", - "__project_url__", - "__package_name__", - "__description__", - "__long_descr__", -) - - -__author__ = "Douglas Thor" -__email__ = "doug.thor@gmail.com" - -__license__ = "GNU General Public License v3 (GPLv3)" -__version__ = "1.1.2" -__released__ = "2019-10-14" -__created__ = "2014-11-25" - -__project_name__ = "Wafer Map" -__project_url__ = "https://github.com/dougthor42/wafer_map" -__package_name__ = "wafer_map" - -__description__ = "Semiconductor Wafer Mapping" -__long_descr__ = __doc__