Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: OCR-D/core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.0.7
Choose a base ref
...
head repository: OCR-D/core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Apr 20, 2018

  1. quickfix for opening json files in py3.5

    wrznr authored and kba committed Apr 20, 2018
    Copy the full SHA
    803f9d6 View commit details
  2. Copy the full SHA
    5ca0158 View commit details
  3. 📝 project title in README

    kba committed Apr 20, 2018
    Copy the full SHA
    0ee5cf9 View commit details

Commits on Apr 23, 2018

  1. Copy the full SHA
    01466cc View commit details
  2. Copy the full SHA
    a11f2a6 View commit details
  3. Copy the full SHA
    f801efa View commit details
  4. Copy the full SHA
    3abaf48 View commit details
  5. Copy the full SHA
    c225476 View commit details
  6. adapt tests to generated PAGE api

    kba committed Apr 23, 2018
    Copy the full SHA
    e7e2ab9 View commit details

Commits on Apr 24, 2018

  1. 🔥 drop obsolete classes

    kba committed Apr 24, 2018
    Copy the full SHA
    f5ae4b2 View commit details
  2. Copy the full SHA
    f744bd1 View commit details
  3. Copy the full SHA
    fca0078 View commit details
  4. export version as VERSION

    kba committed Apr 24, 2018
    Copy the full SHA
    358c1ea View commit details
  5. Copy the full SHA
    66b8f1b View commit details
  6. ocrd_page: PcGts from image

    kba committed Apr 24, 2018
    Copy the full SHA
    03a8c31 View commit details
  7. Copy the full SHA
    d35559b View commit details
  8. tests: use assets.path_to

    kba committed Apr 24, 2018
    Copy the full SHA
    612b71a View commit details

Commits on Apr 25, 2018

  1. Copy the full SHA
    5be5e5f View commit details
  2. Copy the full SHA
    994c1c3 View commit details
  3. test coordinate translation code

    kba committed Apr 25, 2018
    Copy the full SHA
    8d1dbef View commit details
  4. Copy the full SHA
    1a31a8f View commit details
  5. Copy the full SHA
    dcaf580 View commit details
  6. Copy the full SHA
    0a108a3 View commit details

Commits on Apr 26, 2018

  1. Merge pull request #70 from kba/test-points-xywh

    fix/test utility coordination translation functions
    kba authored Apr 26, 2018
    Copy the full SHA
    79bae4e View commit details
  2. Merge pull request #69 from kba/xsd-generateds

    Generate PAGE API from XSD
    kba authored Apr 26, 2018
    Copy the full SHA
    9b914f6 View commit details
  3. 📦 v0.1.0

    kba committed Apr 26, 2018
    Copy the full SHA
    bb1906c View commit details
  4. README: shields

    kba committed Apr 26, 2018
    Copy the full SHA
    5d2f94b View commit details

Commits on Apr 27, 2018

  1. Copy the full SHA
    b963cdc View commit details
  2. regenerate from page 2018

    kba committed Apr 27, 2018
    Copy the full SHA
    97fcc46 View commit details
  3. Copy the full SHA
    8bbec99 View commit details
  4. Copy the full SHA
    9abcc7b View commit details
  5. test alternative image

    kba committed Apr 27, 2018
    Copy the full SHA
    9caf495 View commit details
  6. 📝

    kba committed Apr 27, 2018
    Copy the full SHA
    5062f71 View commit details
  7. Copy the full SHA
    ff42029 View commit details
  8. cli: ocrd workspace add

    kba committed Apr 27, 2018
    Copy the full SHA
    4a19485 View commit details
  9. Copy the full SHA
    0ce900f View commit details

Commits on Apr 28, 2018

  1. Copy the full SHA
    8ea7f3f View commit details
  2. Copy the full SHA
    51ab8df View commit details
  3. cli: ocrd workspace unpack

    kba committed Apr 28, 2018
    Copy the full SHA
    a92f9b3 View commit details
  4. Copy the full SHA
    5508027 View commit details

Commits on May 2, 2018

  1. Copy the full SHA
    1d7c3bf View commit details

Commits on May 8, 2018

  1. Merge branch 'page-altimg'

    kba committed May 8, 2018
    Copy the full SHA
    12878e9 View commit details
  2. v0.2.0: Use 2018 PAGE NS

    kba committed May 8, 2018
    Copy the full SHA
    1a21dcf View commit details
  3. Copy the full SHA
    cfca6de View commit details
  4. Copy the full SHA
    a733e80 View commit details
  5. Merge pull request #75 from kba/refactor-cli

    Refactor CLI
    kba authored May 8, 2018
    Copy the full SHA
    33f7c80 View commit details
  6. v0.2.1

    kba committed May 8, 2018
    Copy the full SHA
    fbed50f View commit details
  7. 📝 update docs

    kba committed May 8, 2018
    Copy the full SHA
    522fa2b View commit details
  8. Copy the full SHA
    add9cd2 View commit details
  9. Copy the full SHA
    ec54773 View commit details
Showing 438 changed files with 52,111 additions and 3,183 deletions.
113 changes: 113 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
version: 2.1

orbs:
python: circleci/python@2.0.3

jobs:

test-macos:
macos:
xcode: "12.5.1"
# resource_class: macos.x86.medium.gen2
working_directory: ~/ocrd-core
environment:
PIP: pip3
PYTHON: python3
PIP_INSTALL: pip3 install --user
steps:
- checkout
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew install imagemagick geos bash opencv
- run: $PIP_INSTALL -U pip setuptools
- run: make install
- run: export PATH="/Users/distiller/Library/Python/3.9/bin:$PATH"; make deps-test test benchmark

test-python38:
docker:
- image: cimg/python:3.8
working_directory: ~/ocrd-core
steps:
- checkout
- run: sudo apt-get -y update
- run: sudo make deps-ubuntu
- run: make install deps-test
- run: make test benchmark
# smoke test to ensure that --editable install works
- run: make install-dev; ocrd --version

test-python39:
docker:
- image: cimg/python:3.9
working_directory: ~/ocrd-core
steps:
- checkout
- run: sudo apt-get -y update
- run: sudo make deps-ubuntu
- run: make install deps-test
- run: make test benchmark
# smoke test to ensure that --editable install works
- run: make install-dev; ocrd --version

test-python310:
docker:
- image: cimg/python:3.10
working_directory: ~/ocrd-core
steps:
- checkout
- run: sudo apt-get -y update
- run: sudo make deps-ubuntu
- run: make install deps-test
- run: make test benchmark
# smoke test to ensure that --editable install works
- run: make install-dev; ocrd --version

test-python311:
docker:
- image: cimg/python:3.11
working_directory: ~/ocrd-core
steps:
- checkout
- run: sudo apt-get -y update
- run: sudo make deps-ubuntu
- run: make install deps-test
- run: make test benchmark
# smoke test to ensure that --editable install works
- run: make install-dev; ocrd --version

deploy:
docker:
- image: circleci/buildpack-deps:stretch
parameters:
docker-variant:
type: string
steps:
- checkout
- setup_remote_docker: # https://circleci.com/docs/2.0/building-docker-images/
docker_layer_caching: true
- run: make docker<< parameters.docker-variant >>
- run:
name: Login to Docker Hub
command: echo "$DOCKERHUB_PASS" | docker login --username "$DOCKERHUB_USERNAME" --password-stdin
- run: docker push ocrd/core<< parameters.docker-variant >>:latest
- run: docker tag ocrd/core<< parameters.docker-variant >> ocrd/core<< parameters.docker-variant >>:$(git describe --tags --abbrev=0)
- run: docker push ocrd/core<< parameters.docker-variant >>:$(git describe --tags --abbrev=0)

workflows:
version: 2
build-master:
jobs:
- deploy:
matrix:
parameters:
docker-variant: ['', '-cuda', '-cuda-tf1', '-cuda-tf2', '-cuda-torch']
filters:
branches:
only: master
tags:
only: /^v\d\.\d\d\.\d$/
test-pull-request:
jobs:
- test-python38
- test-python39
- test-python310
- test-python311
# - test-macos
24 changes: 24 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[run]
branch = True
source =
ocrd_utils
ocrd_models
ocrd_validators
ocrd_modelfactory
ocrd


[report]
exclude_lines =
if self.debug:
pragma: no cover
raise NotImplementedError
if __name__ == .__main__.:
ignore_errors = True
omit =
ocrd_models/ocrd_models/ocrd_page_generateds.py
ocrd_models/ocrd_page_user_methods.py
*/setup.py
# ocrd/ocrd/decorators.py
ocrd/ocrd/task_sequence.py
tests/*
13 changes: 9 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
*
!ocrd
!Makefile
!setup.py
!src*
!pyproject.toml
!requirements.txt
!Makefile
!VERSION
!LICENSE
!README.rst
!README.md
!.git
!tests
!requirements_test.txt
!.gitmodules
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export PYLINTRC=$PWD/.pylintrc
58 changes: 58 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Docker Image CI

on:
push:
branches: [ "master" ]
workflow_dispatch: # run manually

env:
# FIXME: linux/arm/v7 disabled as long as scikit-build/cmake-python-distributions#503 is unresolved
# PLATFORMS: linux/amd64,linux/arm/v7,linux/arm64/v8,linux/ppc64le
PLATFORMS: linux/amd64,linux/arm64/v8,linux/ppc64le

jobs:

build:

runs-on: ubuntu-latest
permissions:
packages: write
contents: read
env:
DOCKER_BASE_TAG: ghcr.io/ocr-d docker.io/ocrd
# TODO(kba): make the interpolation work correctly
# DOCKER_BUILD: docker buildx build --progress=plain --platform ${{ env.PLATFORMS }} --push
# TODO(kba): Investigate why ppc64le build hangs on "Installing build dependencies"
# TODO(kba): Investigate why arm64 fails with .buildkit_qemu_emulator: /usr/local/bin/conda: Invalid ELF image for this architecture
DOCKER_BUILD: docker buildx build --progress=plain --platform linux/amd64 --push
steps:
- name: Export variables
run: |
echo "DOCKER_BASE_TAG=${{ env.DOCKER_BASE_TAG }}" >> $GITHUB_ENV
echo "DOCKER_BUILD=${{ env.DOCKER_BUILD }}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
with:
# we need tags for docker version tagging
fetch-tags: true
fetch-depth: 0
- # Activate cache export feature to reduce build time of images
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERIO_USERNAME }}
password: ${{ secrets.DOCKERIO_PASSWORD }}
- name: Build the Docker image
run: make docker
- name: Build the Docker image with GPU support
run: make docker-cuda
- name: Build the Docker images with GPU support and ML frameworks
run: make docker-cuda-tf1 docker-cuda-tf2 docker-cuda-torch
61 changes: 61 additions & 0 deletions .github/workflows/network-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: ocrd network module and integration tests

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch: # run manually

jobs:
build:

runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
os:
- ubuntu-22.04
# - macos-latest

steps:
- uses: actions/checkout@v4
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
if [[ "${{ matrix.os }}" == "ubuntu"* ]];then
sudo apt-get -y update
sudo make deps-ubuntu
else
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 \
HOMEBREW_NO_AUTO_UPDATE=1 \
brew install imagemagick geos bash # opencv
fi
make install deps-test
- name: Install Docker on macOS
if: runner.os == 'macos'
run: |
brew install docker docker-compose
colima start
- name: Run network modules tests with pytest
run: make network-module-test
- name: Run network integration tests with pytest
run: |
if [[ "${{ matrix.os }}" == "macos"* ]];then
make network-integration-test-cicd DOCKER_COMPOSE=docker-compose
else
make network-integration-test-cicd
fi
31 changes: 31 additions & 0 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
release:
types: [published]
workflow_dispatch:

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel build twine
pip install -r requirements.txt
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: make pypi
67 changes: 67 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Test core installation and run tests

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
os:
- ubuntu-22.04
- ubuntu-20.04
- macos-latest

steps:
- uses: actions/checkout@v4
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
if [[ "${{ matrix.os }}" == "ubuntu"* ]];then
sudo apt-get -y update
sudo make deps-ubuntu
else
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 \
HOMEBREW_NO_AUTO_UPDATE=1 \
brew install imagemagick geos bash # opencv
fi
make install deps-test
- name: Test with pytest
run: |
mkdir -p test-results
make test benchmark PYTEST_ARGS=--junitxml=test-results/test.xml
- uses: test-summary/action@v2
with:
paths: "test-results/test.xml"
- name: test to ensure that --editable install works
run: |
make install-dev; ocrd --version
- name: Lint with flake8
run: |
python -m pip install flake8 flake8-github
# stop the build if there are Python syntax errors or undefined names
flake8 src --count --exit-zero --select=E9,F63,F7,F82 --show-source --statistics --format=github
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 src --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --format=github
Loading