Skip to content

Commit a241b02

Browse files
authored
Initial commit
0 parents  commit a241b02

File tree

768 files changed

+24614
-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.

768 files changed

+24614
-0
lines changed

.editorconfig

+10
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

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/pull_request_template.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Proposed Changes
2+
3+
-
4+
-
5+
-

.github/workflows/cd.yaml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Continuous Delivery of Template
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: release
9+
10+
jobs:
11+
ci-check-python:
12+
name: Check Python
13+
uses: ./.github/workflows/check-python.yaml
14+
15+
tag-release:
16+
runs-on: "ubuntu-latest"
17+
needs: ci-check-python
18+
steps:
19+
- name: Checkout source code
20+
uses: actions/checkout@v3
21+
22+
- name: Tag release
23+
id: tag
24+
uses: TriPSs/conventional-changelog-action@v3.18.0
25+
with:
26+
skip-commit: "true"
27+
tag-prefix: ""
28+
skip-on-empty: "false"
29+
30+
- name: Create Release
31+
uses: softprops/action-gh-release@v1
32+
if: ${{ steps.tag.outputs.skipped == 'false' }}
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
with:
36+
tag_name: ${{ steps.tag.outputs.tag }}
37+
body: ${{ steps.tag.outputs.clean_changelog }}

.github/workflows/check-python.yaml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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@v3
12+
13+
- name: Install poetry
14+
run: pipx install poetry
15+
16+
- name: Install algokit
17+
run: pipx install algokit
18+
19+
- name: Set up Python 3.10
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: "3.10"
23+
cache: "poetry"
24+
25+
- name: Install dependencies
26+
run: poetry install --no-interaction --no-root
27+
28+
- name: Check formatting with Black
29+
run: |
30+
# stop the build if there are files that don't meet formatting requirements
31+
poetry run black --check .
32+
33+
- name: Check linting with Ruff
34+
run: |
35+
# stop the build if there are Python syntax errors or undefined names
36+
poetry run ruff .
37+
38+
- name: Configure git
39+
shell: bash
40+
run: |
41+
# set git user and email as test invoke git
42+
git config --global user.email "actions@github.com" && git config --global user.name "github-actions"
43+
44+
- name: Run tests
45+
shell: bash
46+
run: |
47+
set -o pipefail
48+
poetry run pytest --junitxml=pytest-junit.xml -n auto
49+
50+
- name: Check generated templates have been reviewed
51+
shell: bash
52+
run: |
53+
# Add untracked files as empty so they come up in diff
54+
git add -N ./tests_generated
55+
# Look for changes in generated templates and error if there are any
56+
git diff --exit-code --minimal ./tests_generated

.github/workflows/issue_closed.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Solve zendesk ticket when the issue is closed
2+
on:
3+
issues:
4+
types: [closed]
5+
jobs:
6+
issue_closed:
7+
uses: algorandfoundation/gh_zendesk_sync/.github/workflows/github_zendesk_issue_closed.yml@main
8+
with:
9+
ZENDESK_TENANT_NAME: ${{ vars.ZENDESK_TENANT_NAME }}
10+
ISSUE_LABEL: makerx
11+
secrets:
12+
ZENDESK_AUTH_TOKEN: ${{ secrets.ZENDESK_AUTH_TOKEN }}

.github/workflows/issue_commented.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Add comment to zendesk ticket on GitHub issue commented
2+
on:
3+
issue_comment:
4+
types: [created]
5+
jobs:
6+
issue_closed:
7+
uses: algorandfoundation/gh_zendesk_sync/.github/workflows/github_zendesk_issue_commented.yml@main
8+
with:
9+
ZENDESK_TENANT_NAME: ${{ vars.ZENDESK_TENANT_NAME }}
10+
ISSUE_LABEL: makerx
11+
secrets:
12+
ZENDESK_AUTH_TOKEN: ${{ secrets.ZENDESK_AUTH_TOKEN }}

.github/workflows/issue_labelled.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Create Zendesk ticket when an issue is labelled with makerx
2+
on:
3+
issues:
4+
types: [labeled]
5+
jobs:
6+
issue_created:
7+
uses: algorandfoundation/gh_zendesk_sync/.github/workflows/github_zendesk_issue_labelled.yml@main
8+
with:
9+
ZENDESK_TENANT_NAME: ${{ vars.ZENDESK_TENANT_NAME }}
10+
ISSUE_LABEL: makerx
11+
secrets:
12+
ZENDESK_AUTH_TOKEN: ${{ secrets.ZENDESK_AUTH_TOKEN }}

.github/workflows/pr.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: Pull Request validation
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
pr-check:
7+
name: Check Python
8+
uses: ./.github/workflows/check-python.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Add comment to GitHub issue on Zendesk ticket commented
2+
on:
3+
repository_dispatch:
4+
types:
5+
- zendesk_github_add_comment
6+
permissions:
7+
issues: write
8+
jobs:
9+
add-comment:
10+
name: Add comment to issue
11+
uses: algorandfoundation/gh_zendesk_sync/.github/workflows/zendesk_github_add_comment.yml@main
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Close GitHub issue on Zendesk ticket solved
2+
on:
3+
repository_dispatch:
4+
types:
5+
- zendesk_github_close_issue
6+
permissions:
7+
issues: write
8+
jobs:
9+
close_issue:
10+
name: Close GitHub issue
11+
uses: algorandfoundation/gh_zendesk_sync/.github/workflows/zendesk_github_close_issue.yml@main

.gitignore

+171
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
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

.pre-commit-config.yaml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
repos:
2+
- repo: local
3+
hooks:
4+
- id: black
5+
name: black
6+
description: "Black: The uncompromising Python code formatter"
7+
entry: poetry run black
8+
language: system
9+
minimum_pre_commit_version: 2.9.2
10+
require_serial: true
11+
types_or: [ python, pyi ]
12+
- id: ruff
13+
name: ruff
14+
description: "Run 'ruff' for extremely fast Python linting"
15+
entry: poetry run ruff
16+
language: system
17+
'types': [python]
18+
args: [--fix]
19+
require_serial: false
20+
additional_dependencies: []
21+
minimum_pre_commit_version: '0'
22+
files: '^(src|tests)/'
23+
- id: mypy
24+
name: mypy
25+
description: '`mypy` will check Python types for correctness'
26+
entry: poetry run mypy
27+
language: system
28+
types_or: [ python, pyi ]
29+
require_serial: true
30+
additional_dependencies: [ ]
31+
minimum_pre_commit_version: '2.9.2'
32+
files: '^(src|tests)/'

.vscode/clear.ps1

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove-Item -Recurse -Force test_output -ErrorAction Ignore

.vscode/extensions.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"wholroyd.jinja"
4+
]
5+
}

0 commit comments

Comments
 (0)