Skip to content

Commit 34e5bc1

Browse files
feat: initial project setup
0 parents  commit 34e5bc1

File tree

18 files changed

+1386
-0
lines changed

18 files changed

+1386
-0
lines changed

.github/ci.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -e ".[dev]"
28+
29+
- name: Lint with flake8
30+
run: |
31+
flake8 src/ tests/ --count --select=E9,F63,F7,F82 --show-source --statistics
32+
flake8 src/ tests/ --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics
33+
34+
- name: Check code formatting with black
35+
run: |
36+
black --check src/ tests/
37+
38+
- name: Check import sorting with isort
39+
run: |
40+
isort --check-only src/ tests/
41+
42+
- name: Type check with mypy
43+
run: |
44+
mypy src/
45+
46+
- name: Test with pytest
47+
run: |
48+
pytest tests/ --cov=src/my_api_sdk --cov-report=xml
49+
50+
- name: Upload coverage to Codecov
51+
uses: codecov/codecov-action@v3
52+
with:
53+
file: ./coverage.xml
54+
fail_ci_if_error: true
55+
56+
build:
57+
runs-on: ubuntu-latest
58+
needs: test
59+
60+
steps:
61+
- uses: actions/checkout@v4
62+
63+
- name: Set up Python
64+
uses: actions/setup-python@v4
65+
with:
66+
python-version: "3.11"
67+
68+
- name: Install build dependencies
69+
run: |
70+
python -m pip install --upgrade pip
71+
pip install build
72+
73+
- name: Build package
74+
run: |
75+
python -m build
76+
77+
- name: Check package
78+
run: |
79+
pip install twine
80+
twine check dist/*

.gitignore

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
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+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.nox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*.cover
47+
*.py,cover
48+
.hypothesis/
49+
.pytest_cache/
50+
cover/
51+
52+
# Translations
53+
*.mo
54+
*.pot
55+
56+
# Django stuff:
57+
*.log
58+
local_settings.py
59+
db.sqlite3
60+
db.sqlite3-journal
61+
62+
# Flask stuff:
63+
instance/
64+
.webassets-cache
65+
66+
# Scrapy stuff:
67+
.scrapy
68+
69+
# Sphinx documentation
70+
docs/_build/
71+
72+
# PyBuilder
73+
.pybuilder/
74+
target/
75+
76+
# Jupyter Notebook
77+
.ipynb_checkpoints
78+
79+
# IPython
80+
profile_default/
81+
ipython_config.py
82+
83+
# pyenv
84+
.python-version
85+
86+
# pipenv
87+
Pipfile.lock
88+
89+
# poetry
90+
poetry.lock
91+
92+
# pdm
93+
.pdm.toml
94+
95+
# PEP 582
96+
__pypackages__/
97+
98+
# Celery stuff
99+
celerybeat-schedule
100+
celerybeat.pid
101+
102+
# SageMath parsed files
103+
*.sage.py
104+
105+
# Environments
106+
.env
107+
.venv
108+
env/
109+
venv/
110+
ENV/
111+
env.bak/
112+
venv.bak/
113+
114+
# Spyder project settings
115+
.spyderproject
116+
.spyproject
117+
118+
# Rope project settings
119+
.ropeproject
120+
121+
# mkdocs documentation
122+
/site
123+
124+
# mypy
125+
.mypy_cache/
126+
.dmypy.json
127+
dmypy.json
128+
129+
# Pyre type checker
130+
.pyre/
131+
132+
# pytype static type analyzer
133+
.pytype/
134+
135+
# Cython debug symbols
136+
cython_debug/
137+
138+
# IDE
139+
.vscode/
140+
.idea/
141+
*.swp
142+
*.swo
143+
*~
144+
145+
# OS
146+
.DS_Store
147+
.DS_Store?
148+
._*
149+
.Spotlight-V100
150+
.Trashes
151+
ehthumbs.db
152+
Thumbs.db

0 commit comments

Comments
 (0)