Skip to content

Commit 0fdbbd1

Browse files
authored
Coverage Config (#29)
1 parent b834638 commit 0fdbbd1

File tree

4 files changed

+22
-41
lines changed

4 files changed

+22
-41
lines changed

doc/conf.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# TFS-Pandas documentation build configuration file, created by
2+
# Documentation build configuration file, created by
33
# sphinx-quickstart on Tue Feb 6 12:10:18 2018.
44
#
55
# This file is execfile()d with the current directory set to its
@@ -74,10 +74,7 @@ def about_package(init_posixpath: pathlib.Path) -> dict:
7474
# templates_path = ['_templates']
7575

7676
# The suffix(es) of source filenames.
77-
# You can specify multiple suffix as a list of string:
78-
#
79-
# source_suffix = ['.rst', '.md']
80-
source_suffix = ".rst"
77+
source_suffix = {'.rst': 'restructuredtext'}
8178

8279
# The master toctree document.
8380
master_doc = "index"
@@ -242,6 +239,13 @@ def about_package(init_posixpath: pathlib.Path) -> dict:
242239
),
243240
]
244241

242+
# -- Options for Autodoc ----------------------------------------------
243+
244+
autodoc_default_options = {
245+
"members": True,
246+
"no-index": True,
247+
}
248+
245249
# -- Instersphinx Configuration ----------------------------------------------
246250

247251
# Example configuration for intersphinx: refer to the Python standard library.

doc/modules/index.rst

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
11
.. automodule:: turn_by_turn.constants
2-
:members:
3-
:noindex:
4-
52

63
.. automodule:: turn_by_turn.io
7-
:members:
8-
:noindex:
9-
104

115
.. automodule:: turn_by_turn.structures
12-
:members:
13-
:noindex:
14-
156

167
.. automodule:: turn_by_turn.utils
17-
:members:
18-
:noindex:

doc/readers/index.rst

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,19 @@
1-
.. automodule:: turn_by_turn.doros
2-
:members:
3-
:noindex:
1+
.. automodule:: turn_by_turn.ascii
42

3+
.. automodule:: turn_by_turn.doros
54

65
.. automodule:: turn_by_turn.esrf
7-
:members:
8-
:noindex:
9-
106

117
.. automodule:: turn_by_turn.iota
12-
:members:
13-
:noindex:
14-
158

169
.. automodule:: turn_by_turn.lhc
17-
:members:
18-
:noindex:
19-
2010

2111
.. automodule:: turn_by_turn.sps
22-
:members:
23-
:noindex:
24-
2512

2613
.. automodule:: turn_by_turn.ptc
27-
:members:
28-
:noindex:
29-
3014

3115
.. automodule:: turn_by_turn.trackone
32-
:members:
33-
:noindex:
3416

3517
.. automodule:: turn_by_turn.madng
36-
:members:
37-
:noindex:
3818

3919
.. automodule:: turn_by_turn.xtrack_line
40-
:members:
41-
:noindex:

pyproject.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,16 @@ repository = "https://github.com/pylhc/turn_by_turn"
8585
documentation = "https://pylhc.github.io/turn_by_turn/"
8686
# changelog = "https://github.com/pylhc/turn_by_turn/blob/master/CHANGELOG.md"
8787

88-
# ----- Testing ----- #
88+
# ----- Tests Configuration ----- #
8989

9090
[tool.pytest.ini_options]
9191
addopts = [
9292
"--import-mode=importlib",
93+
"--cov-report=term-missing",
94+
"--cov-config=pyproject.toml",
95+
"--cov=turn_by_turn",
9396
]
97+
testpaths = ["tests"]
9498
# Helpful for pytest-debugging (leave commented out on commit):
9599
# log_cli = true
96100
# log_cli_level = "DEBUG"
@@ -99,6 +103,12 @@ addopts = [
99103
[tool.coverage.run]
100104
relative_files = true
101105

106+
[tool.coverage.report]
107+
exclude_also = [
108+
"if TYPE_CHECKING:", # do not count type checking imports (ignored at runtime) for coverage
109+
"except ImportError:", # do not count missing optional dependencies set to None, we monkeypatch and test that
110+
]
111+
102112
# ----- Dev Tools Configuration ----- #
103113

104114
[tool.ruff]

0 commit comments

Comments
 (0)