update dataclasses, add load_predictions method for loading from geojson #1648
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
--- | |
name: Units Tests | |
on: [push] | |
jobs: | |
unit-tests: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: [3.9, 3.12] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Update pip | |
run: | | |
python -m ensurepip | |
python -m pip install --upgrade pip | |
- name: Install dependencies | |
run: | | |
python -m pip install ".[dev]" | |
python -m pip install pytest-cov | |
- name: Quality Assurance | |
run: | | |
python -m flake8 ./mapreader/ --count --select=E9,F63,F7,F82, --ignore=F821 --show-source --statistics | |
python -m black --diff ./mapreader/ | |
python -m flake8 ./tests/ --count --select=E9,F63,F7,F82, --ignore=F821 --show-source --statistics | |
python -m black --diff ./tests/ | |
- name: Test with pytest | |
run: | | |
python -m pytest ./tests --ignore=tests/test_text_spotting/ | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
directory: ./coverage/reports/ | |
env_vars: OS,PYTHON | |
fail_ci_if_error: false | |
files: ./coverage.xml,!./cache | |
flags: unittests | |
name: codecov-umbrella |