Skip to content

Commit

Permalink
chore: Migrate to @vorausrobobtik python template
Browse files Browse the repository at this point in the history
  • Loading branch information
g3n35i5 committed Jun 14, 2024
1 parent bb188d0 commit a37e7f7
Show file tree
Hide file tree
Showing 164 changed files with 1,630 additions and 1,778 deletions.
23 changes: 23 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"template": "[email protected]:vorausrobotik/voraus-python-template.git",
"commit": "9ef5161b20a68d274ecf3828467c3f44f4747bca",
"checkout": null,
"context": {
"cookiecutter": {
"full_name": "Jan-Frederik Schmidt",
"email": "[email protected]",
"github_user": "",
"project_name": "shop-db2",
"repo_name": "shop-db2",
"package_name": "shopdb",
"import_name": "shopdb",
"project_short_description": "The simple way to manage purchases and user interactions in a small community.",
"url": "https://github.com/g3n35i5/shopdb",
"_debug": "False",
"_extensions": ["extensions.git_extension.GitExtension"],
"_copy_without_render": ["docs/_templates/license_compliance.rst.j2"],
"_template": "[email protected]:vorausrobotik/voraus-python-template.git"
}
},
"directory": null
}
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @g3n35i5
47 changes: 47 additions & 0 deletions .github/workflows/pr_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Pull Request Lint

on:
pull_request:
types: [opened, edited, synchronize, labeled, unlabeled]

permissions:
pull-requests: read

jobs:
main:
name: Validate PR title and description
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
requireScope: false
# Configure additional validation for the subject based on a regex.
# This ensures the subject does start with an uppercase character.
subjectPattern: ^(?![a-z])(?![a-zA-Z]+s\s(?<!ss\s)).+[^\.\?\!]$
# If `subjectPattern` is configured, you can use this property to override
# the default error message that is shown when the pattern doesn't match.
# The variables `subject` and `title` can be used within the message.
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that:
- The subject does start with an uppercase character
- The subject does not end with a dot, question or exclamation mark
- The subject uses imperative mood
# If the PR contains one of these newline-delimited labels, the
# validation is skipped.
ignoreLabels: |
rebase
- name: Validate PR body is filled
env:
BODY_CONTEXT: ${{ toJson(github.event.pull_request.body) }}
run: |
if [ "$BODY_CONTEXT" = "null" ];\
then\
echo "Error: The pull request body is empty." &&\
echo "Please add a description why the change is necessary and link tickets." &&\
(exit 1);
else\
echo "PR Body is not empty. Check passed.";\
fi\
15 changes: 15 additions & 0 deletions .github/workflows/python_template_update_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Python template update checks
on:
push:
branches:
- "chore/update-template**"
jobs:
fail-if-rej-files-exist:
name: "Check for rejected files"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Assert that 0 files ending with '.rej' are in the current working directory.
# `xargs` returns 0 on success, otherwise status codes between 1 and 127, see
# https://man7.org/linux/man-pages/man1/xargs.1.html for details.
- run: find . -iname "*.rej" | wc -l | xargs -I % test % -eq 0
60 changes: 60 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,63 @@ venv.bak/

# mypy
.mypy_cache/


# These are some examples of commonly ignored file patterns.
# You should customize this list as applicable to your project.
# Learn more about .gitignore:
# https://www.atlassian.com/git/tutorials/saving-changes/gitignore

# General
output/
.tox/
reports/
.coverage
.coverage.*
MANIFEST
docs/shopdb*
docs/modules.rst
docs/ossLicenses.json
docs/license_compliance.rst
.env

# Build and package files
**/*.egg-info/
**/build/**/*
node_modules/
dist/
.jfrog/
*.class
*.py[cod]
*.jar
shopdb-[0-9]*

# Log files
**/log/**/*
*.log

# IDEs
.idea/
.vscode/

# Virtual environments
venv/
.venv/
.conda/

# Generated by OS
.DS_Store
Thumbs.db

# Applications
*.app
*.exe
*.war

# Large media files
*.mp4
*.tiff
*.avi
*.flv
*.mov
*.wmv
File renamed without changes.
Loading

0 comments on commit a37e7f7

Please sign in to comment.