Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/unstable-cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ jobs:
pypi_username: ${{secrets.TEST_PYPI_USERNAME}}
pypi_password: ${{secrets.TEST_PYPI_PASSWORD}}
ADMIN_GITHUB_TOKEN: ${{secrets.ADMIN_GITHUB_TOKEN}}
-
name: 🛏️ Upload Coverage
uses: SonarSource/sonarqube-scan-action@v5
env:
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}

...

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ pip-selfcheck.json

# Python testing artifacts
.coverage
coverage.xml
htmlcov
.tox/

Expand Down
3 changes: 3 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sonar.projectKey=NASA-PDS_data-upload-manager
sonar.organization=nasa-pds
sonar.python.coverage.reportPaths=coverage.xml
44 changes: 31 additions & 13 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,24 +1,42 @@
[tox]
envlist = py313, docs, lint
isolated_build = True
requires = tox>=4.6

[testenv]
deps = .[dev]
whitelist_externals = pytest
commands = pytest
description = run tests
basepython = python3.13
package = wheel
extras = dev
usedevelop = true
commands = pytest --cov=src --cov-report=xml {posargs}

[testenv:docs]
deps = .[dev]
whitelist_externals = python
description = build docs
extras = dev
commands = sphinx-build -b html docs/source docs/build

[testenv:lint]
deps = pre-commit
commands=
python -m pre_commit run --color=always {posargs:--all}
description = run linters
skip_install = true
deps = pre-commit
commands = python -m pre_commit run --color=always {posargs:--all}

[testenv:dev]
basepython = python3.13
usedevelop = True
deps = .[dev]
[coverage:run]
source = src
omit =
*/tests/*
*/test_*
*/__pycache__/*

[coverage:report]
exclude_lines =
pragma: no cover
def __repr__
if self.debug:
if settings.DEBUG
raise AssertionError
raise NotImplementedError
if 0:
if __name__ == .__main__.:
class .*\bProtocol\):
@(abc\.)?abstractmethod