diff --git a/.codeclimate.yml b/.codeclimate.yml deleted file mode 100644 index 6b2a2d79..00000000 --- a/.codeclimate.yml +++ /dev/null @@ -1,36 +0,0 @@ -version: "2" - -checks: - # As a library that handles networking and packets at a relatively low level, the usual - # code complexity requirements are pretty hard to fulfill. - # - # The cognitive complexity of many of functions handling lower level network - # interactions can be quite high, and even some relatively short functions can end up - # being marked as too complex, due to the logic they contain (such as bit manipulation) - # Splitting these functions up would often actually end up decreasing the internal code - # readability, and also a drop in performance due to function call overhead. - # - # For that reason, many of the checks are either disabled or have their threshold set - # quite high. - - argument-count: - enabled: false - - file-lines: - enabled: false - - method-complexity: - enabled: false - - method-count: - enabled: false - - method-lines: - enabled: false - - return-statements: - enabled: false - -exclude_patterns: - - "tests/**" - - ".github/**" diff --git a/.github/scripts/normalize_coverage.py b/.github/scripts/normalize_coverage.py deleted file mode 100644 index 3478e038..00000000 --- a/.github/scripts/normalize_coverage.py +++ /dev/null @@ -1,11 +0,0 @@ -from __future__ import annotations - -import sqlite3 - -connection = sqlite3.connect(".coverage") - -# Normalize windows paths -connection.execute("UPDATE file SET path = REPLACE(path, '\\', '/')") - -connection.commit() -connection.close() diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 6312fd8b..2d6ea8ed 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -33,57 +33,6 @@ jobs: run: | poetry run task test - - name: Normalize coverage - shell: bash - run: | - python .github/scripts/normalize_coverage.py - mv -v .coverage .coverage.${{ matrix.platform }}.${{ matrix.python-version }} - - - name: Upload coverage artifact - uses: actions/upload-artifact@v4 - with: - name: coverage.${{ matrix.platform }}.${{ matrix.python-version }} - path: ./.coverage.${{ matrix.platform }}.${{ matrix.python-version }} - include-hidden-files: true - retention-days: 1 - if-no-files-found: error - - upload-coverage: - needs: [unit-tests] - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup poetry - id: poetry_setup - uses: ItsDrike/setup-poetry@v1 - with: - python-version: 3.12 - install-args: "--no-root --only test" - - - name: Download all coverage artifacts - uses: actions/download-artifact@v4 - with: - pattern: coverage.* - merge-multiple: true # support downloading multiple artifacts to same dir - - # Combine all of the coverage files (for each os, python version - from matrix) - # into a single coverage file (.coverage), and produce a final (combined) coverage report. - - name: Combine coverage - run: | - coverage combine - coverage xml - coverage report - - - name: Upload coverage to codeclimate - uses: paambaati/codeclimate-action@v9.0.0 - env: - CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} - with: - coverageLocations: .coverage.xml:coverage.py - tests-done: needs: [unit-tests] if: always() && !cancelled() diff --git a/README.md b/README.md index 91fada4e..ac129f89 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ [![discord chat](https://img.shields.io/discord/936788458939224094.svg?logo=Discord)](https://discord.gg/C2wX7zduxC) ![supported python versions](https://img.shields.io/pypi/pyversions/mcproto.svg) [![current PyPI version](https://img.shields.io/pypi/v/mcproto.svg)](https://pypi.org/project/mcproto/) -[![Test Coverage](https://api.codeclimate.com/v1/badges/9464f1037f07a795de35/test_coverage)](https://codeclimate.com/github/py-mine/mcproto/test_coverage) [![Validation](https://github.com/ItsDrike/mcproto/actions/workflows/validation.yml/badge.svg)](https://github.com/ItsDrike/mcproto/actions/workflows/validation.yml) [![Unit tests](https://github.com/ItsDrike/mcproto/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/ItsDrike/mcproto/actions/workflows/unit-tests.yml) [![Docs](https://img.shields.io/readthedocs/mcproto?label=Docs)](https://mcproto.readthedocs.io/)