Skip to content

Commit

Permalink
ci: Lint requirements. Use official coveralls action. chore: Remove l…
Browse files Browse the repository at this point in the history
…inters from requirements.
  • Loading branch information
jpmckinney committed Sep 6, 2024
1 parent c361b8e commit 7b25e1b
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 83 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@ jobs:
cache: pip
cache-dependency-path: '**/requirements*.txt'
- run: pip install -r requirements_dev.txt
- run: pytest -W error --cov extension_explorer
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls --service=github
- run: pytest -W error --cov-report=lcov:coverage/lcov.info --cov extension_explorer
- uses: coverallsapp/github-action@v2
14 changes: 14 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,27 @@ jobs:
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
env:
PAT: ${{ secrets.PAT }}
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT || github.token }}
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip
cache-dependency-path: '**/requirements*.txt'
- id: changed-files
uses: tj-actions/changed-files@v45
- uses: pre-commit/[email protected]
continue-on-error: true
with:
extra_args: pip-compile --files ${{ steps.changed-files.outputs.all_changed_files }}
- if: ${{ env.PAT }}
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: '[github-actions] pre-commit autoupdate'
- shell: bash
run: curl -s -S --retry 3 $BASEDIR/tests/install.sh | bash -
- shell: bash
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ repos:
hooks:
- id: pip-compile
name: pip-compile requirements.in
args: [requirements.in, -o, requirements.txt, --no-strip-extras]
args: [requirements.in, -o, requirements.txt]
- id: pip-compile
name: pip-compile requirements_dev.in
args: [requirements_dev.in, -o, requirements_dev.txt, --no-strip-extras]
files: ^requirements_dev\.(in|txt)$
args: [requirements_dev.in, -o, requirements_dev.txt]
files: ^requirements(_dev)?\.(in|txt)$
6 changes: 0 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"

# This project is not intended to be released or used as a Python package. This file only exists for babel.
[project]
name = "ocdsextensionexplorer"
version = "0.0.0"
license = {text = "BSD"}

[project.entry-points."babel.extractors"]
tag = "extension_explorer.extract:extract_tag"
Expand Down
1 change: 0 additions & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ python-slugify
PyYAML
requests
werkzeug
# See https://github.com/jazzband/pip-tools/issues/204#issuecomment-550051424
-e file:.#egg=ocdsextensionexplorer # babel.extractors

# Deployment
Expand Down
8 changes: 4 additions & 4 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
-e file:.#egg=ocdsextensionexplorer
# via -r requirements.in
alabaster==0.7.12
Expand Down Expand Up @@ -85,13 +85,13 @@ mdurl==0.1.0
# via markdown-it-py
myst-parser==2.0.0
# via ocdsextensionregistry
ocds-babel[markdown]==0.3.5
ocds-babel==0.3.5
# via ocdsextensionregistry
ocdsextensionregistry[cli]==0.3.8
ocdsextensionregistry==0.3.8
# via
# -r requirements.in
# ocdskit
ocdskit[perf]==1.0.2
ocdskit==1.0.2
# via -r requirements.in
ocdsmerge==0.6.4
# via ocdskit
Expand Down
8 changes: 1 addition & 7 deletions requirements_dev.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
-r requirements.txt
coveralls
flake8
isort
pre-commit
libsass
pytest
pytest-cov
pytest-flask

# Build utilities
libsass
68 changes: 10 additions & 58 deletions requirements_dev.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_dev.in -o requirements_dev.txt --no-strip-extras
# uv pip compile requirements_dev.in -o requirements_dev.txt
-e file:.#egg=ocdsextensionexplorer
# via -r requirements.txt
alabaster==0.7.12
Expand All @@ -16,7 +16,6 @@ babel==2.12.1
# via
# -r requirements.txt
# flask-babel
# ocdsextensionregistry
# sphinx
blinker==1.7.0
# via
Expand All @@ -30,8 +29,6 @@ certifi==2024.7.4
# via
# -r requirements.txt
# requests
cfgv==3.4.0
# via pre-commit
charset-normalizer==3.1.0
# via
# -r requirements.txt
Expand All @@ -40,27 +37,13 @@ click==8.1.3
# via
# -r requirements.txt
# flask
coverage[toml]==5.5
# via
# coveralls
# pytest-cov
coveralls==3.0.0
# via -r requirements_dev.in
distlib==0.3.8
# via virtualenv
docopt==0.6.2
# via coveralls
coverage==7.6.1
# via pytest-cov
docutils==0.20.1
# via
# -r requirements.txt
# myst-parser
# sphinx
entrypoints==0.3
# via flake8
filelock==3.15.4
# via virtualenv
flake8==3.7.9
# via -r requirements_dev.in
flask==3.0.0
# via
# -r requirements.txt
Expand All @@ -73,8 +56,6 @@ flask-env==2.0.0
# via -r requirements.txt
frozen-flask==1.0.1
# via -r requirements.txt
identify==2.6.0
# via pre-commit
idna==3.7
# via
# -r requirements.txt
Expand All @@ -89,8 +70,6 @@ imagesize==1.4.1
# sphinx
iniconfig==1.1.1
# via pytest
isort==5.7.0
# via -r requirements_dev.in
itsdangerous==2.1.2
# via
# -r requirements.txt
Expand Down Expand Up @@ -124,18 +103,13 @@ markdown-it-py==3.0.0
# mdformat
# mdit-py-plugins
# myst-parser
# ocds-babel
markupsafe==2.1.2
# via
# -r requirements.txt
# jinja2
# werkzeug
mccabe==0.6.1
# via flake8
mdformat==0.7.17
# via
# -r requirements.txt
# ocds-babel
# via -r requirements.txt
mdit-py-plugins==0.4.0
# via
# -r requirements.txt
Expand All @@ -145,29 +119,21 @@ mdurl==0.1.0
# -r requirements.txt
# markdown-it-py
myst-parser==2.0.0
# via
# -r requirements.txt
# ocdsextensionregistry
nodeenv==1.9.1
# via pre-commit
ocds-babel[markdown]==0.3.5
# via
# -r requirements.txt
# ocdsextensionregistry
ocdsextensionregistry[cli]==0.3.8
# via -r requirements.txt
ocds-babel==0.3.5
# via -r requirements.txt
ocdsextensionregistry==0.3.8
# via
# -r requirements.txt
# ocdskit
ocdskit[perf]==1.0.2
ocdskit==1.0.2
# via -r requirements.txt
ocdsmerge==0.6.4
# via
# -r requirements.txt
# ocdskit
orjson==3.9.15
# via
# -r requirements.txt
# ocdskit
# via -r requirements.txt
packaging==23.1
# via
# -r requirements.txt
Expand All @@ -177,15 +143,8 @@ platformdirs==4.2.0
# via
# -r requirements.txt
# requests-cache
# virtualenv
pluggy==0.13.1
# via pytest
pre-commit==3.8.0
# via -r requirements_dev.in
pycodestyle==2.5.0
# via flake8
pyflakes==2.1.1
# via flake8
pygments==2.15.1
# via
# -r requirements.txt
Expand All @@ -209,11 +168,9 @@ pyyaml==6.0.1
# via
# -r requirements.txt
# myst-parser
# pre-commit
requests==2.32.2
# via
# -r requirements.txt
# coveralls
# ocdsextensionregistry
# ocdsmerge
# requests-cache
Expand All @@ -235,7 +192,6 @@ sphinx==7.2.5
# via
# -r requirements.txt
# myst-parser
# ocdsextensionregistry
# sphinxcontrib-serializinghtml
sphinxcontrib-applehelp==1.0.2
# via
Expand Down Expand Up @@ -265,8 +221,6 @@ text-unidecode==1.3
# via
# -r requirements.txt
# python-slugify
toml==0.10.2
# via coverage
url-normalize==1.4.3
# via
# -r requirements.txt
Expand All @@ -276,8 +230,6 @@ urllib3==2.2.2
# -r requirements.txt
# requests
# requests-cache
virtualenv==20.26.3
# via pre-commit
werkzeug==3.0.3
# via
# -r requirements.txt
Expand Down

0 comments on commit 7b25e1b

Please sign in to comment.