From bd8ed8db05ac5816c38ddc4ba0986281e654cae5 Mon Sep 17 00:00:00 2001 From: Felix Soubelet Date: Mon, 27 Oct 2025 15:05:54 +0100 Subject: [PATCH 1/5] adding coverage config --- pyproject.toml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 98448ea..a019ee2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,12 +85,17 @@ repository = "https://github.com/pylhc/turn_by_turn" documentation = "https://pylhc.github.io/turn_by_turn/" # changelog = "https://github.com/pylhc/turn_by_turn/blob/master/CHANGELOG.md" -# ----- Testing ----- # +# ----- Tests Configuration ----- # [tool.pytest.ini_options] addopts = [ "--import-mode=importlib", + "--cov-report=xml", + "--cov-report term-missing", + "--cov-config=pyproject.toml", + "--cov=turn_by_turn", ] +testpaths = ["tests"] # Helpful for pytest-debugging (leave commented out on commit): # log_cli = true # log_cli_level = "DEBUG" @@ -99,6 +104,12 @@ addopts = [ [tool.coverage.run] relative_files = true +[tool.coverage.report] +exclude_also = [ + "if TYPE_CHECKING:", # do not count type checking imports (ignored at runtime) for coverage + "except ImportError:", # do not count missing optional dependencies set to None, we monkeypatch and test that +] + # ----- Dev Tools Configuration ----- # [tool.ruff] From 80d950e3da2563416e10eb10d6422618d894160f Mon Sep 17 00:00:00 2001 From: Felix Soubelet Date: Mon, 27 Oct 2025 15:17:19 +0100 Subject: [PATCH 2/5] missing = --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a019ee2..cf1557b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,7 +91,7 @@ documentation = "https://pylhc.github.io/turn_by_turn/" addopts = [ "--import-mode=importlib", "--cov-report=xml", - "--cov-report term-missing", + "--cov-report=term-missing", "--cov-config=pyproject.toml", "--cov=turn_by_turn", ] From 90ead9bb31f7f52651969407cac0c38332844d20 Mon Sep 17 00:00:00 2001 From: Felix Soubelet Date: Mon, 27 Oct 2025 16:03:50 +0100 Subject: [PATCH 3/5] add ascii reader to doc --- doc/readers/index.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/readers/index.rst b/doc/readers/index.rst index 1e657b8..a548efe 100644 --- a/doc/readers/index.rst +++ b/doc/readers/index.rst @@ -1,3 +1,8 @@ +.. automodule:: turn_by_turn.ascii + :members: + :noindex: + + .. automodule:: turn_by_turn.doros :members: :noindex: From 0576a5fdc91cbfb96642dae5795c2e8c33a519e1 Mon Sep 17 00:00:00 2001 From: Felix Soubelet Date: Mon, 27 Oct 2025 18:11:29 +0100 Subject: [PATCH 4/5] no xml --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cf1557b..92cefa9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -90,7 +90,6 @@ documentation = "https://pylhc.github.io/turn_by_turn/" [tool.pytest.ini_options] addopts = [ "--import-mode=importlib", - "--cov-report=xml", "--cov-report=term-missing", "--cov-config=pyproject.toml", "--cov=turn_by_turn", From 197898dafb10ec58e1ac476680aff41e467d7a91 Mon Sep 17 00:00:00 2001 From: JoschD <26184899+JoschD@users.noreply.github.com> Date: Mon, 27 Oct 2025 19:22:50 +0100 Subject: [PATCH 5/5] autodoc autoconf --- doc/conf.py | 14 +++++++++----- doc/modules/index.rst | 11 ----------- doc/readers/index.rst | 27 --------------------------- 3 files changed, 9 insertions(+), 43 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index e36821c..27a1217 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -1,5 +1,5 @@ # -# TFS-Pandas documentation build configuration file, created by +# Documentation build configuration file, created by # sphinx-quickstart on Tue Feb 6 12:10:18 2018. # # This file is execfile()d with the current directory set to its @@ -74,10 +74,7 @@ def about_package(init_posixpath: pathlib.Path) -> dict: # templates_path = ['_templates'] # The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -# source_suffix = ['.rst', '.md'] -source_suffix = ".rst" +source_suffix = {'.rst': 'restructuredtext'} # The master toctree document. master_doc = "index" @@ -242,6 +239,13 @@ def about_package(init_posixpath: pathlib.Path) -> dict: ), ] +# -- Options for Autodoc ---------------------------------------------- + +autodoc_default_options = { + "members": True, + "no-index": True, +} + # -- Instersphinx Configuration ---------------------------------------------- # Example configuration for intersphinx: refer to the Python standard library. diff --git a/doc/modules/index.rst b/doc/modules/index.rst index 41181a0..bb4ed11 100644 --- a/doc/modules/index.rst +++ b/doc/modules/index.rst @@ -1,18 +1,7 @@ .. automodule:: turn_by_turn.constants - :members: - :noindex: - .. automodule:: turn_by_turn.io - :members: - :noindex: - .. automodule:: turn_by_turn.structures - :members: - :noindex: - .. automodule:: turn_by_turn.utils - :members: - :noindex: diff --git a/doc/readers/index.rst b/doc/readers/index.rst index a548efe..55ddc66 100644 --- a/doc/readers/index.rst +++ b/doc/readers/index.rst @@ -1,46 +1,19 @@ .. automodule:: turn_by_turn.ascii - :members: - :noindex: - .. automodule:: turn_by_turn.doros - :members: - :noindex: - .. automodule:: turn_by_turn.esrf - :members: - :noindex: - .. automodule:: turn_by_turn.iota - :members: - :noindex: - .. automodule:: turn_by_turn.lhc - :members: - :noindex: - .. automodule:: turn_by_turn.sps - :members: - :noindex: - .. automodule:: turn_by_turn.ptc - :members: - :noindex: - .. automodule:: turn_by_turn.trackone - :members: - :noindex: .. automodule:: turn_by_turn.madng - :members: - :noindex: .. automodule:: turn_by_turn.xtrack_line - :members: - :noindex: \ No newline at end of file