Skip to content

Commit 01c2f3d

Browse files
authored
Merge pull request #92 from trubrics/feat/new_python_sdk_structure
New python SDK structure
2 parents 56eab23 + 9517654 commit 01c2f3d

Some content is hidden

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

86 files changed

+1005
-27847
lines changed

.github/workflows/checks.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Checks code quality
2+
3+
on: [push]
4+
5+
jobs:
6+
code-checks:
7+
name: Checks quality of code
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: ["3.10", "3.11"]
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
16+
- name: Install uv and setup Python version
17+
uses: astral-sh/setup-uv@v5
18+
with:
19+
version: "0.5.26"
20+
21+
- name: Set up Python
22+
run: uv python install ${{ matrix.python-version }}
23+
24+
- name: Setup uv venv
25+
run: |
26+
uv venv && source .venv/bin/activate && make install_dev_requirements
27+
28+
- name: Run pre-commit hooks
29+
uses: pre-commit/action@v3.0.1

.github/workflows/docs.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 40 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,55 @@
1-
name: Release package
1+
name: Release and Publish
22

33
on:
44
push:
55
tags:
66
- v*
77

88
jobs:
9-
build-and-publish:
10-
name: Build and publish Python dist to PyPI
9+
release:
1110
runs-on: ubuntu-latest
1211
steps:
1312
- name: Checkout code
14-
uses: actions/checkout@v2
13+
uses: actions/checkout@v3
14+
15+
- name: Install uv and setup Python version
16+
uses: astral-sh/setup-uv@v5
17+
with:
18+
version: "0.5.26"
19+
20+
- name: Set up Python
21+
run: uv python install 3.10
22+
23+
- name: Setup uv venv
24+
run: |
25+
uv venv && source .venv/bin/activate && make install_dev_requirements
26+
27+
- name: Get version from pyproject.toml
28+
id: get_version
29+
run: |
30+
echo "VERSION=$(awk -F'"' '/^version/ {print $2}' pyproject.toml)" >> $GITHUB_ENV
31+
1532
- name: Extract release notes
1633
id: extract-release-notes
1734
uses: ffurrer2/extract-release-notes@v1
18-
- name: Create github release
19-
if: startsWith(github.ref, 'refs/tags')
20-
uses: softprops/action-gh-release@v1
35+
36+
- name: Create GitHub Release
37+
uses: actions/create-release@v1
2138
with:
39+
tag_name: "v${{ env.VERSION }}"
2240
body: ${{ steps.extract-release-notes.outputs.release_notes }}
23-
files: dist/*.whl
24-
- name: Set up Python 3.9
25-
uses: actions/setup-python@v3
26-
with:
27-
python-version: "3.9"
28-
- name: Install pypa/build
29-
run: >-
30-
python -m
31-
pip install
32-
build
33-
--user
34-
- name: Build a binary wheel and a source tarball
35-
run: >-
36-
python -m
37-
build
38-
--sdist
39-
--wheel
40-
--outdir dist/
41-
.
42-
- name: Publish distribution 📦 to PyPI
43-
if: startsWith(github.ref, 'refs/tags')
44-
uses: pypa/gh-action-pypi-publish@master
45-
with:
46-
password: ${{ secrets.PYPI_API_TOKEN }}
41+
release_name: "Release ${{ env.VERSION }}"
42+
draft: false
43+
prerelease: false
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
47+
- name: Build package
48+
run: |
49+
uv build
50+
51+
- name: Publish to PyPI
52+
run: |
53+
uv publish
54+
env:
55+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/test.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.gitignore

Lines changed: 157 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,171 @@
1-
# pycache
2-
__pycache__
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
35

4-
# local builds
5-
*.egg-info
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
613
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
757

8-
# mac stuff
9-
.DS_Store
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
1063

11-
# venv
12-
venv
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
1367

14-
# notebook stuff
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
1579
.ipynb_checkpoints
1680

17-
# mypy
18-
.mypy_cache
19-
typings/
81+
# IPython
82+
profile_default/
83+
ipython_config.py
2084

21-
# my scrap folder
22-
scrap
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
2389

24-
# IDE
25-
.vscode
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
2696

27-
# docs
28-
docs/build
29-
docs/data
30-
docs/models
97+
# UV
98+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
#uv.lock
31102

32-
# tests
33-
.coverage
103+
# poetry
104+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105+
# This is especially recommended for binary packages to ensure reproducibility, and is more
106+
# commonly ignored for libraries.
107+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108+
#poetry.lock
109+
110+
# pdm
111+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112+
#pdm.lock
113+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114+
# in version control.
115+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116+
.pdm.toml
117+
.pdm-python
118+
.pdm-build/
34119

35-
# env variables
120+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121+
__pypackages__/
122+
123+
# Celery stuff
124+
celerybeat-schedule
125+
celerybeat.pid
126+
127+
# SageMath parsed files
128+
*.sage.py
129+
130+
# Environments
36131
.env
132+
.venv
133+
env/
134+
venv/
135+
ENV/
136+
env.bak/
137+
venv.bak/
138+
139+
# Spyder project settings
140+
.spyderproject
141+
.spyproject
142+
143+
# Rope project settings
144+
.ropeproject
145+
146+
# mkdocs documentation
147+
/site
148+
149+
# mypy
150+
.mypy_cache/
151+
.dmypy.json
152+
dmypy.json
153+
154+
# Pyre type checker
155+
.pyre/
156+
157+
# pytype static type analyzer
158+
.pytype/
159+
160+
# Cython debug symbols
161+
cython_debug/
162+
163+
# PyCharm
164+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166+
# and can be added to the global gitignore or merged into this file. For a more nuclear
167+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
168+
#.idea/
37169

38-
# streamlit secrets
39-
.streamlit
170+
# PyPI configuration file
171+
.pypirc

0 commit comments

Comments
 (0)