From 925010218470fc348ee9e2ace11b2bc31cec8e1f Mon Sep 17 00:00:00 2001 From: cclecle Date: Sun, 24 Sep 2023 18:47:47 +0100 Subject: [PATCH] fix mkdoc gen :) --- helpers/helper_base.py | 7 +++-- mkdocs.yml | 10 ++++--- pyproject.toml | 1 + pyproject.toml.bak | 68 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 79 insertions(+), 7 deletions(-) create mode 100644 pyproject.toml.bak diff --git a/helpers/helper_base.py b/helpers/helper_base.py index 51829fc..e1bf5db 100644 --- a/helpers/helper_base.py +++ b/helpers/helper_base.py @@ -11,6 +11,7 @@ from typing import TYPE_CHECKING from abc import ABC, abstractmethod import os +import shutil from pathlib import Path import subprocess @@ -42,9 +43,9 @@ class helper_base(ABC): @staticmethod def _reset_dir(dirpath: Path): dirpath = Path(dirpath) - if not os.path.exists(dirpath): - os.makedirs(dirpath) - [f.unlink() for f in Path(dirpath).glob("*") if f.is_file()] + if os.path.exists(dirpath): + shutil.rmtree(dirpath) + os.makedirs(dirpath) @classmethod def reset_result_dir(cls): diff --git a/mkdocs.yml b/mkdocs.yml index b0bd4c5..a3011c8 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -14,11 +14,11 @@ theme: - navigation.tabs - navigation.tabs.sticky - navigation.footer - - toc.integrate + - navigation.path - navigation.top - navigation.section - content.code.annotate - - navigation.prune + - navigation.expand - toc.follow palette: - media: '(prefers-color-scheme: dark)' @@ -49,16 +49,18 @@ plugins: options: filters: - '!^_[^_]' - inherited_members: true + inherited_members: false show_if_no_docstring: true show_signature_annotations: true show_source: false show_category_heading: true group_by_category: true - docstring_section_style: spacy show_root_full_path: false merge_init_into_class: true separate_signature: true + heading_level: 2 + docstring_section_style: spacy + show_root_toc_entry: false - with-pdf: cover_subtitle: User Manual cover_logo: C:\Users\chacha\git\pygamecfg\docs-static\Library.jpg diff --git a/pyproject.toml b/pyproject.toml index 1fb8af4..d430840 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,7 @@ where = ["src"] [tool.setuptools.package-data] "pygamecfg.data" = ["*.*"] +"pysimpleini" = ["py.typed"] [project.urls] Homepage = "https://chacha.ddns.net/gitea/chacha/pygamecfg" diff --git a/pyproject.toml.bak b/pyproject.toml.bak new file mode 100644 index 0000000..1fb8af4 --- /dev/null +++ b/pyproject.toml.bak @@ -0,0 +1,68 @@ +# pyChaChaDummyProject (c) by chacha +# +# pyChaChaDummyProject is licensed under a +# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Unported License. +# +# You should have received a copy of the license along with this +# work. If not, see . + +[build-system] +requires = ["setuptools>=63", "wheel", "setuptools_scm"] +build-backend = "setuptools.build_meta" + +[tool.setuptools_scm] +version_scheme= "post-release" + +[project] +name = "pygamecfg" +description = "A simple game config tool that provide bash API to read / write game config files (cod, ut ...)" +readme = "README.md" +requires-python = ">=3.9" +keywords = ["chacha","chacha","template","pygamecfg"] +license = { file = "LICENSE.md" } + +authors = [ + {name="chacha",email="1000CHACHA0001@gmail.com"}, +] +maintainers = [ + {name="chacha",email="1000CHACHA0001@gmail.com"}, +] +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.9", +] +dependencies = [ + 'importlib-metadata; python_version<"3.9"', + 'packaging', + 'pysimpleini>=0.3.1', + 'typed-argument-parser==1.*' +] +dynamic = ["version"] + +[tool.setuptools] +platforms = ["any"] +include-package-data = true + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.setuptools.package-data] +"pygamecfg.data" = ["*.*"] + +[project.urls] +Homepage = "https://chacha.ddns.net/gitea/chacha/pygamecfg" +Documentation = "https://chacha.ddns.net/mkdocs-web/chacha/pygamecfg/master/latest/" +Tracker = "https://chacha.ddns.net/gitea/chacha/pygamecfg/issues" + +[project.optional-dependencies] +test = ["junitparser>=2.8","junit2html>=30.1","xmlrunner>=1.7","mypy>=0.99" ] +coverage-check = ["coverage>=7.0"] +complexity-check = ["radon>=5.1"] +quality-check = ["pylint>=2.15","pylint-json2html>=0.4","pandas>=1.5"] +type-check = ["mypy[reports]>=0.99" ] +doc-gen = ["mkdocs>=1.4.0", "mkdocs-material>=8.5","mkdocs-material-extensions","mkdocs-pymdownx-material-extras", "mkdocs-localsearch>=0.9.0", "mkdocstrings[python]>=0.19", "mkdocs-with-pdf>=0.9.3","pyyaml>=6.0","pymdown-extensions>=9","mkdocs-markdownextradata-plugin","mkdocs-mermaid2-plugin","mkdocs-autorefs"] + +# [project.scripts] +# my-script = "my_package.module:function" +