Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdittrich92 committed May 9, 2024
1 parent 44869b4 commit 93de706
Show file tree
Hide file tree
Showing 49 changed files with 653 additions and 4,944 deletions.
50 changes: 50 additions & 0 deletions .conda/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{% set pyproject = load_file_data('../pyproject.toml', from_recipe_dir=True) %}
{% set project = pyproject.get('project') %}
{% set urls = pyproject.get('project', {}).get('urls') %}
{% set version = environ.get('BUILD_VERSION', '0.1.0a0') %}

package:
name: {{ project.get('name') }}
version: {{ version }}

source:
fn: {{ project.get('name') }}-{{ version }}.tar.gz
url: ../dist/{{ project.get('name') }}-{{ version }}.tar.gz

build:
script: python setup.py install --single-version-externally-managed --record=record.txt

requirements:
host:
- python>=3.9, <3.12
- setuptools

run:
- numpy >=1.16.0, <2.0.0
- onnxruntime >=1.17.0, <2.0.0
- scipy >=1.4.0, <2.0.0
- pillow >=9.2.0
- opencv >=4.5.0, <5.0.0
- pypdfium2-team::pypdfium2_helpers >=4.0.0, <5.0.0
- pyclipper >=1.2.0, <2.0.0
- shapely >=1.6.0, <3.0.0
- langdetect >=1.0.9, <2.0.0
- rapidfuzz >=3.0.0, <4.0.0
- defusedxml >=0.7.0
- anyascii >=0.3.2
- tqdm >=4.30.0

test:
requires:
- pip

imports:
- onnxtr

about:
home: {{ urls.get('repository') }}
license: Apache-2.0
license_file: {{ project.get('license', {}).get('file') }}
summary: {{ project.get('description') | replace(":", " -")}}
doc_url: {{ urls.get('documentation') }}
dev_url: {{ urls.get('repository') }}
25 changes: 4 additions & 21 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,24 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
python: ["3.9", "3.10"]
framework: [tensorflow, pytorch]
steps:
- uses: actions/checkout@v4
- if: matrix.os == 'macos-latest'
name: Install MacOS prerequisites
run: brew install cairo pango gdk-pixbuf libffi
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: x64
- if: matrix.framework == 'tensorflow'
name: Cache python modules (TF)
- name: Cache python modules
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}
- if: matrix.framework == 'pytorch'
name: Cache python modules (PT)
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}
- if: matrix.framework == 'tensorflow'
name: Install package (TF)
run: |
python -m pip install --upgrade pip
pip install -e .[tf,viz,html] --upgrade
- if: matrix.framework == 'pytorch'
name: Install package (PT)
- name: Install package
run: |
python -m pip install --upgrade pip
pip install -e .[torch,viz,html] --upgrade
pip install -e .[viz] --upgrade
- name: Import package
run: python -c "import onnxtr; print(onnxtr.__version__)"

Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/doc-status.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/docker.yml

This file was deleted.

51 changes: 0 additions & 51 deletions .github/workflows/docs.yml

This file was deleted.

73 changes: 2 additions & 71 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[tf,viz,html] --upgrade
pip install -e .[testing]
pip install -e .[viz,html,testing] --upgrade
- name: Run unittests
run: |
coverage run -m pytest tests/common/ -rs
Expand All @@ -40,77 +39,9 @@ jobs:
path: ./coverage-common.xml
if-no-files-found: error

pytest-tf:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python: ["3.9"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: x64
- name: Cache python modules
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}-tests
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[tf,viz,html] --upgrade
pip install -e .[testing]
- name: Run unittests
run: |
coverage run -m pytest tests/tensorflow/ -rs
coverage xml -o coverage-tf.xml
- uses: actions/upload-artifact@v4
with:
name: coverage-tf
path: ./coverage-tf.xml
if-no-files-found: error

pytest-torch:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python: ["3.9"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: x64
- name: Cache python modules
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pkg-deps-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}-tests
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[torch,viz,html] --upgrade
pip install -e .[testing]
- name: Run unittests
run: |
coverage run -m pytest tests/pytorch/ -rs
coverage xml -o coverage-pt.xml
- uses: actions/upload-artifact@v4
with:
name: coverage-pytorch
path: ./coverage-pt.xml
if-no-files-found: error

codecov-upload:
runs-on: ubuntu-latest
needs: [ pytest-common, pytest-tf, pytest-torch ]
needs: [ pytest-common ]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
Expand Down
86 changes: 0 additions & 86 deletions .github/workflows/public_docker_images.yml

This file was deleted.

Loading

0 comments on commit 93de706

Please sign in to comment.