Skip to content

Commit 6c6b71a

Browse files
committed
feat: Initial commit - copy of algokit-python-template
0 parents  commit 6c6b71a

File tree

298 files changed

+12601
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

298 files changed

+12601
-0
lines changed

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root=true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
insert_final_newline = true
8+
9+
[*.py]
10+
indent_size = 4

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: "\U0001F41C Bug report"
3+
about: Report a reproducible bug.
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
### Subject of the issue
10+
11+
<!-- Describe your issue here. -->
12+
13+
### Your environment
14+
15+
<!--
16+
* Please provide the output of `algokit doctor` command response,
17+
* This will give us a good idea about your environment
18+
-->
19+
20+
### Steps to reproduce
21+
22+
1.
23+
2.
24+
25+
### Expected behaviour
26+
27+
### Actual behaviour
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: "\U0001F514 Feature Request"
3+
about: Suggestions for how we can improve the algorand platform.
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Problem
10+
11+
<!-- What is the problem that we’re trying to solve? -->
12+
13+
## Solution
14+
15+
<!-- Do you have a potential/suggested solution? Document more than one if possible. -->
16+
17+
### Proposal
18+
19+
<!-- Describe the solution you’d like in detail. -->
20+
21+
### Pros and Cons
22+
23+
<!-- What are the advantages and disadvantages of this solution? -->
24+
25+
## Dependencies
26+
27+
<!-- Does the solution have any team or design dependencies? -->

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
commit-message:
8+
prefix: "chore(deps)"
9+
groups:
10+
all:
11+
patterns:
12+
- "*"
13+
update-types:
14+
- "minor"
15+
- "patch"

.github/pull_request_template.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Proposed Changes
2+
3+
-
4+
-
5+
-

.github/workflows/cd.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Continuous Delivery of Template
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- '.github/workflows/**'
9+
10+
concurrency: release
11+
12+
jobs:
13+
ci-check-python:
14+
name: Check Python
15+
uses: ./.github/workflows/check-python.yaml
16+
17+
tag-release:
18+
runs-on: "ubuntu-latest"
19+
needs: ci-check-python
20+
steps:
21+
- name: Checkout source code
22+
uses: actions/checkout@v4
23+
24+
- name: Tag release
25+
id: tag
26+
uses: TriPSs/conventional-changelog-action@v3.18.0
27+
with:
28+
skip-commit: "true"
29+
tag-prefix: ""
30+
skip-on-empty: "false"
31+
32+
- name: Create Release
33+
uses: softprops/action-gh-release@v1
34+
if: ${{ steps.tag.outputs.skipped == 'false' }}
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
with:
38+
tag_name: ${{ steps.tag.outputs.tag }}
39+
body: ${{ steps.tag.outputs.clean_changelog }}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Check Template
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
check-python:
8+
runs-on: "ubuntu-latest"
9+
steps:
10+
- name: Checkout source code
11+
uses: actions/checkout@v4
12+
13+
- name: Install poetry
14+
run: pipx install poetry
15+
16+
- name: Install algokit
17+
run: pipx install algokit
18+
19+
- name: Run algokit localnet
20+
run: algokit localnet start
21+
22+
- name: Set up Python 3.12
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.12"
26+
cache: "poetry"
27+
28+
- name: Install dependencies
29+
run: poetry env use 3.12 && poetry install --no-interaction --no-root
30+
31+
- name: Check formatting with Black
32+
run: |
33+
# stop the build if there are files that don't meet formatting requirements
34+
poetry run black --check .
35+
36+
- name: Check linting with Ruff
37+
run: |
38+
# stop the build if there are Python syntax errors or undefined names
39+
poetry run ruff .
40+
41+
- name: Configure git
42+
shell: bash
43+
run: |
44+
# set git user and email as test invoke git
45+
git config --global user.email "actions@github.com" && git config --global user.name "github-actions"
46+
47+
- name: Setup Node.js 20.x
48+
uses: actions/setup-node@v4
49+
with:
50+
node-version: "20.x"
51+
52+
- name: Run tests
53+
shell: bash
54+
run: |
55+
set -o pipefail
56+
poetry run pytest --junitxml=pytest-junit.xml
57+
58+
- name: Check generated templates have been reviewed
59+
shell: bash
60+
run: |
61+
# Add untracked files as empty so they come up in diff
62+
git add -N ./examples
63+
# Look for changes in generated templates and error if there are any
64+
git diff --exit-code --minimal ./examples

.github/workflows/pr.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Pull Request validation
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
schedule:
8+
- cron: "0 8 * * 1" # Each monday 8 AM UTC
9+
10+
jobs:
11+
pr-check:
12+
name: Check Python
13+
uses: ./.github/workflows/check-python.yaml

.gitignore

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# poetry
98+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102+
#poetry.lock
103+
104+
# pdm
105+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106+
#pdm.lock
107+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108+
# in version control.
109+
# https://pdm.fming.dev/#use-with-ide
110+
.pdm.toml
111+
112+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113+
__pypackages__/
114+
115+
# Celery stuff
116+
celerybeat-schedule
117+
celerybeat.pid
118+
119+
# SageMath parsed files
120+
*.sage.py
121+
122+
# Environments
123+
.env
124+
.venv
125+
env/
126+
venv/
127+
ENV/
128+
env.bak/
129+
venv.bak/
130+
131+
# Spyder project settings
132+
.spyderproject
133+
.spyproject
134+
135+
# Rope project settings
136+
.ropeproject
137+
138+
# mkdocs documentation
139+
/site
140+
141+
# mypy
142+
.mypy_cache/
143+
.dmypy.json
144+
dmypy.json
145+
146+
# Pyre type checker
147+
.pyre/
148+
149+
# pytype static type analyzer
150+
.pytype/
151+
152+
# Ruff (linter)
153+
.ruff_cache/
154+
155+
# Cython debug symbols
156+
cython_debug/
157+
158+
# PyCharm
159+
.idea
160+
!.idea/
161+
.idea/*
162+
!.idea/runConfigurations/
163+
164+
# macOS
165+
.DS_Store
166+
167+
# Received approval test files
168+
*.received.*
169+
170+
# NPM
171+
node_modules
172+
173+
# Ignore lockfiles in all directories and subdirectories under examples, recursively
174+
examples/**/package-lock.json
175+
examples/**/poetry.lock
176+
177+
# playground folder for previewing templates
178+
playground
179+
180+
# Misc
181+
examples/**/smart_contracts/artifacts
182+
examples/**/.algokit/sources

0 commit comments

Comments
 (0)