-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from evo-company/split-namespace-packages
Split namespace packages and add httpx client
- Loading branch information
Showing
84 changed files
with
5,244 additions
and
2,066 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Ignore Python bytecode files / cache | ||
*.pyc | ||
*.pyo | ||
*.pyd | ||
.mypy_cache | ||
.pytest_cache | ||
.ruff_cache | ||
__pycache__ | ||
__pypackages__ | ||
|
||
# Ignore Python virtual environment files | ||
venv/ | ||
.venv/ | ||
.ve/ | ||
.pdm.toml | ||
.pdm-build | ||
.pdm-python | ||
|
||
# Ignore local development configuration files | ||
.git | ||
.env | ||
.flake8 | ||
mypy.ini | ||
.dockerignore | ||
.gitignore | ||
.gitlab-ci.yml | ||
.python-version | ||
README.md | ||
.hooks | ||
.lets | ||
helm | ||
.ipython | ||
.secrets | ||
|
||
# Ignore IDE settings | ||
.vscode | ||
.idea | ||
|
||
# Ignore any compiled Python extension modules | ||
*.so | ||
|
||
# Ignore any build artifacts | ||
build/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Build & publish | ||
|
||
# TODO: Setup release workflow | ||
on: | ||
push: | ||
branches: [ "**" ] | ||
tags: | ||
- "v*" | ||
# pull_request: | ||
# branches: [main] | ||
|
||
jobs: | ||
deploy-client: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/client-') | ||
strategy: | ||
matrix: | ||
python-version: [3.7] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: pdm-project/setup-pdm@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Upload package to pypi.org | ||
run: pdm publish --username ${{ secrets.PYPI_USERNAME }} --password ${{ secrets.PYPI_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: | ||
- assigned | ||
- opened | ||
- synchronize | ||
- reopened | ||
|
||
jobs: | ||
test-clients: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.9, "3.10", 3.11, 3.12] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: pdm-project/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: python -m pip install tox tox-gh-actions tox-pdm | ||
|
||
- name: Test with tox | ||
run: | | ||
tox --version | ||
tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Ignore Python bytecode files / cache | ||
*.pyc | ||
*.pyo | ||
*.pyd | ||
.mypy_cache | ||
.pytest_cache | ||
.ruff_cache | ||
__pycache__ | ||
__pypackages__ | ||
featureflags_protobuf | ||
|
||
# Ignore Python virtual environment files | ||
venv/ | ||
.venv/ | ||
.ve/ | ||
.pdm.toml | ||
.pdm-python | ||
.pdm-build | ||
|
||
# Ignore local development configuration files | ||
.env | ||
.lets | ||
.ipython | ||
.ptpython | ||
.python-version | ||
.secrets | ||
|
||
# Ignore IDE settings | ||
.vscode | ||
.idea | ||
|
||
# Ignore any compiled Python extension modules | ||
*.so | ||
|
||
# Ignore any build artifacts | ||
build/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
HAS_STAGED_PY=$(git diff --staged --diff-filter=d --name-only '*.py') | ||
|
||
if [ -n "$HAS_STAGED_PY" ]; then | ||
|
||
echo "Running mypy ..." | ||
lets mypy | ||
if [[ $? -ne 0 ]]; then | ||
exit 1 | ||
fi | ||
|
||
echo "Running black ..." | ||
lets black --diff --check | ||
if [[ $? -ne 0 ]]; then | ||
exit 1 | ||
fi | ||
|
||
echo "Running ruff ..." | ||
lets ruff-diff | ||
if [[ $? -ne 0 ]]; then | ||
exit 1 | ||
fi | ||
|
||
fi | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
FROM python:3.11-slim-bullseye as base | ||
|
||
ENV PIP_VERSION=23.2.1 | ||
ENV PDM_VERSION=2.9.1 | ||
ENV PDM_USE_VENV=no | ||
ENV PYTHONPATH=/app/__pypackages__/3.11/lib | ||
|
||
WORKDIR /app | ||
|
||
COPY ./pyproject.toml . | ||
COPY ./pdm.lock . | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
libpq-dev \ | ||
gcc \ | ||
make \ | ||
g++ \ | ||
git && \ | ||
# install tools | ||
pip install --upgrade pip==${PIP_VERSION} && \ | ||
pip install pdm==${PDM_VERSION} && \ | ||
# configure | ||
pdm config cache_dir /pdm_cache && \ | ||
pdm config check_update false && \ | ||
# install base deps \ | ||
pdm install --no-lock --prod --no-editable && \ | ||
# cleanup base layer to keep image size small | ||
apt purge --auto-remove -y \ | ||
gcc \ | ||
make \ | ||
g++ \ | ||
git && \ | ||
rm -rf /var/cache/apt && \ | ||
rm -rf /var/lib/apt/list && \ | ||
rm -rf $HOME/.cache | ||
|
||
FROM base as dev | ||
RUN pdm install --no-lock -G dev -G lint --no-editable | ||
|
||
FROM dev as examples | ||
RUN pdm install --no-lock -G examples | ||
|
||
FROM dev as test | ||
RUN pdm install --no-lock -G test | ||
|
||
FROM base as docs | ||
RUN pdm install --no-lock -G docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FeatureFlags client library for Python | ||
|
||
See ``examples`` directory for complete examples for some major Web frameworks. | ||
|
||
Overview | ||
-------- | ||
|
||
Client supports Python >=3.9. | ||
|
||
|
||
Installation | ||
------------ | ||
|
||
TODO: | ||
|
||
|
||
Development | ||
----------- | ||
|
||
Install dependencies: | ||
- ``pdm install -d`` | ||
|
||
Pre-commit | ||
|
||
``./scripts/enable-hooks.sh`` | ||
|
||
``./scripts/disable-hooks.sh`` | ||
|
||
|
||
TODO: | ||
- add docs, automate docs build | ||
- add tests | ||
- add `tracer` / `stats_collector` for http manager | ||
- rm old grpc client | ||
- add publish workflow |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.