Skip to content

Commit

Permalink
Incorporate ruff linter into CI pipeline (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
cutwater authored Oct 14, 2024
1 parent 2832241 commit 569f3c0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:
make lint
- name: Run unit tests
if: matrix.python-version != '3.8'
run: |
make test/unit
Expand Down
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@

.PHONY: lint
lint:
@black . --extend-exclude .github/ --line-length 100 --diff --check
@flake8
black . --extend-exclude .github/ --line-length 100 --diff --check
flake8
ruff check

.PHONY: lint/format/black
lint/format/black:
@black . --extend-exclude .github/ --line-length 100
black . --extend-exclude .github/ --line-length 100


# ---------------------------------------------------------
Expand All @@ -22,16 +23,16 @@ test: lint test/unit test/functional

.PHONY: test/unit
test/unit:
@pytest tests/unit --cov=galaxy_importer --cov-branch
pytest tests/unit --cov=galaxy_importer --cov-branch

.PHONY: test/unit/annotate
test/unit/annotate:
@pytest tests/unit --cov=galaxy_importer --cov-branch --cov-report annotate
pytest tests/unit --cov=galaxy_importer --cov-branch --cov-report annotate

.PHONY: test/unit/annotate/clean
test/unit/annotate/clean:
find galaxy_importer -type f -name '*,cover' -delete

.PHONY: test/integration
test/integration:
@pytest tests/integration -v
pytest tests/integration -v
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
filename = "CHANGES.rst"
title_format = "galaxy-importer {version} ({project_date})"
issue_format = "`AAH-{issue} <https://issues.redhat.com/browse/AAH-{issue}>`_"


[tool.ruff]
line-length = 100
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ dev =
pytest-cov>=3.0.0,<5
pytest_mock>=3.8.0,<4
towncrier
ruff

[options.package_data]
galaxy_importer =
Expand Down

0 comments on commit 569f3c0

Please sign in to comment.