Skip to content

Commit 652fb62

Browse files
committed
sideko sdk init
0 parents  commit 652fb62

4,650 files changed

Lines changed: 378320 additions & 0 deletions

File tree

Some content is hidden

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

.github/workflows/publish.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# This workflow will publish the python package to PyPi on release
2+
# This requires you to have a secret PYPI_TOKEN saved in your github environment
3+
4+
name: Publish to PyPi
5+
6+
on:
7+
release:
8+
types: [published]
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
steps:
14+
#----------------------------------------------
15+
# ----- checkout & setup python -----
16+
#----------------------------------------------
17+
- name: checkout repository
18+
uses: actions/checkout@v4
19+
- name: setup python
20+
uses: actions/setup-python@v5
21+
id: setup-python
22+
with:
23+
python-version: "3.8"
24+
#----------------------------------------------
25+
# ----- install & configure poetry -----
26+
#----------------------------------------------
27+
- name: install poetry
28+
uses: snok/install-poetry@v1
29+
with:
30+
virtualenvs-create: true
31+
virtualenvs-in-project: true
32+
virtualenvs-path: .venv
33+
installer-parallel: true
34+
#---------------------------------------------------
35+
# ----- load cached venv if cache exists -----
36+
#---------------------------------------------------
37+
- name: load cached venv
38+
id: cached-poetry-dependencies
39+
uses: actions/cache@v4
40+
with:
41+
path: .venv
42+
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
43+
#---------------------------------------------------------------
44+
# ----- install dependencies if cache does not exist -----
45+
#---------------------------------------------------------------
46+
- name: install dependencies
47+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
48+
run: poetry install --no-interaction --no-root
49+
#-----------------------------------------------------------
50+
# ----- install your root project, if required -----
51+
#-----------------------------------------------------------
52+
- name: install project
53+
run: poetry install --no-interaction
54+
#------------------------------
55+
# ----- publish to pypi -----
56+
#------------------------------
57+
- name: build & publish
58+
run: |
59+
poetry publish --build --username __token__ --password=${{ secrets.PYPI_TOKEN }}

.github/workflows/run-tests.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# This workflow will test the python package against Sideko's Mock Servers
2+
# Tests will run automatically on a push to `main` or a pull request event
3+
4+
name: Run Pytest
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
pull_request: {}
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
steps:
16+
#----------------------------------------------
17+
# ----- checkout & setup python -----
18+
#----------------------------------------------
19+
- name: checkout repository
20+
uses: actions/checkout@v4
21+
- name: setup python
22+
uses: actions/setup-python@v5
23+
id: setup-python
24+
with:
25+
python-version: "3.8"
26+
#----------------------------------------------
27+
# ----- install & configure poetry -----
28+
#----------------------------------------------
29+
- name: install poetry
30+
uses: snok/install-poetry@v1
31+
with:
32+
version: 1.8.5
33+
virtualenvs-create: true
34+
virtualenvs-in-project: true
35+
virtualenvs-path: .venv
36+
installer-parallel: true
37+
#---------------------------------------------------
38+
# ----- load cached venv if cache exists -----
39+
#---------------------------------------------------
40+
- name: load cached venv
41+
id: cached-poetry-dependencies
42+
uses: actions/cache@v4
43+
with:
44+
path: .venv
45+
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
46+
#---------------------------------------------------------------
47+
# ----- install dependencies if cache does not exist -----
48+
#---------------------------------------------------------------
49+
- name: install dependencies
50+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
51+
run: poetry install --no-interaction --no-root
52+
#-----------------------------------------------------------
53+
# ----- install your root project, if required -----
54+
#-----------------------------------------------------------
55+
- name: install project
56+
run: poetry install --no-interaction
57+
#------------------------------
58+
# ----- run pytest -----
59+
#------------------------------
60+
- name: run pytest
61+
run: |
62+
source .venv/bin/activate
63+
pytest -s
64+
#------------------------------
65+
# ----- run mypy -----
66+
#------------------------------
67+
- name: run mypy
68+
run: |
69+
source .venv/bin/activate
70+
mypy $(poetry version | cut -d' ' -f1)

.gitignore

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
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+
develop-eggs/
12+
.eggs/
13+
share/python-wheels/
14+
*.egg-info/
15+
.installed.cfg
16+
*.egg
17+
18+
# PyInstaller
19+
# Usually these files are written by a python script from a template
20+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
21+
*.manifest
22+
*.spec
23+
24+
# Installer logs
25+
pip-log.txt
26+
pip-delete-this-directory.txt
27+
28+
# Unit test / coverage reports
29+
htmlcov/
30+
.tox/
31+
.nox/
32+
.coverage
33+
.coverage.*
34+
.cache
35+
nosetests.xml
36+
coverage.xml
37+
*.cover
38+
*.py,cover
39+
.hypothesis/
40+
.pytest_cache/
41+
42+
# Translations
43+
*.mo
44+
*.pot
45+
46+
# Sphinx documentation
47+
docs/_build/
48+
49+
# PyBuilder
50+
.pybuilder/
51+
52+
# Jupyter Notebook
53+
.ipynb_checkpoints
54+
55+
# IPython
56+
ipython_config.py
57+
58+
# pyenv
59+
# For a library or package, you might want to ignore these files since the code is
60+
# intended to run in multiple environments; otherwise, check them in:
61+
# .python-version
62+
63+
# pipenv
64+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
65+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
66+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
67+
# install all needed dependencies.
68+
#Pipfile.lock
69+
70+
# poetry
71+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
72+
# This is especially recommended for binary packages to ensure reproducibility, and is more
73+
# commonly ignored for libraries.
74+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
75+
#poetry.lock
76+
77+
# pdm
78+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
79+
#pdm.lock
80+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
81+
# in version control.
82+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
83+
.pdm.toml
84+
.pdm-python
85+
.pdm-build/
86+
87+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
88+
__pypackages__/
89+
90+
91+
# Environments
92+
.env
93+
.venv
94+
venv/
95+
env.bak/
96+
venv.bak/
97+
98+
# mypy
99+
.mypy_cache/
100+
.dmypy.json
101+
dmypy.json
102+
103+
# Pyre type checker
104+
.pyre/
105+
106+
# pytype static type analyzer
107+
.pytype/
108+
109+
# Cython debug symbols
110+
cython_debug/
111+
112+
# PyCharm
113+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
114+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
115+
# and can be added to the global gitignore or merged into this file. For a more nuclear
116+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
117+
#.idea/

.sdk.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"id": "3c69697a-305a-4017-8e1f-e9b7f65be8a4"
3+
}

0 commit comments

Comments
 (0)