diff --git a/.github/workflows/TestWithSinglePython.yml b/.github/workflows/TestWithSinglePython.yml new file mode 100644 index 0000000..d38a539 --- /dev/null +++ b/.github/workflows/TestWithSinglePython.yml @@ -0,0 +1,50 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Test single python version + +on: + push: + branches: [ master ] + paths-ignore: + - 'docs/**' + pull_request: + branches: [ master ] + paths-ignore: + - 'docs/**' + workflow_dispatch: + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + check-latest: true + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest pytest-cov + pip install numpy + pip install setuptools + pip install pytest_mock + - name: Install avaframe + run: | + pip install avaframe + - name: Install debrisframe + run: | + pip install . + - name: Test with pytest + run: | + pytest -ra --cov --cov-report=xml --cov-report lcov:cov.info --cov-config=.coveragerc + - uses: qltysh/qlty-action/coverage@v1 + with: + token: ${{secrets.QLTY_COVERAGE_TOKEN}} + files: cov.info diff --git a/.qlty/qlty.toml b/.qlty/qlty.toml new file mode 100644 index 0000000..a08286a --- /dev/null +++ b/.qlty/qlty.toml @@ -0,0 +1,163 @@ +# This file was automatically generated by `qlty init`. +# You can modify it to suit your needs. +# We recommend you to commit this file to your repository. +# +# This configuration is used by both Qlty CLI and Qlty Cloud. +# +# Qlty CLI -- Code quality toolkit for developers +# Qlty Cloud -- Fully automated Code Health Platform +# +# Try Qlty Cloud: https://qlty.sh +# +# For a guide to configuration, visit https://qlty.sh/d/config +# Or for a full reference, visit https://qlty.sh/d/qlty-toml +config_version = "0" + +exclude_patterns = [ + "config/", + "db/", + "dist/", + "**/.*", + "**/data/", + "**/runScripts/", + "**/com4FlowPy/", + "**/tinyHelper/", + "features/", + "**/node_modules/", + "script/", + "**/spec/", + "**/test/", + "**/tests/", + "Tests/", + "docs/", + "benchmarks/", + "**/vendor/", + "**/*_test.go", + "**/*.d.ts", + "**/*.cint", + "**/*.yml", + "**/*.ini", + "**/*.json", + "**/*.txt", + "**/*.conf", + "**/run*.py", + ".github/", + "*_min.*", + "*-min.*", + "*.min.*", + "**/*.d.ts", + "**/.yarn/**", + "**/bower_components/**", + "**/build/**", + "**/cache/**", + "**/config/**", + "**/db/**", + "**/deps/**", + "**/dist/**", + "**/extern/**", + "**/external/**", + "**/generated/**", + "**/Godeps/**", + "**/gradlew/**", + "**/mvnw/**", + "**/node_modules/**", + "**/protos/**", + "**/seed/**", + "**/target/**", + "**/testdata/**", + "**/vendor/**", + "**/assets/**", +] + +test_patterns = [ + "**/test/**", + "**/spec/**", + "**/*.test.*", + "**/*.spec.*", + "**/*_test.*", + "**/*_spec.*", + "**/test_*.*", + "**/spec_*.*", +] + +[smells] +mode = "comment" + +[smells.boolean_logic] +threshold = 4 +enabled = true + +[smells.file_complexity] +threshold = 66 +enabled = true + +[smells.return_statements] +threshold = 4 +enabled = true + +[smells.nested_control_flow] +threshold = 4 +enabled = true + +[smells.function_parameters] +threshold = 10 +enabled = true + +[smells.function_complexity] +threshold = 10 +enabled = true + +[smells.duplication] +enabled = true +threshold = 20 + +[[source]] +name = "default" +default = true + +[[plugin]] +name = "actionlint" + +[[plugin]] +name = "checkov" + +[[plugin]] +name = "golangci-lint" + +[[plugin]] +name = "osv-scanner" + +[[plugin]] +name = "prettier" + +[[plugin]] +name = "ripgrep" + +[[plugin]] +name = "ruff" +version = "0.5.3" + +[[plugin]] +name = "shellcheck" + +[[plugin]] +name = "shfmt" + +[[plugin]] +name = "trivy" +drivers = [ + "config", + "fs-vuln", +] + +[[plugin]] +name = "trufflehog" + +[[plugin]] +name = "yamllint" + +[[plugin]] +name = "black" + +#[[plugin]] +#name = "flake8" diff --git a/README.md b/README.md index a12382f..cc7c9ba 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ # DebrisFrame How to install DebrisFrame can be found [here](https://docs.debrisframe.org/en/latest/installation.html#). + +[![Maintainability](https://qlty.sh/badges/0bf94b24-fee3-4fb1-9520-9e09adfe7195/maintainability.svg)](https://qlty.sh/gh/OpenNHM/projects/DebrisFrame) + +[![Code Coverage](https://qlty.sh/badges/0bf94b24-fee3-4fb1-9520-9e09adfe7195/test_coverage.svg)](https://qlty.sh/gh/OpenNHM/projects/DebrisFrame)