Skip to content

Commit

Permalink
Merge branch 'main' into pr-8-feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
kba committed Apr 22, 2024
2 parents 3eda5f0 + 2433c57 commit 2cb0f95
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 6 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Simple CI test for ocrd_froc.

name: CI tests

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

jobs:
build:

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

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

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install and test
run: |
# Install and test.
set -x
python3 -m venv venv
source venv/bin/activate
pip install -U pip setuptools wheel
pip install -r requirements.txt
pip install .
ocrd-froc-recognize --help
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,29 @@ Versioned according to [Semantic Versioning](http://semver.org/).

## Unreleased

Fixed:

* Require OCR-D/core v2.64.1+ with proper support for `importlib{.,_}metadata`, #10
* CI: Use most recent actions, #15
* missing top-level `__init__.py`, #12

## [0.5.2] - 2024-02-01

Fixed:

- typo in ocrd-tool.json: `ocrd-froc` -> `ocrd-froc-recognize`, again

## [0.5.1] - 2024-02-01

Fixed:

- typo in ocrd-tool.json: `ocrd-froc` -> `ocrd-froc-recognize`

## [0.5.0] - 2024-01-30

- First release in ocrd_all

<!-- link-labels -->
[0.5.0]: ../../compare/HEAD...v0.5.0
[0.5.1]: ../../compare/v0.5.2...v0.5.1
[0.5.1]: ../../compare/v0.5.1...v0.5.0
[0.5.0]: ../../compare/v0.5.0...HEAD
Empty file added ocrd_froc/__init__.py
Empty file.
4 changes: 2 additions & 2 deletions ocrd_froc/ocrd-tool.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"version": "0.5.0",
"version": "0.5.2",
"git_url": "https://github.com/OCR-D/ocrd_froc",
"tools": {
"ocrd-froc": {
"ocrd-froc-recognize": {
"executable": "ocrd-froc",
"description": "Recognise font family/shape (annotating TextStyle) along with text (annotating TextEquiv)",
"categories": [
Expand Down
4 changes: 2 additions & 2 deletions ocrd_froc/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
from ocrd_modelfactory import page_from_file
from .froc import Froc

OCRD_TOOL = loads(resource_string(__name__, 'ocrd-tool.json'))
OCRD_TOOL = loads(resource_string(__package__, 'ocrd-tool.json'))

class FROCProcessor(Processor):

def __init__(self, *args, **kwargs):
kwargs['ocrd_tool'] = OCRD_TOOL['tools']['ocrd-froc']
kwargs['ocrd_tool'] = OCRD_TOOL['tools']['ocrd-froc-recognize']
kwargs['version'] = OCRD_TOOL['version']
super().__init__(*args, **kwargs)
if hasattr(self, 'output_file_grp'):
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ocrd >= 2.22.3
ocrd >= 2.64.1
pandas
scikit-image
torch >= 1.4.0
Expand Down

0 comments on commit 2cb0f95

Please sign in to comment.