Skip to content

Commit

Permalink
add reuse lint to CI and pre-commit hook (#244)
Browse files Browse the repository at this point in the history
This adds linting reuse compliance to the pre-commit hook and the CI.

So that we stay reuse compliant when adding new files
  • Loading branch information
maurerle authored Nov 7, 2023
1 parent efc060c commit 5834480
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/lint-pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'
- name: Check reuse compliance
run: |
pip install reuse
reuse lint
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install --no-install-recommends -y coinor-cbc gcc g++ libglpk-dev glpk-utils && sudo rm -rf /var/lib/apt/lists/*
Expand Down
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
# SPDX-License-Identifier: AGPL-3.0-or-later

repos:
- repo: https://github.com/fsfe/reuse-tool
rev: v2.1.0
hooks:
- id: reuse
args: ["annotate", "--license", "AGPL-3.0-or-later", "--recursive", "--copyright", "ASSUME Developers", "--exclude-year", "--skip-unrecognised", "."]

- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
Expand Down
2 changes: 2 additions & 0 deletions assume/common/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# SPDX-License-Identifier: AGPL-3.0-or-later

# Assume Exceptions


class AssumeException(Exception):
pass
Expand Down

0 comments on commit 5834480

Please sign in to comment.