diff --git a/.coveragerc b/.coveragerc index 6b4419d..c797b53 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,2 +1,15 @@ [run] concurrency = thread,gevent +omit = + */__init__.py + main.py + */data/* + */models/* + */schemas/* + */tests/* + +[report] +exclude_lines = + pragma: no cover # Standard pragma to intentionally skip lines + if __name__ == .__main__.: # Skips CLI bootstrapping code + raise NotImplementedError # Often placeholder stubs not meant to be covered diff --git a/.vscode/settings.json b/.vscode/settings.json index 026f218..401becc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,14 +1,18 @@ { - "python.testing.unittestEnabled": false, - "python.testing.pytestEnabled": true, - "python.testing.pytestArgs": ["tests"], - "files.exclude": { - "**/__pycache__": true, - "**/.git": true, - "**/.DS_Store": true - }, - "[python]": { - "editor.defaultFormatter": "ms-python.autopep8", - "editor.formatOnSave": true - } + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true, + "python.testing.pytestArgs": ["tests"], + "files.exclude": { + "**/__pycache__": true, + "**/.git": true, + "**/.DS_Store": true + }, + "[python]": { + "editor.defaultFormatter": "ms-python.autopep8", + "editor.formatOnSave": true + }, + "sonarlint.connectedMode.project": { + "connectionId": "nanotaboada", + "projectKey": "nanotaboada_python-samples-fastapi-restful" + } } diff --git a/codecov.yml b/codecov.yml index ef0b027..cdb57d2 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,26 +1,22 @@ +# Codecov Repository YAML # https://docs.codecov.com/docs/codecov-yaml coverage: +# https://docs.codecov.com/docs/commit-status status: project: default: target: 80% threshold: 10% if_not_found: success - if_ci_failed: error - + if_ci_failed: success patch: default: target: 80% threshold: 10% + if_not_found: success -flags: - unit: - paths: - - "services/" - - "routes/" - carryforward: true - +# https://docs.codecov.com/docs/components#component-options component_management: default_rules: statuses: @@ -28,7 +24,6 @@ component_management: target: auto branches: - "!main" - individual_components: - component_id: services name: Services @@ -42,18 +37,19 @@ component_management: comment: layout: "header, diff, flags, components" +# https://docs.codecov.com/docs/ignoring-paths ignore: - - "assets/**/*" - - "data/**/*" - - "models/**/*" - - "postman_collections/**/*" - - "schemas/**/*" - - "tests/**/*" - - "**/*.yml" - - "**/*.json" - - "**/*.txt" - - "**/__pycache__/" - - "**/*.pyc" - - "LICENSE" - - "main.py" - - "README.md" + - "^assets/.*" + - "^data/.*" + - "^models/.*" + - "^postman_collections/.*" + - "^schemas/.*" + - "^tests/.*" + - ".*\\.yml$" + - ".*\\.json$" + - ".*\\.txt$" + - "^__pycache__(/.*)?$" + - ".*\\.pyc$" + - "^LICENSE$" + - "^main\\.py$" + - "^README\\.md$"