Skip to content

Commit

Permalink
clean around
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Barrachina Civera <[email protected]>
  • Loading branch information
xbarra committed Jul 17, 2024
1 parent fd27813 commit 98fca1c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 43 deletions.
30 changes: 2 additions & 28 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,28 +1,2 @@
# .coveragerc to control coverage.py
[run]
branch = True
source = osc_physrisk_financial
# omit = bad_file.py

[paths]
source =
src/
*/site-packages/

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__
if self\.debug

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
[coverage:report]
skip_empty = true
2 changes: 0 additions & 2 deletions mypy.ini

This file was deleted.

14 changes: 12 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ docs = [
"sphinx_design>=0.6.0"
]
lint = ["pre-commit"]
testing = [
test = [
"pdm[pytest]",
"pytest",
"pytest-cov",
]
Expand All @@ -53,6 +54,15 @@ write_to = "osc_physrisk_financial/_version.py"
write_template = "version: str\n__version__: str\n__version__ = version = '{}'\n"
tag_regex = '^(?:[\w-]+-)?(?P<version>[vV]?\d+(?:\.\d+){0,2}[^\+-]*?)(?:\-.*)?(?:\+.*)?(?:\-.*)?$'

[tool.pytest.ini_options]
testpaths = [
"tests/",
]
addopts = "--cov=src --cov-report html --cov-report term-missing --cov-fail-under 65"

[tool.coverage.run]
source = ["src"]

[tool.mypy]
ignore_missing_imports = true

Expand Down Expand Up @@ -126,4 +136,4 @@ indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = false
docstring-code-line-length = "dynamic"
docstring-code-line-length = "dynamic"
11 changes: 0 additions & 11 deletions src/osc_physrisk_financial/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
"""Init for osc-physrisk."""

from importlib.metadata import PackageNotFoundError, version # pragma: no cover

try:
# Change here if project is renamed and does not equal the package name
dist_name = "osc-physrisk-financial"
__version__ = version(dist_name)
except PackageNotFoundError: # pragma: no cover
__version__ = "unknown"
finally:
del version, PackageNotFoundError

0 comments on commit 98fca1c

Please sign in to comment.