Skip to content

Commit

Permalink
build: Use coverage directly, instead of pytest-cov
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Sep 7, 2024
1 parent af0543b commit fc064b0
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 54 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ jobs:
./manage.py makemigrations --check --dry-run
./manage.py check --fail-level WARNING
coverage run --source core,process manage.py test
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls --service=github
- uses: coverallsapp/github-action@v2
services:
postgres:
image: postgres:12
Expand Down
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ci:
skip: [pip-compile]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
rev: v0.6.3
hooks:
- id: ruff
- id: ruff-format
Expand All @@ -17,8 +17,9 @@ repos:
- id: pip-compile
name: pip-compile requirements.in
args: [requirements.in, -o, requirements.txt]
files: ^requirements(_nongpl)?\.(in|txt)$
- id: pip-compile
name: pip-compile requirements_dev.in
args: [requirements_dev.in, -o, requirements_dev.txt]
files: ^requirements_dev\.(in|txt)$
files: ^requirements(_nongpl|_dev)?\.(in|txt)$
exclude: /migrations/
11 changes: 3 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,16 @@ select = ["ALL"]
ignore = [
"ANN", "COM", "EM",
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191", "E501", "D206", "Q000", "Q001", "Q002", "Q003", "ISC001",
"W191", "D206", "Q000", "Q001", "Q002", "Q003", "ISC001",
"D203", "D212", # ignore incompatible rules
"D200", # documentation preferences
"C901", "PLR0912", # complexity preferences
"C901", "PLR091", # complexity preferences
"D1", # docstrings
"PTH", # pathlib
"A002", # compile builtin
"ARG001", # yapw callbacks
"ARG002", # Django request argument
"ARG001", "ARG002", "RUF012", # Django
"N818", # AlreadyExists error
"PLR0911", # Too many returns
"PLR0913", # Too many arguments
"PLW2901", # release_or_record overridden
"RUF012", # Django class attributes
"S104", # Docker ALLOWED_HOSTS
"S324", # md5 hash
"TRY003", # Django command errors
Expand All @@ -41,7 +37,6 @@ builtins-ignorelist = ["copyright"]
"PT", # unittest
"ARG002", # mocks
"BLE001", # Exception
"PLR0913", # Too many arguments
"PLR2004", # Magic value used
"S101", # assert
]
Expand Down
16 changes: 6 additions & 10 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file was autogenerated by uv via the following command:
# uv pip compile requirements.in -o requirements.txt --no-strip-extras
# uv pip compile requirements.in -o requirements.txt
asgiref==3.7.2
# via
# -r requirements_nongpl.txt
Expand Down Expand Up @@ -57,7 +57,7 @@ et-xmlfile==1.1.0
# via openpyxl
flattentool==0.24.0
# via libcove
gunicorn[setproctitle]==22.0.0
gunicorn==22.0.0
# via -r requirements_nongpl.txt
idna==3.7
# via
Expand Down Expand Up @@ -97,7 +97,7 @@ jsonschema-specifications==2023.12.1
# jsonschema
libcove==0.32.0
# via libcoveocds
libcoveocds[perf]==0.13.0
libcoveocds==0.13.0
# via -r requirements.in
lxml==4.9.4
# via flattentool
Expand All @@ -106,7 +106,7 @@ ocdsextensionregistry==0.3.6
# -r requirements_nongpl.txt
# libcoveocds
# ocdskit
ocdskit[perf]==1.1.10
ocdskit==1.1.10
# via -r requirements_nongpl.txt
ocdsmerge==0.6.6
# via
Expand All @@ -120,8 +120,6 @@ orjson==3.9.15
# via
# -r requirements_nongpl.txt
# libcoveocds
# ocdskit
# yapw
packaging==24.0
# via
# -r requirements_nongpl.txt
Expand Down Expand Up @@ -181,9 +179,7 @@ schema==0.7.5
sentry-sdk==2.8.0
# via -r requirements_nongpl.txt
setproctitle==1.2.2
# via
# -r requirements_nongpl.txt
# gunicorn
# via -r requirements_nongpl.txt
setuptools==74.1.1
# via
# zc-lockfile
Expand Down Expand Up @@ -224,7 +220,7 @@ urllib3==2.2.2
# sentry-sdk
xmltodict==0.13.0
# via flattentool
yapw[perf]==0.1.4
yapw==0.1.4
# via -r requirements_nongpl.txt
zc-lockfile==3.0.post1
# via zodb
Expand Down
4 changes: 1 addition & 3 deletions requirements_dev.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
-r requirements.txt
coverage
coveralls
pre-commit
psycopg2-binary
ruff
pre-commit
33 changes: 9 additions & 24 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cffi==1.16.0
# via
# -r requirements.txt
# persistent
cfgv==3.3.1
cfgv==3.4.0
# via pre-commit
charset-normalizer==2.0.8
# via
Expand All @@ -47,16 +47,12 @@ contextlib2==21.6.0
# -r requirements.txt
# schema
coverage==6.5.0
# via
# -r requirements_dev.in
# coveralls
coveralls==3.3.1
# via -r requirements_dev.in
defusedxml==0.7.1
# via
# -r requirements.txt
# odfpy
distlib==0.3.6
distlib==0.3.8
# via virtualenv
dj-database-url==2.0.0
# via -r requirements.txt
Expand All @@ -73,23 +69,21 @@ djangorestframework==3.15.2
# via
# -r requirements.txt
# drf-spectacular
docopt==0.6.2
# via coveralls
drf-spectacular==0.27.2
# via -r requirements.txt
et-xmlfile==1.1.0
# via
# -r requirements.txt
# openpyxl
filelock==3.12.2
filelock==3.15.4
# via virtualenv
flattentool==0.24.0
# via
# -r requirements.txt
# libcove
gunicorn==22.0.0
# via -r requirements.txt
identify==2.3.5
identify==2.6.0
# via pre-commit
idna==3.7
# via
Expand Down Expand Up @@ -137,7 +131,7 @@ lxml==4.9.4
# via
# -r requirements.txt
# flattentool
nodeenv==1.6.0
nodeenv==1.9.1
# via pre-commit
ocdsextensionregistry==0.3.6
# via
Expand All @@ -159,11 +153,7 @@ openpyxl==3.1.2
# -r requirements.txt
# flattentool
orjson==3.9.15
# via
# -r requirements.txt
# libcoveocds
# ocdskit
# yapw
# via -r requirements.txt
packaging==24.0
# via
# -r requirements.txt
Expand All @@ -182,7 +172,7 @@ platformdirs==3.8.1
# -r requirements.txt
# requests-cache
# virtualenv
pre-commit==3.6.0
pre-commit==3.8.0
# via -r requirements_dev.in
psycopg2==2.9.6
# via -r requirements.txt
Expand Down Expand Up @@ -211,7 +201,6 @@ referencing==0.34.0
requests==2.32.3
# via
# -r requirements.txt
# coveralls
# libcove
# libcoveocds
# ocdsextensionregistry
Expand All @@ -234,18 +223,14 @@ rpds-py==0.18.0
# -r requirements.txt
# jsonschema
# referencing
ruff==0.6.3
# via -r requirements_dev.in
schema==0.7.5
# via
# -r requirements.txt
# flattentool
sentry-sdk==2.8.0
# via -r requirements.txt
setproctitle==1.2.2
# via
# -r requirements.txt
# gunicorn
# via -r requirements.txt
setuptools==74.1.1
# via
# -r requirements.txt
Expand Down Expand Up @@ -287,7 +272,7 @@ urllib3==2.2.2
# requests
# requests-cache
# sentry-sdk
virtualenv==20.23.1
virtualenv==20.24.1
# via pre-commit
xmltodict==0.13.0
# via
Expand Down
8 changes: 4 additions & 4 deletions requirements_nongpl.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file was autogenerated by uv via the following command:
# uv pip compile requirements_nongpl.in -o requirements_nongpl.txt --no-strip-extras
# uv pip compile requirements_nongpl.in -o requirements_nongpl.txt
asgiref==3.7.2
# via django
attrs==23.1.0
Expand Down Expand Up @@ -33,7 +33,7 @@ djangorestframework==3.15.2
# drf-spectacular
drf-spectacular==0.27.2
# via -r requirements_nongpl.in
gunicorn[setproctitle]==22.0.0
gunicorn==22.0.0
# via -r requirements_nongpl.in
idna==3.7
# via requests
Expand All @@ -58,7 +58,7 @@ ocdsextensionregistry==0.3.6
# via
# -r requirements_nongpl.in
# ocdskit
ocdskit[perf]==1.1.10
ocdskit==1.1.10
# via -r requirements_nongpl.in
ocdsmerge==0.6.6
# via
Expand Down Expand Up @@ -115,5 +115,5 @@ urllib3==2.2.2
# requests
# requests-cache
# sentry-sdk
yapw[perf]==0.1.4
yapw==0.1.4
# via -r requirements_nongpl.in

0 comments on commit fc064b0

Please sign in to comment.