Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
aorumbayev authored Dec 8, 2023
0 parents commit a241b02
Show file tree
Hide file tree
Showing 768 changed files with 24,614 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root=true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true

[*.py]
indent_size = 4
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
5 changes: 5 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Proposed Changes

-
-
-
37 changes: 37 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Continuous Delivery of Template

on:
push:
branches:
- main

concurrency: release

jobs:
ci-check-python:
name: Check Python
uses: ./.github/workflows/check-python.yaml

tag-release:
runs-on: "ubuntu-latest"
needs: ci-check-python
steps:
- name: Checkout source code
uses: actions/checkout@v3

- name: Tag release
id: tag
uses: TriPSs/[email protected]
with:
skip-commit: "true"
tag-prefix: ""
skip-on-empty: "false"

- name: Create Release
uses: softprops/action-gh-release@v1
if: ${{ steps.tag.outputs.skipped == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.tag }}
body: ${{ steps.tag.outputs.clean_changelog }}
56 changes: 56 additions & 0 deletions .github/workflows/check-python.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Check Template

on:
workflow_call:

jobs:
check-python:
runs-on: "ubuntu-latest"
steps:
- name: Checkout source code
uses: actions/checkout@v3

- name: Install poetry
run: pipx install poetry

- name: Install algokit
run: pipx install algokit

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "poetry"

- name: Install dependencies
run: poetry install --no-interaction --no-root

- name: Check formatting with Black
run: |
# stop the build if there are files that don't meet formatting requirements
poetry run black --check .
- name: Check linting with Ruff
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run ruff .
- name: Configure git
shell: bash
run: |
# set git user and email as test invoke git
git config --global user.email "[email protected]" && git config --global user.name "github-actions"
- name: Run tests
shell: bash
run: |
set -o pipefail
poetry run pytest --junitxml=pytest-junit.xml -n auto
- name: Check generated templates have been reviewed
shell: bash
run: |
# Add untracked files as empty so they come up in diff
git add -N ./tests_generated
# Look for changes in generated templates and error if there are any
git diff --exit-code --minimal ./tests_generated
12 changes: 12 additions & 0 deletions .github/workflows/issue_closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Solve zendesk ticket when the issue is closed
on:
issues:
types: [closed]
jobs:
issue_closed:
uses: algorandfoundation/gh_zendesk_sync/.github/workflows/github_zendesk_issue_closed.yml@main
with:
ZENDESK_TENANT_NAME: ${{ vars.ZENDESK_TENANT_NAME }}
ISSUE_LABEL: makerx
secrets:
ZENDESK_AUTH_TOKEN: ${{ secrets.ZENDESK_AUTH_TOKEN }}
12 changes: 12 additions & 0 deletions .github/workflows/issue_commented.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Add comment to zendesk ticket on GitHub issue commented
on:
issue_comment:
types: [created]
jobs:
issue_closed:
uses: algorandfoundation/gh_zendesk_sync/.github/workflows/github_zendesk_issue_commented.yml@main
with:
ZENDESK_TENANT_NAME: ${{ vars.ZENDESK_TENANT_NAME }}
ISSUE_LABEL: makerx
secrets:
ZENDESK_AUTH_TOKEN: ${{ secrets.ZENDESK_AUTH_TOKEN }}
12 changes: 12 additions & 0 deletions .github/workflows/issue_labelled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Create Zendesk ticket when an issue is labelled with makerx
on:
issues:
types: [labeled]
jobs:
issue_created:
uses: algorandfoundation/gh_zendesk_sync/.github/workflows/github_zendesk_issue_labelled.yml@main
with:
ZENDESK_TENANT_NAME: ${{ vars.ZENDESK_TENANT_NAME }}
ISSUE_LABEL: makerx
secrets:
ZENDESK_AUTH_TOKEN: ${{ secrets.ZENDESK_AUTH_TOKEN }}
8 changes: 8 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Pull Request validation

on: [pull_request]

jobs:
pr-check:
name: Check Python
uses: ./.github/workflows/check-python.yaml
11 changes: 11 additions & 0 deletions .github/workflows/zendesk_github_add_comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Add comment to GitHub issue on Zendesk ticket commented
on:
repository_dispatch:
types:
- zendesk_github_add_comment
permissions:
issues: write
jobs:
add-comment:
name: Add comment to issue
uses: algorandfoundation/gh_zendesk_sync/.github/workflows/zendesk_github_add_comment.yml@main
11 changes: 11 additions & 0 deletions .github/workflows/zendesk_github_close_issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Close GitHub issue on Zendesk ticket solved
on:
repository_dispatch:
types:
- zendesk_github_close_issue
permissions:
issues: write
jobs:
close_issue:
name: Close GitHub issue
uses: algorandfoundation/gh_zendesk_sync/.github/workflows/zendesk_github_close_issue.yml@main
171 changes: 171 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Ruff (linter)
.ruff_cache/

# Cython debug symbols
cython_debug/

# PyCharm
.idea
!.idea/
.idea/*
!.idea/runConfigurations/

# macOS
.DS_Store

# Received approval test files
*.received.*

# NPM
node_modules
32 changes: 32 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
repos:
- repo: local
hooks:
- id: black
name: black
description: "Black: The uncompromising Python code formatter"
entry: poetry run black
language: system
minimum_pre_commit_version: 2.9.2
require_serial: true
types_or: [ python, pyi ]
- id: ruff
name: ruff
description: "Run 'ruff' for extremely fast Python linting"
entry: poetry run ruff
language: system
'types': [python]
args: [--fix]
require_serial: false
additional_dependencies: []
minimum_pre_commit_version: '0'
files: '^(src|tests)/'
- id: mypy
name: mypy
description: '`mypy` will check Python types for correctness'
entry: poetry run mypy
language: system
types_or: [ python, pyi ]
require_serial: true
additional_dependencies: [ ]
minimum_pre_commit_version: '2.9.2'
files: '^(src|tests)/'
1 change: 1 addition & 0 deletions .vscode/clear.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove-Item -Recurse -Force test_output -ErrorAction Ignore
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"wholroyd.jinja"
]
}
Loading

0 comments on commit a241b02

Please sign in to comment.