From d9f133bb146aca0b3ba784129a7c2a43c34510ff Mon Sep 17 00:00:00 2001 From: cclecle Date: Sun, 24 Sep 2023 11:00:42 +0100 Subject: [PATCH] test: try to fix doc gen --- .settings/org.eclipse.core.resources.prefs | 2 +- docs-static/usage.md | 2 +- mkdocs.yml | 9 ++------- src/pygamecfg/__init__.py | 11 ++++++----- src/pygamecfg/common_ut.py | 2 +- src/pygamecfg/{core.py => core_gamecfg.py} | 0 src/pygamecfg/game_cod4.py | 2 +- src/pygamecfg/game_ut2k4.py | 2 +- src/pygamecfg/game_ut99.py | 2 +- src/pygamecfg/py.typed | 1 + 10 files changed, 15 insertions(+), 18 deletions(-) rename src/pygamecfg/{core.py => core_gamecfg.py} (100%) create mode 100644 src/pygamecfg/py.typed diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs index b041e9c..bf70918 100644 --- a/.settings/org.eclipse.core.resources.prefs +++ b/.settings/org.eclipse.core.resources.prefs @@ -2,7 +2,7 @@ eclipse.preferences.version=1 encoding//src/pygamecfg/__init__.py=utf-8 encoding//src/pygamecfg/__main__.py=utf-8 encoding//src/pygamecfg/common_ut.py=utf-8 -encoding//src/pygamecfg/core.py=utf-8 +encoding//src/pygamecfg/core_gamecfg.py=utf-8 encoding//src/pygamecfg/game_cod4.py=utf-8 encoding//src/pygamecfg/game_ut2k4.py=utf-8 encoding//src/pygamecfg/game_ut99.py=utf-8 diff --git a/docs-static/usage.md b/docs-static/usage.md index fc56ab5..8f04b05 100644 --- a/docs-static/usage.md +++ b/docs-static/usage.md @@ -1 +1 @@ -# Usage \ No newline at end of file +# Usage diff --git a/mkdocs.yml b/mkdocs.yml index 6c9c67e..335b00f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,8 +1,7 @@ docs_dir: docs site_name: pygamecfg site_url: https://chacha.ddns.net/mkdocs-web/chacha/pygamecfg/latest/ -site_description: A simple game config tool that provide bash API to read / write - game config files (cod, ut ...) +site_description: A simple ini parser / factory site_author: chacha repo_url: https://chacha.ddns.net/gitea/chacha/pygamecfg use_directory_urls: false @@ -37,21 +36,17 @@ theme: icon: material/brightness-7 name: Switch to dark mode plugins: -- localsearch - search -- autorefs - markdownextradata - mermaid2 +- localsearch - mkdocstrings: default_handler: python handlers: python: - paths: - - src options: filters: - '!^_[^_]' - docstring_style: google inherited_members: true show_if_no_docstring: true show_signature_annotations: true diff --git a/src/pygamecfg/__init__.py b/src/pygamecfg/__init__.py index 48ec280..2e38913 100644 --- a/src/pygamecfg/__init__.py +++ b/src/pygamecfg/__init__.py @@ -16,11 +16,6 @@ Main module __init__ file. from importlib.metadata import distribution, version, PackageNotFoundError import warnings -from .core import GameOptions_Factory - -from . import game_cod4 -from . import game_ut99 -from . import game_ut2k4 try: # pragma: no cover __version__ = version("pygamecfg") @@ -41,3 +36,9 @@ try: # pragma: no cover except PackageNotFoundError: # pragma: no cover warnings.warn('can not read dist.metadata["Name"], assuming local test context, setting it to ') __Name__ = "pygamecfg" + +from pygamecfg.core_gamecfg import GameOptions_Factory + +from . import game_cod4 +from . import game_ut99 +from . import game_ut2k4 diff --git a/src/pygamecfg/common_ut.py b/src/pygamecfg/common_ut.py index 5fd67b0..cf79dbb 100644 --- a/src/pygamecfg/common_ut.py +++ b/src/pygamecfg/common_ut.py @@ -18,7 +18,7 @@ from pathlib import Path from pysimpleini import PySimpleINI -from .core import GameOption, OptionType +from .core_gamecfg import GameOption, OptionType class GameOption_UT(GameOption): diff --git a/src/pygamecfg/core.py b/src/pygamecfg/core_gamecfg.py similarity index 100% rename from src/pygamecfg/core.py rename to src/pygamecfg/core_gamecfg.py diff --git a/src/pygamecfg/game_cod4.py b/src/pygamecfg/game_cod4.py index 063e4af..be19ac6 100644 --- a/src/pygamecfg/game_cod4.py +++ b/src/pygamecfg/game_cod4.py @@ -16,7 +16,7 @@ from typing import Union import re from os.path import join -from .core import GameOptions_Factory_Register, GameOption, OptionType +from .core_gamecfg import GameOptions_Factory_Register, GameOption, OptionType class GameOption_COD4(GameOption): diff --git a/src/pygamecfg/game_ut2k4.py b/src/pygamecfg/game_ut2k4.py index ca97adb..07c2d96 100644 --- a/src/pygamecfg/game_ut2k4.py +++ b/src/pygamecfg/game_ut2k4.py @@ -16,7 +16,7 @@ from typing import Union from pysimpleini import KeyNotFoundError -from .core import GameOptions_Factory_Register, OptionType +from .core_gamecfg import GameOptions_Factory_Register, OptionType from .tool_ini import PySimpleINI_GroupKeysInSection from .common_ut import GameOption_UT diff --git a/src/pygamecfg/game_ut99.py b/src/pygamecfg/game_ut99.py index 298999c..781ed72 100644 --- a/src/pygamecfg/game_ut99.py +++ b/src/pygamecfg/game_ut99.py @@ -16,7 +16,7 @@ from typing import Union from pysimpleini import KeyNotFoundError, SectionNotFoundError -from .core import GameOptions_Factory_Register, OptionType +from .core_gamecfg import GameOptions_Factory_Register, OptionType from .tool_ini import PySimpleINI_GroupKeysInSection from .common_ut import GameOption_UT diff --git a/src/pygamecfg/py.typed b/src/pygamecfg/py.typed new file mode 100644 index 0000000..807db6d --- /dev/null +++ b/src/pygamecfg/py.typed @@ -0,0 +1 @@ +# PlaceHolder \ No newline at end of file