Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,27 @@ jobs:
- name: Compile helpers
run: npm run build

pypi:
runs-on: ubuntu-latest

defaults:
run:
shell: bash
working-directory: build/python

steps:
- uses: actions/checkout@v6
- name: Set up uv
uses: astral-sh/setup-uv@v8.1.0
with:
working-directory: 'build/python'
version-file: '.tool-versions'
enable-cache: false
- name: Install dependencies
run: uv sync
- name: Generate python
run: uv run scripts/generate.py
- name: Run tests
run: uv run pytest
- name: Build distribution
run: uv build
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,35 @@ jobs:
run: npm version ${{ github.ref_name }} --git-tag-version=false
- name: Publish package
run: npm publish

pypi:
runs-on: ubuntu-latest

environment: packages

permissions:
id-token: write

defaults:
run:
shell: bash
working-directory: build/python

steps:
- uses: actions/checkout@v6
- name: Set up uv
uses: astral-sh/setup-uv@v8.1.0
with:
working-directory: 'build/python'
version-file: '.tool-versions'
enable-cache: false
- name: Install dependencies
run: uv sync
- name: Set version
run: uv version ${{ github.ref_name }}
- name: Generate python
run: uv run scripts/generate.py
- name: Build distribution
run: uv build
- name: Publish package
run: uv publish
141 changes: 141 additions & 0 deletions build/python/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# 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/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
*.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/

# 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
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
Pipfile.lock

# PEP 582
__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/

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# uv
.venv/

# generated protobuf
src/tucana/generated/*/*.py
!src/tucana/generated/*/__init__.py
1 change: 1 addition & 0 deletions build/python/.tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uv 0.11.14
1 change: 1 addition & 0 deletions build/python/README.md
59 changes: 59 additions & 0 deletions build/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "tucana"
version = "0.0.0"
description = "Code0 GRPC Protocol"
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
authors = [
{ name = "Niklas van Schrick", email = "mc.taucher2003@gmail.com" }
]
keywords = ["grpc", "protobuf", "code0"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"protobuf>=5.0",
"grpcio>=1.64"
]

[project.optional-dependencies]
dev = [
"grpcio-tools>=1.64",
"pytest>=7.0",
"pytest-cov>=4.0",
]

[project.urls]
Homepage = "https://github.com/code0-tech/tucana"
Repository = "https://github.com/code0-tech/tucana"
Issues = "https://github.com/code0-tech/tucana/issues"
Changelog = "https://github.com/code0-tech/tucana/releases"

[tool.setuptools]
package-dir = {"" = "src"}

[tool.setuptools.packages.find]
where = ["src"]

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = "test_*.py"

[tool.uv]
managed = true
dev-dependencies = [
"grpcio-tools>=1.64",
"pytest>=7.0",
"pytest-cov>=4.0",
]

Loading