generated from ApeWorX/project-template
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
267 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
name: Bug report | ||
about: Report an error that you've encountered. | ||
labels: 'category: bug' | ||
--- | ||
|
||
### Environment information | ||
|
||
- OS: macOS / linux / win | ||
- Python Version: x.x.x | ||
|
||
### What went wrong? | ||
|
||
Please include information like: | ||
|
||
- what command you ran | ||
- the code that caused the failure (see [this link](https://help.github.com/articles/basic-writing-and-formatting-syntax/) for help with formatting code) | ||
- full output of the error you received | ||
|
||
### How can it be fixed? | ||
|
||
Fill this in if you have ideas on how the bug could be fixed. |
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,22 @@ | ||
--- | ||
name: Feature request | ||
about: Request a new feature, or an improvement to existing functionality. | ||
labels: 'category: feature' | ||
--- | ||
|
||
### Overview | ||
|
||
Provide a simple overview of what you wish to see added. Please include: | ||
|
||
- What you are trying to do | ||
- Why Ape's current functionality is inadequate to address your goal | ||
|
||
### Specification | ||
|
||
Describe the syntax and semantics of how you would like to see this feature implemented. The more detailed the better! | ||
|
||
Remember, your feature is much more likely to be included if it does not involve any breaking changes. | ||
|
||
### Dependencies | ||
|
||
Include links to any open issues that must be resolved before this feature can be implemented. |
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,23 @@ | ||
### What I did | ||
|
||
<!-- Create a summary of the changes --> | ||
|
||
<!-- The `fixes:` field denotes an issue that will be marked resolved by merging this PR --> | ||
|
||
fixes: # | ||
|
||
### How I did it | ||
|
||
<!-- Discuss the thought process behind the change --> | ||
|
||
### How to verify it | ||
|
||
<!-- Discuss any methods that should be used to verify the change --> | ||
|
||
### Checklist | ||
|
||
<!-- All PRs must complete the following checklist before being merged --> | ||
|
||
- [ ] All changes are completed | ||
- [ ] New test cases have been added | ||
- [ ] Documentation has been updated |
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,39 @@ | ||
name-template: '$RESOLVED_VERSION' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
|
||
categories: | ||
- title: 'Features' | ||
labels: | ||
- 'feat' | ||
- title: 'Bug Fixes' | ||
labels: | ||
- 'fix' | ||
- title: 'Other updates' | ||
labels: | ||
- 'refactor' | ||
- 'chore' | ||
- 'docs' | ||
- 'perf' | ||
- 'test' | ||
|
||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||
|
||
version-resolver: | ||
major: | ||
labels: | ||
- 'major' | ||
minor: | ||
labels: | ||
- 'minor' | ||
patch: | ||
labels: | ||
- 'patch' | ||
default: patch | ||
|
||
template: | | ||
## Changes | ||
$CHANGES | ||
Special thanks to: $CONTRIBUTORS |
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,34 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: python | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v3 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 |
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,19 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
update-draft: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
# Drafts your next Release notes as Pull Requests are merged into "main" | ||
- uses: release-drafter/release-drafter@v5 | ||
with: | ||
disable-autolabeler: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,30 @@ | ||
name: PR Title | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
pr-title: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r cz-requirement.txt | ||
- name: Check PR Title | ||
env: | ||
TITLE: ${{ github.event.pull_request.title }} | ||
run: cz check --message "$TITLE" |
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,20 @@ | ||
name: "Close stale PRs" | ||
on: | ||
schedule: | ||
- cron: '30 1 * * *' | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
- uses: actions/stale@v9 | ||
with: | ||
stale-pr-message: 'This pull request is considered stale because it has been open 30 days with no activity. Remove stale label, add a comment, or make a new commit, otherwise this PR will be closed in 5 days.' | ||
close-pr-message: 'This PR was closed because it has been inactive for 35 days.' | ||
stale-pr-label: "stale" | ||
close-pr-label: "inactive" | ||
days-before-pr-stale: 30 | ||
days-before-pr-close: 5 | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |
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,58 @@ | ||
on: ["push", "pull_request"] | ||
|
||
name: Test | ||
|
||
concurrency: | ||
# Cancel older, in-progress jobs from the same PR, same workflow. | ||
# use run_id if the job is triggered by a push to ensure | ||
# push-triggered jobs to not get canceled. | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
linting: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[lint] | ||
- name: Run Black | ||
run: black --check . | ||
|
||
- name: Run isort | ||
run: isort --check-only . | ||
|
||
- name: Run flake8 | ||
run: flake8 . | ||
|
||
- name: Run mdformat | ||
run: mdformat . --check | ||
|
||
type-check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[lint,test] | ||
- name: Run MyPy | ||
run: mypy . |