Skip to content

Commit

Permalink
Merge pull request #20 from jhnnsrs/graphql-ws
Browse files Browse the repository at this point in the history
GraphQL-WS Subprotocol Support
Ruffed Up
Mypyd
And Blacked
  • Loading branch information
jhnnsrs committed Dec 10, 2023
2 parents cf60e6a + 22221d5 commit 9dc0723
Show file tree
Hide file tree
Showing 95 changed files with 5,310 additions and 2,010 deletions.
43 changes: 23 additions & 20 deletions .github/workflows/docker-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,80 +11,83 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
poetry-version: [1.2]
python-version: [3.8, 3.9, "3.10", "3.11"]
poetry-version: [1.4]
os: [macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: tlambert03/setup-qt-libs@v1
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Run Poetry Install
run: poetry install
- name: Install Qt because Qt sucks with Poetry
run: poetry run pip install pyqt5
- name: Run Tests
run: poetry run pytest --cov --cov-report=xml -k "not integration"
linux_unit:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
poetry-version: [1.2]
python-version: [3.8, 3.9, "3.10", "3.11"]
poetry-version: [1.4]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
DISPLAY: ':99.0'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
env:
DISPLAY: ":99.0"
- name: setup ${{ matrix.os }}
run: |
sudo apt install -y xvfb x11-utils libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 xdotool
sudo apt install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Run Poetry Install
run: poetry install
- name: Install Qt because Qt sucks with Poetry
run: poetry run pip install pyqt5
- name: Run Tests
env:
QT_DEBUG_PLUGINS: 1
DISPLAY: ":99.0"
run: poetry run pytest --cov --cov-report=xml -k "not integration"
linux_integration:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
poetry-version: [1.2]
python-version: [3.8, 3.9, "3.10", "3.11"]
poetry-version: [1.4]
os: [ubuntu-latest]
env:
DISPLAY: ':99.0'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
env:
DISPLAY: ":99.0"
- name: setup ${{ matrix.os }}
run: |
sudo apt install -y xvfb x11-utils libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 xdotool
sudo apt install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Run Poetry Install
run: poetry install
- name: Install Qt because Qt sucks with Poetry
run: poetry run pip install pyqt5
- name: Run Tests
env:
QT_DEBUG_PLUGINS: 1
DISPLAY: ":99.0"
run: poetry run pytest --cov --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
83 changes: 83 additions & 0 deletions .github/workflows/quality.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Python Code Quality and Style Check
on:
push:
branches: [master]
paths: [rath/**, tests/**]
pull_request:
branches: [master]
paths: [rath/**, tests/**]
jobs:
ruff:
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
poetry-version: [1.4]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: tlambert03/setup-qt-libs@v1
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Run Poetry Install
run: poetry install
- name: Install Qt because Qt sucks with Poetry
run: poetry run pip install pyqt5
- name: Run Ruff
run: poetry run ruff .
mypy:
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
poetry-version: [1.4]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- uses: tlambert03/setup-qt-libs@v1
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Run Poetry Install
run: poetry install
- name: Install Qt because Qt sucks with Poetry
run: poetry run pip install pyqt5
- name: Run Mypy
run: poetry run mypy .
black:
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
poetry-version: [1.4]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: tlambert03/setup-qt-libs@v1
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Run Poetry Install
run: poetry install
- name: Install Qt because Qt sucks with Poetry
run: poetry run pip install pyqt5
- name: Run black
run: poetry run black --check .

6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,9 @@
"python.linting.pylintEnabled": true,
"python.linting.pylintArgs": ["--enable=W0614"],
"errorLens.enabledDiagnosticLevels": ["error"],
"python.linting.enabled": false
"python.linting.enabled": false,
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.formatting.provider": "none"
}
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{
"label": "Generate Docs",
"type": "shell",
"command": "source venv/bin/activate; pydoc-markdown"
"command": "pydoc-markdown"
},
{
"type": "shell",
Expand Down
Loading

0 comments on commit 9dc0723

Please sign in to comment.