Skip to content

Commit

Permalink
refactor: consolidate config in pyproject.toml (#22)
Browse files Browse the repository at this point in the history
and some basic maintenance on lint checking
  • Loading branch information
crccheck authored Sep 8, 2023
1 parent 4b5113c commit 9064e17
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ jobs:
- run: make test

lint:
name: "Black"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- run: pip install black
- run: black --check .
- run: pip install -r requirements.txt
- run: make lint
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ test: ## Run test suite
coverage run test_project_runpy.py
coverage report

lint: ## Run lint check
black --check .
ruff check .

# Bump project_runpy.__version__
# Update CHANGELOG (TODO)
# `git commit -am "1.0.0"`
Expand Down
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,14 @@ classifiers = [
"Programming Language :: Python :: 3.7",
"Topic :: Software Development :: Libraries :: Python Modules",
]

[tool.coverage.run]
branch = true
source = ["project_runpy"]

[tool.coverage.report]
show_missing = true
skip_covered = true

[tool.ruff]
line-length = 100
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
black
coverage
flake8
ruff
10 changes: 0 additions & 10 deletions setup.cfg

This file was deleted.

0 comments on commit 9064e17

Please sign in to comment.