Skip to content

docs: Add info about custom serializer and types; contributing guide #115

docs: Add info about custom serializer and types; contributing guide

docs: Add info about custom serializer and types; contributing guide #115

Workflow file for this run

name: Tests
on:
push:
branches: [ trunk ]
pull_request:
branches: [ trunk ]
defaults:
run:
shell: bash
jobs:
unit_tests:
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup the Python Environment ${{ matrix.python-version }}
uses: Qwerty-133/python-setup@v1
with:
python-version: ${{ matrix.python-version }}
skip-pre-commit: true
- name: Install dependencies
run: |
poetry install --all-extras --with dev
- name: Run tests
run: |
poetry run pytest .
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
mypy:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@v3
- name: Setup the Python Environment ${{ matrix.python-version }}
uses: Qwerty-133/python-setup@v1
with:
python-version: ${{ matrix.python-version }}
skip-pre-commit: true
- name: Install dependencies
run: |
poetry install --all-extras --with dev,typecheck
- name: Validate type-hints with MyPy
run: |
poetry run mypy --ignore-missing-imports \
--follow-imports=skip \
--strict-optional \
-p pydantic_numpy
pyright:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@v3
- name: Setup the Python Environment ${{ matrix.python-version }}
uses: Qwerty-133/python-setup@v1
with:
python-version: ${{ matrix.python-version }}
skip-pre-commit: true
- name: Install dependencies
run: |
poetry install --all-extras --with dev,typecheck
- name: Validate type-hints with pyright
run: |
poetry run pyright pydantic_numpy
format:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.12" ]
steps:
- uses: actions/checkout@v3
- name: Setup the Python Environment ${{ matrix.python-version }}
uses: Qwerty-133/python-setup@v1
with:
python-version: ${{ matrix.python-version }}
skip-pre-commit: true
- name: Install dependencies
run: |
poetry install --all-extras --with format
- name: Check code formatting
run: |
poetry run black . --check --diff
poetry run isort . --check --diff
poetry run ruff check .