Skip to content
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

Add a series of new pre-commit hooks and GitHub Actions #116

Merged
merged 2 commits into from
Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
414 changes: 19 additions & 395 deletions .bandit.yaml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
ignore = E203,E266,E501,F811,W503
max-line-length = 80
max-complexity = 18
per-file-ignores = tests/*:DAR,S101
select = B,B9,LK,C,D,E,F,I,S,W
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
name: Bug report
about: Create a report to help us improve

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
Expand Down
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
time: "06:00"

- package-ecosystem: pip
directory: "/.github/workflows"
schedule:
interval: daily
time: "06:00"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
time: "06:00"
8 changes: 0 additions & 8 deletions .github/labeler.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
- name: "breaking-change"
color: ee0701
description: "A breaking change for existing users"
- name: "bug"
color: ee0701
description: "Bugs or issues which will cause a problem for users"
- name: "documentation"
color: 0052cc
description: "Project documentation"
- name: "enhancement"
color: 1d76db
description: "Enhancement of the code, not introducing new features."
- name: "maintenance"
color: 2af79e
description: "Generic library tasks"
- name: "dependencies"
color: 1d76db
description: "Upgrade or downgrade of project dependencies"

- name: "in-progress"
color: fbca04
description: "Issue is currently being resolved by a developer"
- name: "stale"
color: fef2c0
description: "There has not been activity on this issue or PR for some time"
- name: "no-stale"
color: fef2c0
description: "This issue or PR is exempted from the stale bot"

- name: "security"
color: ee0701
description: "Marks a security issue that needs to be resolved ASAP"
- name: "incomplete"
color: fef2c0
description: "Marks a PR or issue that is missing information"
- name: "invalid"
color: fef2c0
description: "Marks a PR or issue that is missing information"

- name: "help-wanted"
color: 0e8a16
description: "Needs a helping hang or expertise in order to resolve"
11 changes: 9 additions & 2 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,26 @@
categories:
- title: "🚨 Breaking Changes"
labels:
- "breaking change"
- "breaking-change"

- title: "🚀 Features"
labels:
- "enhancement"

- title: "🐛 Bug Fixes"
labels:
- "bug"

- title: "📕 Documentation"
labels:
- "documentation"

- title: "🧰 Maintenance"
labels:
- "dependencies"
- "documentation"
- "maintenance"
- "tooling"

change-template: "- $TITLE (#$NUMBER)"
name-template: "$NEXT_PATCH_VERSION"
tag-template: "$NEXT_PATCH_VERSION"
Expand Down
60 changes: 0 additions & 60 deletions .github/stale.yml

This file was deleted.

78 changes: 0 additions & 78 deletions .github/workflows/ci.yaml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: CodeQL

"on":
push:
branches:
- dev
- main

pull_request:
branches:
- dev
- main

workflow_dispatch:

schedule:
- cron: "30 1 * * 0"

jobs:
codeql:
name: Scanning
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v3

- name: 🏗 Initialize CodeQL
uses: github/codeql-action/init@v2

- name: 🚀 Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
24 changes: 24 additions & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Sync Labels

"on":
push:
branches:
- main
paths:
- .github/labels.yml

workflow_dispatch:

jobs:
labels:
name: ♻️ Sync labels
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v3

- name: 🚀 Run Label Syncer
uses: micnncim/action-label-syncer@v1.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Lock Closed Issues and PRs

"on":
schedule:
- cron: "0 9 * * *"

workflow_dispatch:

jobs:
lock:
name: 🔒 Lock!
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v3.0.0
with:
github-token: ${{ github.token }}
issue-inactive-days: "30"
issue-lock-reason: ""
pr-inactive-days: "1"
pr-lock-reason: ""
14 changes: 7 additions & 7 deletions .github/workflows/publish.yaml → .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
---
name: "Publish to PyPI"
name: Publish to PyPI

on:
"on":
push:
tags:
- "*"

jobs:
publish_to_pypi:

runs-on: ubuntu-latest

steps:
- name: Checkout Code
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v3

- name: Set up Python 3.11
- name: 🏗 Set up Python 3.9
id: python
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: 3.9

- name: Publish to PyPI
- name: 🚀 Publish to PyPi
run: |
pip install poetry
poetry publish --build -u __token__ -p ${{ secrets.PYPI_API_KEY }}