-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Generalize template for GUI framework plugins #82
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7f2a0d9
Generalize template for GUI framework plugins
rmartin16 4c46f0b
Fix whitespace for dependencies
rmartin16 6f31674
Rename additional->extra and collapse requires fields
rmartin16 53132b2
Verify output format templates in CI
rmartin16 a76c95e
Fix typo in pyproject.toml template
rmartin16 a9cbe59
Restore CI repo references to run on `main`
rmartin16 1afa46c
Remove test app configs from `tests`
rmartin16 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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 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,12 @@ | ||
name: Update pre-commit | ||
|
||
on: | ||
schedule: | ||
- cron: "0 20 * * SUN" # Sunday @ 2000 UTC | ||
workflow_dispatch: | ||
|
||
jobs: | ||
pre-commit-update: | ||
name: Update pre-commit | ||
uses: beeware/.github/.github/workflows/pre-commit-update.yml@main | ||
secrets: inherit |
This file contains 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,41 @@ | ||
exclude: ^{{ cookiecutter.app_name }}/ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
additional_dependencies: [toml] | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.15.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py38-plus] | ||
- repo: https://github.com/PyCQA/docformatter | ||
rev: v1.7.5 | ||
hooks: | ||
- id: docformatter | ||
args: [--in-place, --black] | ||
- repo: https://github.com/psf/black-pre-commit-mirror | ||
rev: 23.10.1 | ||
hooks: | ||
- id: black | ||
language_version: python3 | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.1.0 | ||
hooks: | ||
- id: flake8 | ||
args: [--max-line-length=119] | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.6 | ||
hooks: | ||
- id: codespell | ||
additional_dependencies: [tomli] |
This file contains 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 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 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,17 +1,13 @@ | ||
import re | ||
import sys | ||
|
||
|
||
# The restriction on application naming comes from PEP508 | ||
PEP508_NAME_RE = re.compile( | ||
r'^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$', | ||
re.IGNORECASE | ||
) | ||
PEP508_NAME_RE = re.compile(r"^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$", re.IGNORECASE) | ||
|
||
app_name = '{{ cookiecutter.app_name }}' | ||
app_name = "{{ cookiecutter.app_name }}" | ||
|
||
if not re.match(PEP508_NAME_RE, app_name): | ||
print('ERROR: `%s` is not a valid Python package name!' % app_name) | ||
print("ERROR: `%s` is not a valid Python package name!" % app_name) | ||
|
||
# exits with status 1 to indicate failure | ||
sys.exit(1) |
This file contains 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,7 @@ | ||
briefcase @ git+https://github.com/beeware/briefcase.git | ||
cookiecutter ==2.4.0 | ||
flake8 ==6.1.0 | ||
pre-commit ==3.5.0 | ||
pytest ==7.4.3 | ||
toml ==0.10.2 | ||
tox ==4.11.3 | ||
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.
Slightly odd whitespace usage here...
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.
I was inspired by the way that these constraints are interpreted by the packaging infrastructure such that the operator is really a part of the version.
But I should make them consistent with the rest of our dependency specifications.