Skip to content

Commit 37c9842

Browse files
committed
Add linting to github action
1 parent c56de59 commit 37c9842

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

.github/workflows/testsuite.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ jobs:
4444
- name: Install
4545
run: pip install --no-deps .
4646

47+
- name: Lint with Ruff
48+
run : ruff check
49+
4750
- name: Run Tests
4851
run: |
4952
python -m pytest --cov=entropy --cov-report=term-missing

environment.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ channels:
44
dependencies:
55
- numpy
66
- pytest
7-
- pytest-cov
7+
- pytest-cov
8+
- ruff

pyproject.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,20 @@ dependencies = [
1111
"pytest",
1212
"pytest-cov"
1313
]
14+
15+
# Optional upgrades beyond the default ruff rules
16+
[tool.ruff.lint]
17+
select = [
18+
"E", # pycodestyle
19+
"W", # pycodestyle warnings
20+
"F", # Pyflakes
21+
"B", # flake8-bugbear
22+
"A", # flake8-builtins
23+
"N", # pep8-naming
24+
# "I", # isort: better import organization
25+
# "D", # pydocstyle: check docstrings
26+
# "C4", # flake8-comprehensions: check for code simplifications with comprehensions
27+
# "SIM", # flake8-simplify: check for code simplifications
28+
# "UP", # pyupgrade: check for syntax improvments in new python versions
29+
# "C90", # McCabe complexity
30+
]

0 commit comments

Comments
 (0)