Skip to content

Commit d35b00f

Browse files
committed
feat: initial commit
0 parents  commit d35b00f

27 files changed

Lines changed: 1270 additions & 0 deletions

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Report an error that you've encountered.
4+
labels: bug
5+
---
6+
7+
### Environment information
8+
9+
- `ape` and plugin versions:
10+
11+
```
12+
$ ape --version
13+
# ...copy and paste result of above command here...
14+
15+
$ ape plugins list
16+
# ...copy and paste result of above command here...
17+
```
18+
19+
- Python Version: x.x.x
20+
- OS: osx/linux/win
21+
22+
### What went wrong?
23+
24+
Please include information like:
25+
26+
- what command you ran
27+
- the code that caused the failure (see [this link](https://help.github.com/articles/basic-writing-and-formatting-syntax/) for help with formatting code)
28+
- full output of the error you received
29+
30+
### How can it be fixed?
31+
32+
Fill this in if you have ideas on how the bug could be fixed.

.github/ISSUE_TEMPLATE/feature.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Feature request
3+
about: Request a new feature, or an improvement to existing functionality.
4+
labels: enhancement
5+
---
6+
7+
### Overview
8+
9+
Provide a simple overview of what you wish to see added. Please include:
10+
11+
- What you are trying to do
12+
- Why Ape's current functionality is inadequate to address your goal
13+
14+
### Specification
15+
16+
Describe the syntax and semantics of how you would like to see this feature implemented. The more detailed the better!
17+
18+
Remember, your feature is much more likely to be included if it does not involve any breaking changes.
19+
20+
### Dependencies
21+
22+
Include links to any open issues that must be resolved before this feature can be implemented.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
name: Work item
3+
about: New work item for Ape team
4+
labels: backlog
5+
---
6+
7+
### Elevator pitch:
8+
9+
<!-- 1-2 line summary of the scope of this work item -->
10+
11+
### Value:
12+
13+
<!--
14+
Who is this for?
15+
Persona or group of people whom will derive value from the scenario.
16+
What benefits will be achieved or business metrics improved?
17+
-->
18+
19+
### Dependencies:
20+
21+
<!-- Call out key people, teams, tech dependencies, or assumptions. -->
22+
23+
### Design approach:
24+
25+
<!--
26+
Free text / diagram / whiteboard picture / etc. that clearly shows your approach and considerations to build the task list.
27+
Existing code patterns in production code base that you will base your work off of.
28+
-->
29+
30+
### Task list:
31+
32+
<!-- Bulleted list describing the exit criteria, desired end state and any documentation, monitors, work for DRI, etc. that will need to be added to make sure someone else can support once it's live. -->
33+
34+
- [ ] Tasks go here
35+
36+
### Estimated completion date:
37+
38+
### Design review:
39+
40+
<!-- 1-2 people needed for signoff -->
41+
42+
Do not signoff unless:
43+
44+
- 1. agreed the tasks and design approach will achieve acceptance, and
45+
- 2. the work can be completed by one person within the SLA.
46+
Design reviewers should consider simpler approaches to achieve goals.
47+
48+
(Please leave a comment to sign off)

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
### What I did
2+
3+
<!-- The `fixes:` field denotes an issue that will be marked resolved by merging this PR -->
4+
5+
fixes: #
6+
7+
### How I did it
8+
9+
### How to verify it
10+
11+
### Checklist
12+
13+
- [ ] Passes all linting checks (pre-commit and CI jobs)
14+
- [ ] New test cases have been added and are passing
15+
- [ ] Documentation has been updated
16+
- [ ] PR title follows [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) standard (will be automatically included in the changelog)

.github/release-drafter.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name-template: '$RESOLVED_VERSION'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
4+
categories:
5+
- title: 'Features'
6+
labels:
7+
- 'feat'
8+
- title: 'Bug Fixes'
9+
labels:
10+
- 'fix'
11+
- title: 'Other updates'
12+
labels:
13+
- 'refactor'
14+
- 'chore'
15+
- 'docs'
16+
17+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
18+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
19+
20+
version-resolver:
21+
major:
22+
labels:
23+
- 'major'
24+
minor:
25+
labels:
26+
- 'minor'
27+
patch:
28+
labels:
29+
- 'patch'
30+
default: patch
31+
32+
template: |
33+
## Changes
34+
35+
$CHANGES
36+
37+
Special thanks to: $CONTRIBUTORS

.github/workflows/commitlint.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
on: push
2+
3+
name: Commit Message
4+
5+
# NOTE: Skip check on PR so as not to confuse contributors
6+
# NOTE: Also install a PR title checker so we don't mess up merges
7+
jobs:
8+
check:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Setup Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.10"
20+
21+
- name: Install Dependencies
22+
run: pip install commitizen
23+
24+
- name: Check commit history
25+
run: cz check --rev-range $(git rev-list --all --reverse | head -1)..HEAD

.github/workflows/draft.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
update-draft:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
# Drafts your next Release notes as Pull Requests are merged into "main"
15+
- uses: release-drafter/release-drafter@v5
16+
with:
17+
disable-autolabeler: true
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/prtitle.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: PR Title
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
jobs:
11+
check:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Setup Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.10"
21+
22+
- name: Install Dependencies
23+
run: pip install commitizen
24+
25+
- name: Check PR Title
26+
env:
27+
TITLE: ${{ github.event.pull_request.title }}
28+
run: cz check --message "$TITLE"

.github/workflows/publish.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
jobs:
8+
deploy:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.10"
19+
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install -e .[release]
24+
25+
- name: Build
26+
run: python setup.py sdist bdist_wheel
27+
28+
- name: Publish
29+
env:
30+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
31+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
32+
run: twine upload dist/* --verbose

.github/workflows/test.yaml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
on: ["push", "pull_request"]
2+
3+
name: Test
4+
5+
concurrency:
6+
# Cancel older, in-progress jobs from the same PR, same workflow.
7+
# use run_id if the job is triggered by a push to ensure
8+
# push-triggered jobs to not get canceled.
9+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
linting:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Setup Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.10"
23+
24+
- name: Install Dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install .[lint]
28+
29+
- name: Run Black
30+
run: black --check .
31+
32+
- name: Run isort
33+
run: isort --check-only .
34+
35+
- name: Run flake8
36+
run: flake8 .
37+
38+
- name: Run mdformat
39+
run: mdformat . --check
40+
41+
type-check:
42+
runs-on: ubuntu-latest
43+
44+
steps:
45+
- uses: actions/checkout@v4
46+
47+
- name: Setup Python
48+
uses: actions/setup-python@v5
49+
with:
50+
python-version: "3.10"
51+
52+
- name: Install Dependencies
53+
run: |
54+
python -m pip install --upgrade pip
55+
pip install .[lint,test]
56+
57+
- name: Run MyPy
58+
run: mypy .
59+
60+
functional:
61+
runs-on: ${{ matrix.os }}
62+
63+
strategy:
64+
matrix:
65+
os: [ubuntu-latest, macos-latest] # eventually add `windows-latest`
66+
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
67+
68+
steps:
69+
- uses: actions/checkout@v4
70+
71+
- name: Setup Python
72+
uses: actions/setup-python@v5
73+
with:
74+
python-version: ${{ matrix.python-version }}
75+
76+
- name: Install Dependencies
77+
run: |
78+
python -m pip install --upgrade pip
79+
pip install .[test]
80+
81+
- name: Run Tests
82+
run: pytest -m "not fuzzing" -n 0 -s --cov
83+
84+
# NOTE: uncomment this block after you've marked tests with @pytest.mark.fuzzing
85+
# fuzzing:
86+
# runs-on: ubuntu-latest
87+
#
88+
# strategy:
89+
# fail-fast: true
90+
#
91+
# steps:
92+
# - uses: actions/checkout@v4
93+
#
94+
# - name: Setup Python
95+
# uses: actions/setup-python@v5
96+
# with:
97+
# python-version: "3.10"
98+
#
99+
# - name: Install Dependencies
100+
# run: pip install .[test]
101+
#
102+
# - name: Run Tests
103+
# run: pytest -m "fuzzing" --no-cov -s

0 commit comments

Comments
 (0)