Skip to content

Commit 95cfc93

Browse files
authored
Merge pull request #101 from leynier/add-support-for-synchronous-rpc-calls
feat: use directly sync postgrest client and remove unused code
2 parents e5b18d1 + 9f7237d commit 95cfc93

25 files changed

+1673
-250
lines changed

.coveragerc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[run]
2+
omit =
3+
docs/*
4+
examples/*
5+
tests/*

.devcontainer/Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.203.0/containers/python-3/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster
4+
ARG VARIANT="3.10-bullseye"
5+
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
6+
7+
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
8+
ARG NODE_VERSION="none"
9+
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
10+
11+
# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
12+
# COPY requirements.txt /tmp/pip-tmp/
13+
# RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
14+
# && rm -rf /tmp/pip-tmp
15+
16+
# [Optional] Uncomment this section to install additional OS packages.
17+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
18+
# && apt-get -y install --no-install-recommends <your-package-list-here>
19+
20+
# [Optional] Uncomment this line to install global node packages.
21+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

.devcontainer/devcontainer.json

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.203.0/containers/python-3
3+
{
4+
"name": "Python 3",
5+
"runArgs": [
6+
"--init"
7+
],
8+
"build": {
9+
"dockerfile": "Dockerfile",
10+
"context": "..",
11+
"args": {
12+
// Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6
13+
// Append -bullseye or -buster to pin to an OS version.
14+
// Use -bullseye variants on local on arm64/Apple Silicon.
15+
"VARIANT": "3.10-bullseye",
16+
// Options
17+
"NODE_VERSION": "lts/*"
18+
}
19+
},
20+
// Set *default* container specific settings.json values on container create.
21+
"settings": {
22+
"python.pythonPath": "/usr/local/bin/python",
23+
"python.languageServer": "Pylance",
24+
"python.linting.enabled": true,
25+
"python.linting.flake8Enabled": true,
26+
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
27+
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
28+
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
29+
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
30+
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
31+
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
32+
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
33+
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
34+
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint",
35+
"python.analysis.diagnosticMode": "workspace",
36+
"files.exclude": {
37+
"**/.ipynb_checkpoints": true,
38+
"**/.pytest_cache": true,
39+
"**/*pycache*": true
40+
},
41+
"python.formatting.provider": "black",
42+
"python.linting.flake8Args": [
43+
"--max-line-length=88",
44+
"--extend-ignore=E203"
45+
],
46+
"editor.formatOnSave": true,
47+
"editor.codeActionsOnSave": {
48+
"source.organizeImports": true
49+
},
50+
"python.sortImports.args": [
51+
"--multi-line=3",
52+
"--trailing-comma",
53+
"--force-grid-wrap=0",
54+
"--use-parentheses",
55+
"--line-width=88",
56+
]
57+
},
58+
// Add the IDs of extensions you want installed when the container is created.
59+
"extensions": [
60+
"ms-python.python",
61+
"ms-python.vscode-pylance",
62+
"ms-azuretools.vscode-docker",
63+
"donjayamanne.githistory",
64+
"felipecaputo.git-project-manager",
65+
"github.copilot-nightly",
66+
"eamodio.gitlens",
67+
"davidanson.vscode-markdownlint"
68+
],
69+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
70+
// "forwardPorts": [],
71+
// Use 'postCreateCommand' to run commands after the container is created.
72+
// "postCreateCommand": "pip3 install --user -r requirements.txt",
73+
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
74+
"remoteUser": "vscode",
75+
"features": {
76+
"docker-in-docker": "latest",
77+
"git": "latest",
78+
"git-lfs": "latest",
79+
"github-cli": "latest"
80+
}
81+
}

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
target-branch: "develop"

.github/workflows/ci-python.yml

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

.github/workflows/ci.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: CI/CD
2+
3+
on: [pull_request, push, workflow_dispatch]
4+
5+
jobs:
6+
test:
7+
name: Test / OS ${{ matrix.os }} / Python ${{ matrix.python-version }}
8+
strategy:
9+
max-parallel: 1
10+
matrix:
11+
os: [ubuntu-latest]
12+
python-version: [3.7, 3.8, 3.9, '3.10']
13+
runs-on: ${{ matrix.os }}
14+
steps:
15+
- name: Clone Repository
16+
uses: actions/checkout@v2
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Set up Poetry
22+
uses: abatilo/[email protected]
23+
with:
24+
poetry-version: 1.1.11
25+
- name: Run Tests
26+
run: make run_tests
27+
- name: Upload Coverage
28+
uses: codecov/codecov-action@v1
29+
30+
publish:
31+
needs: test
32+
if: ${{ !startsWith(github.event.head_commit.message, 'bump:') && github.ref == 'refs/heads/main' && github.event_name == 'push' }}
33+
runs-on: ubuntu-latest
34+
name: "Bump version, create changelog and publish"
35+
steps:
36+
- name: Clone Repository
37+
uses: actions/checkout@v2
38+
with:
39+
fetch-depth: 0
40+
- name: Create bump and changelog
41+
uses: commitizen-tools/commitizen-action@master
42+
with:
43+
github_token: ${{ secrets.GITHUB_TOKEN }}
44+
branch: main
45+
changelog_increment_filename: body.md
46+
- name: Release
47+
uses: softprops/action-gh-release@v1
48+
with:
49+
body_path: body.md
50+
tag_name: ${{ env.REVISION }}
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
- name: Set up Python 3.9
54+
uses: actions/setup-python@v2
55+
with:
56+
python-version: 3.9
57+
- name: Set up Poetry
58+
uses: abatilo/[email protected]
59+
with:
60+
poetry-version: 1.1.11
61+
# - name: Publish
62+
# env:
63+
# PYPI_USERNAME: __token__
64+
# PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }}
65+
# run: |
66+
# poetry install
67+
# poetry publish --build -u $PYPI_USERNAME -p $PYPI_PASSWORD

.github/workflows/pre-commit_hooks.yaml

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

0 commit comments

Comments
 (0)