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 1e657b8..55ddc66 100644 --- a/doc/readers/index.rst +++ b/doc/readers/index.rst @@ -1,41 +1,19 @@ -.. automodule:: turn_by_turn.doros - :members: - :noindex: +.. automodule:: turn_by_turn.ascii +.. automodule:: turn_by_turn.doros .. 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 diff --git a/pyproject.toml b/pyproject.toml index 98448ea..92cefa9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,12 +85,16 @@ 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=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 +103,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]