-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-empty-bbox-serialization
- Loading branch information
Showing
74 changed files
with
7,098 additions
and
6,702 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
name: Lint, test, build, and publish | ||
|
||
on: | ||
on: | ||
push: | ||
|
||
|
||
jobs: | ||
lint_and_test: | ||
|
@@ -13,9 +13,9 @@ jobs: | |
python-version: [3.8, 3.9, '3.10', '3.11'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies and kraken | ||
|
@@ -30,7 +30,7 @@ jobs: | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Run tests, except training tests | ||
run: | | ||
pytest -k 'not test_train and not test_pageseg' | ||
pytest -k 'not test_train' | ||
build-n-publish-pypi: | ||
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI | ||
|
@@ -39,11 +39,11 @@ jobs: | |
if: startsWith(github.ref, 'refs/tags/') | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
- name: Build a binary wheel and a source tarball | ||
|
@@ -68,55 +68,54 @@ jobs: | |
if: startsWith(github.ref, 'refs/tags/') | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
python-version: 3.9 | ||
miniforge-variant: Mambaforge | ||
- name: install dependencies build | ||
shell: bash -l {0} | ||
run: mamba install "conda-build>=3.20" colorama pip ruamel ruamel.yaml rich jsonschema conda-verify anaconda-client mamba | ||
# Runs the action with the following inputs or defaults if not specified. | ||
- name: install boa | ||
shell: bash -l {0} | ||
run: pip install https://github.com/mamba-org/boa/archive/refs/tags/0.14.0.zip | ||
- name: validate recipe | ||
shell: bash -l {0} | ||
id: conda_validation | ||
run: | | ||
PACKAGE_PATHS=$(conda mambabuild . --output --check -c conda-forge | tail -n 1) | ||
echo "package_paths=$PACKAGE_PATHS" >> $GITHUB_OUTPUT | ||
- name: run build | ||
shell: bash -l {0} | ||
run: conda mambabuild . -c conda-forge | ||
- name: convert packages | ||
shell: bash -l {0} | ||
run: mamba install colorama pip ruamel ruamel.yaml rich jsonschema conda-verify anaconda-client | ||
- name: Build linux-64 conda package | ||
uses: prefix-dev/[email protected] | ||
with: | ||
recipe-path: "conda/recipe.yaml" | ||
build-args: "--experimental --target-platform linux-64" | ||
- name: Build osx-64 conda package | ||
uses: prefix-dev/[email protected] | ||
with: | ||
recipe-path: "conda/recipe.yaml" | ||
build-args: "--experimental --target-platform osx-64" | ||
# - name: Build osx-arm64 conda package | ||
# uses: prefix-dev/[email protected] | ||
# with: | ||
# recipe-path: "conda/recipe.yaml" | ||
# build-args: "--experimental --target-platform osx-arm64" | ||
- name: Upload conda package | ||
run: | | ||
conda convert -p osx-arm64 -p osx-64 -o conda_convert ${{ steps.conda_validation.outputs.package_paths }} | ||
mkdir conda_convert/linux-64 | ||
cp -f ${{ steps.conda_validation.outputs.package_paths }} conda_convert/linux-64 | ||
- name: upload to anaconda | ||
shell: bash -l {0} | ||
run: anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload --no-progress --force conda_convert/*/* | ||
for pkg in $(find output -type f \( -name "*.conda" -o -name "*.tar.bz2" \) ); do | ||
echo "Uploading ${pkg}" | ||
rattler-build upload anaconda -o mittagessen -a ${{ secrets.ANACONDA_TOKEN }} "${pkg}" | ||
done | ||
- name: Upload conda artifacts to GH storage | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: conda_packages | ||
path: conda_convert/*/*.tar.bz2 | ||
path: output/*/*.conda | ||
|
||
autodraft-gh-release: | ||
name: Create github release | ||
needs: [build-n-publish-anaconda, build-n-publish-pypi] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/download-artifact@v3 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: conda_packages | ||
path: conda | ||
- uses: actions/download-artifact@v3 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: pypi_packages | ||
path: pypi | ||
|
@@ -126,33 +125,33 @@ jobs: | |
prerelease: false | ||
draft: true | ||
files: | | ||
conda/*/*.tar.bz2 | ||
output/*/*.conda | ||
pypi/* | ||
publish-gh-pages: | ||
name: Update kraken.re github pages | ||
name: Update kraken.re github pages | ||
needs: lint_and_test | ||
runs-on: ubuntu-latest | ||
if: | | ||
github.ref == 'refs/heads/main' || | ||
startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
- name: Install sphinx-multiversion | ||
run: python -m pip install sphinx-multiversion sphinx-autoapi | ||
- name: Create docs | ||
- name: Create docs | ||
run: sphinx-multiversion docs build/html | ||
- name: Create redirect | ||
run: cp docs/redirect.html build/html/index.html | ||
- name: Push gh-pages | ||
uses: crazy-max/ghaction-github-pages@v3 | ||
uses: crazy-max/ghaction-github-pages@v4 | ||
with: | ||
target_branch: gh-pages | ||
build_dir: build/html | ||
|
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
context: | ||
git_url: . | ||
git_tag: ${{ git.latest_tag(git_url) }} | ||
|
||
package: | ||
name: kraken | ||
version: ${{ git_tag }} | ||
|
||
source: | ||
git: ${{ git_url }} | ||
tag: ${{ git_tag }} | ||
|
||
build: | ||
script: pip install --no-deps . | ||
|
||
requirements: | ||
build: | ||
- python>=3.8,<3.12 | ||
- setuptools>=36.6.0,<70.0.0 | ||
- pbr | ||
host: | ||
- python>=3.8,<3.12 | ||
run: | ||
- python>=3.8,<3.12 | ||
- python-bidi | ||
- lxml | ||
- regex | ||
- requests | ||
- click>=8.1 | ||
- numpy~=1.23.0 | ||
- pillow>=9.2.0 | ||
- scipy~=1.11.0 | ||
- jinja2~=3.0 | ||
- torchvision | ||
- pytorch~=2.1.0 | ||
- cudatoolkit | ||
- jsonschema | ||
- scikit-image~=0.21.0 | ||
- scikit-learn~=1.2.1 | ||
- shapely~=1.8.5 | ||
- pyvips | ||
- coremltools | ||
- pyarrow | ||
- lightning~=2.2 | ||
- torchmetrics>=1.1.0 | ||
- conda-forge::threadpoolctl~=3.4.0 | ||
- albumentations | ||
- rich | ||
|
||
about: | ||
homepage: https://kraken.re | ||
license: Apache-2.0 | ||
summary: 'OCR/HTR engine for all the languages' | ||
repository: https://github.com/mittagessen/kraken | ||
documentation: https://kraken.re |
Oops, something went wrong.