-
Notifications
You must be signed in to change notification settings - Fork 42
Maintenance update: switch to pyproject.toml, format with Black, add back coverage report, Wagtail 7.3 #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
83a24f0
Migrate to `pyproject.toml`, add back coverage report
g-nie 638ab15
Bump GitHub Actions versions
g-nie 94b9f34
Bump supported Python, Django and Wagtail versions
g-nie 9199b84
Update CI comment
g-nie 290041d
Format report build failure script
g-nie 22f37ba
Pin setuptools<81 in test extra
g-nie 8c2fff9
Reformat with Black
g-nie 2841794
Ignore black formatting commit in `git blame`
g-nie ed7f912
Align linting config with Black
g-nie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| [flake8] | ||
| max-line-length = 88 | ||
| exclude = .tox,.git,*/migrations/*,venv,dist,build,*.pyc,*.egg-info | ||
| ignore = E203,E231,E266,E501,W503,B950,F405 | ||
| max-complexity = 11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # git-blame ignored revisions | ||
| # To configure, run | ||
| # git config blame.ignoreRevsFile .git-blame-ignore-revs | ||
| # Requires Git > 2.23 | ||
| # See https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt | ||
|
|
||
| # Reformat with Black | ||
| 8c2fff90dd68190cc52563459fd95c59b26b919e | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,28 @@ | ||
| .PHONY: help all clean install flake8 isort lint test | ||
| .PHONY: help all clean install format test | ||
| .DEFAULT_GOAL := help | ||
|
|
||
| help: ## See what commands are available. | ||
| @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36mmake %-15s\033[0m # %s\n", $$1, $$2}' | ||
|
|
||
|
|
||
| all: install clean test lint ## Install, test and lint the project. | ||
| all: clean install format test ## Install, format and test the project. | ||
|
|
||
| clean: ## Remove Python file artifacts. | ||
| find . -type f -name "*.py[co]" -delete | ||
| find . -type d -name "__pycache__" -delete | ||
| find . -name '*.pyc' -exec rm -rf {} + | ||
| find . -name '__pycache__' -exec rm -rf {} + | ||
| find . -name '*.egg-info' -exec rm -rf {} + | ||
| rm -rf build dist | ||
|
|
||
| install: ## Install dependencies. | ||
| pip install -e .[test] | ||
|
|
||
| flake8: ## Run flake8 on the project. | ||
| flake8 src/ | ||
|
|
||
| isort: ## Run isort on the project. | ||
| isort --check-only --diff --recursive src/ | ||
|
|
||
| lint: flake8 isort ## Lint the project. | ||
| format: ## Format the code. | ||
| black . | ||
| isort . | ||
| flake8 . | ||
|
|
||
| test: ## Test the project. | ||
| py.test | ||
| pytest --cov | ||
|
|
||
| cov: ## Generate coverage report (manually open htmlcov/index.html in browser) | ||
| pytest --cov --cov-report html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| coverage: | ||
| precision: 1 | ||
| round: nearest | ||
| range: "70...100" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️