Skip to content
Draft
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
28 changes: 28 additions & 0 deletions .github/workflows/publish-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish Python Package

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
working-directory: ./python
- name: Publish package
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: python/dist
20 changes: 20 additions & 0 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Python Tests

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ./python[dev]
- name: Test with pytest
run: |
PYTHONPATH=python pytest python/tests
7 changes: 6 additions & 1 deletion buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
version: "v2"
version: v2
managed:
enabled: true
plugins:
- remote: buf.build/protocolbuffers/python:v26.1
out: python
- remote: buf.build/grpc/python:v1.64.1
out: python
110 changes: 110 additions & 0 deletions python/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# 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/
*.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
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

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

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

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

# Spyder project settings
.spyderproject
.spyderworkspace

# Rope project settings
.ropeproject

# mkdocs documentation
/site

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

# Pyre type checker
.pyre/
20 changes: 20 additions & 0 deletions python/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Python Libraries

This directory contains Python libraries for the AEP types.

## Development

To install dependencies and run tests, use the following commands:

```bash
pip install -e .[dev]
pytest
```

## Regenerating Protobuf Files

When the source `.proto` files in the repository are updated, the generated Python files must be regenerated. To do this, run the following script from the root of the repository:

```bash
./python/regenerate.sh
```
27 changes: 27 additions & 0 deletions python/aep_types/aep/type/decimal_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions python/aep_types/aep/type/decimal_pb2_grpc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
31 changes: 31 additions & 0 deletions python/aep_types/aep/type/interval_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions python/aep_types/aep/type/interval_pb2_grpc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
28 changes: 28 additions & 0 deletions python/aep_types/aep/type/money_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions python/aep_types/aep/type/money_pb2_grpc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
38 changes: 38 additions & 0 deletions python/aep_types/aep/type/phone_number_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions python/aep_types/aep/type/phone_number_pb2_grpc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
Empty file.
Empty file.
Empty file.
37 changes: 37 additions & 0 deletions python/aep_types/aep_type/aep/type/decimal_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading