-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split namespace packages and add httpx client #1
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
715c4fe
VID-3001 add clients part of feature flags
dzakharchuk 02ac365
update readme
dzakharchuk c8e4624
rm files after rebase
dzakharchuk 5c0d1bb
disable workflow
dzakharchuk 75a516d
update hiku from rc to latest version
dzakharchuk 6c11cb0
fix optional-deps, incr project python version
dzakharchuk 6d91185
rename sources dir to
dzakharchuk 7d8d15d
add fixes to realise workflow
dzakharchuk 16b7df1
add fixes to test workflow
dzakharchuk 62e60cf
project rename in config files
dzakharchuk 1893ffa
add aiohttp,requests clients
dzakharchuk 66d8737
add pre-commit
dzakharchuk 550516b
fix old tests, mypy issues, add tests workflow
dzakharchuk 4820bbd
refactor test workflow
dzakharchuk a26af5e
refactor naming
dzakharchuk a4b75cf
update endpoints
dzakharchuk f1113d2
fix tests
dzakharchuk e4c3514
Merge pull request #2 from evo-company/add-aiohttp-and-requests-client
n4mespace bb9b7a7
update proto dep
dzakharchuk 81b0a09
fix test matrix
dzakharchuk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by the way, @kindermax, what minimun version should we support? can we start from 3.9/3.10 at least? maybe do a poll in dev channel?