Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
3188ec8
:boom: :recycle: uniformize syntaxes with other SDKs
sebastianMindee Mar 6, 2026
018fe84
:sparkles: add support for V2 CLI
sebastianMindee Mar 18, 2026
d5edc23
:sparkles: add support for model search
sebastianMindee Mar 23, 2026
5dfa5fe
:wrench: add CLI tests
sebastianMindee Mar 23, 2026
3907387
:recycle: :boom: change raw_http attribute in responses to be actual …
sebastianMindee Mar 24, 2026
35762a2
:recycle: :boom: make logging configurable and default output to stderr
sebastianMindee Mar 24, 2026
9e25c73
:recycle: move legacy products to 'V1' namespace
sebastianMindee Mar 31, 2026
3f779bd
:recycle: add parsing & extraction to v1 namespace
sebastianMindee Mar 31, 2026
1e6e150
:recycle: move V1 HTTP to V1 module
sebastianMindee Mar 31, 2026
54ab4da
:recycle: move V2 HTTP module to V2 namespace
sebastianMindee Mar 31, 2026
63be731
:recycle: move data schema to extraction parameters namespace
sebastianMindee Mar 31, 2026
b39ec7e
:recycle: move V1 client to v1 namespace
sebastianMindee Mar 31, 2026
6103043
:boom: :coffin: remove support for unused V1 products
sebastianMindee Mar 31, 2026
fbf2260
:wrench: :arrow_up: add better tooling & pre-commit hook (#236)
sebastianMindee Mar 31, 2026
4e46724
:boom: :sparkles: add support for V2 crop & split operation (#238)
sebastianMindee Apr 2, 2026
8618d99
:arrow_up: :boom: drop support for ruby < 3.2 and bump dependency (#…
sebastianMindee Apr 2, 2026
eabede1
:sparkles: :arrow_up: add support for mindee-lite gem (#240)
sebastianMindee Apr 3, 2026
c873113
:memo: update readme
sebastianMindee Apr 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 24 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false

[*.{rb,rake,gemspec,rbs,ru}]
indent_style = space
indent_size = 2

[*.{yml,yaml,json}]
indent_style = space
indent_size = 2

[*.sh]
indent_style = space
indent_size = 2

[Makefile]
indent_style = tab
16 changes: 9 additions & 7 deletions .github/workflows/_publish-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@ on:
workflow_dispatch:

jobs:
linting:
publish:
name: Publish to Rubygems
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: recursive

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0"
ruby-version: "3.2"
bundler-cache: true

- name: Set credentials
Expand All @@ -28,10 +27,13 @@ jobs:
echo -e "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}" > ~/.gem/credentials
chmod 600 ~/.gem/credentials

- name: Build the Gem
- name: Build the Gems
run: |
gem build --strict --output mindee.gem
gem build mindee.gemspec --strict --output mindee.gem
gem build mindee-lite.gemspec --strict --output mindee-lite.gem

- name: Publish the Gem
- name: Publish the Gems
run: |
# Push both generated files to Rubygems
gem push mindee.gem
gem push mindee-lite.gem
4 changes: 2 additions & 2 deletions .github/workflows/_publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
name: Publish Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
ruby-version: "3.2"
bundler-cache: true

- name: Analyse the code with Rubocop
Expand Down
20 changes: 18 additions & 2 deletions .github/workflows/_static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,32 @@ jobs:
name: Run Static Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: recursive

- name: set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0.0"
ruby-version: "3.2.0"
bundler-cache: true

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Install pre-commit
run: |
python -m pip install --upgrade pip
python -m pip install pre-commit

- name: Run pre-commit checks (security + hygiene)
env:
SKIP: rubocop,steep
run: |
pre-commit run --all-files --show-diff-on-failure

- name: Analyse the code with Rubocop
run: |
bundle install
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/_test-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CLI Test

on:
workflow_call:
workflow_dispatch:

env:
MINDEE_API_KEY: ${{ secrets.MINDEE_API_KEY_SE_TESTS }}
MINDEE_V2_API_KEY: ${{ secrets.MINDEE_V2_SE_TESTS_API_KEY }}
MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID }}

jobs:
test:
name: Run Tests
timeout-minutes: 30
strategy:
max-parallel: 4
matrix:
os_config:
- os: "ubuntu-24.04"
rid: "linux-x64"
- os: "macos-latest"
rid: "osx-x64"
- os: "windows-latest"
rid: "win-x64"
ruby:
- "3.2"
- "4.0"
runs-on: ${{ matrix.os_config.os }}
steps:
- uses: actions/checkout@v5
with:
submodules: recursive

- name: set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Tests V2 CLI
run: |
./spec/test_v2_cli.sh ./spec/data/file_types/pdf/blank_1.pdf ${{ matrix.os_config.rid }}

- name: Tests V1 CLI
run: |
./spec/test_v1_cli.sh ./spec/data/file_types/pdf/blank_1.pdf ${{ matrix.os_config.rid }}
50 changes: 50 additions & 0 deletions .github/workflows/_test-integration-lite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#
# Run integration tests.
#
name: Integration Tests - Minimal Dependencies

on:
workflow_call:
workflow_dispatch:

env:
MINDEE_API_KEY: ${{ secrets.MINDEE_API_KEY_SE_TESTS }}
WORKFLOW_ID: ${{ secrets.WORKFLOW_ID_SE_TESTS }}
MINDEE_V2_API_KEY: ${{ secrets.MINDEE_V2_SE_TESTS_API_KEY }}
MINDEE_V2_FINDOC_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID }}
MINDEE_V2_SE_TESTS_BLANK_PDF_URL: ${{ secrets.MINDEE_V2_SE_TESTS_BLANK_PDF_URL }}
MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID }}
MINDEE_V2_SE_TESTS_CLASSIFICATION_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_CLASSIFICATION_MODEL_ID }}
MINDEE_V2_SE_TESTS_CROP_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_CROP_MODEL_ID }}
MINDEE_V2_SE_TESTS_OCR_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_OCR_MODEL_ID }}
MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID }}
MINDEE_LOG_LEVEL: DEBUG
MINDEE_GEM_NAME: mindee-lite

jobs:
integration-tests:
name: Run Integration Tests
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 3
matrix:
os:
- "ubuntu-24.04"
- "macos-latest"
ruby:
- "4.0"
steps:
- uses: actions/checkout@v5
with:
submodules: recursive

- name: set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Run Rspec for integration tests
run: |
bundle exec rake integration
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
#
# Run integration tests.
#
name: Integration Tests
name: Integration Tests - All Dependencies

on:
workflow_call:
workflow_dispatch:

env:
MINDEE_API_KEY: ${{ secrets.MINDEE_API_KEY_SE_TESTS }}
WORKFLOW_ID: ${{ secrets.WORKFLOW_ID_SE_TESTS }}
MINDEE_V2_API_KEY: ${{ secrets.MINDEE_V2_SE_TESTS_API_KEY }}
MINDEE_V2_FINDOC_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID }}
MINDEE_V2_SE_TESTS_BLANK_PDF_URL: ${{ secrets.MINDEE_V2_SE_TESTS_BLANK_PDF_URL }}
MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID }}
MINDEE_V2_SE_TESTS_CLASSIFICATION_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_CLASSIFICATION_MODEL_ID }}
MINDEE_V2_SE_TESTS_CROP_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_CROP_MODEL_ID }}
MINDEE_V2_SE_TESTS_OCR_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_OCR_MODEL_ID }}
MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID }}
MINDEE_LOG_LEVEL: DEBUG

jobs:
integration-tests:
name: Run Integration Tests
Expand All @@ -19,10 +32,10 @@ jobs:
- "ubuntu-24.04"
- "macos-latest"
ruby:
- "3.0"
- "3.2"
- "4.0"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: recursive

Expand All @@ -32,11 +45,11 @@ jobs:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Install Ghostscript on Ubuntu
- name: Install Ghostscript and ImageMagick on Ubuntu
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt-get install -y ghostscript
sudo apt-get install -y ghostscript imagemagick

- name: Install Ghostscript and ImageMagick on macOS
if: runner.os == 'macOS'
Expand All @@ -50,17 +63,6 @@ jobs:
sudo sed -i "s/$SRC/$RPL/" /etc/ImageMagick-6/policy.xml

- name: Run Rspec for integration tests
env:
MINDEE_API_KEY: ${{ secrets.MINDEE_API_KEY_SE_TESTS }}
WORKFLOW_ID: ${{ secrets.WORKFLOW_ID_SE_TESTS }}
MINDEE_V2_API_KEY: ${{ secrets.MINDEE_V2_SE_TESTS_API_KEY }}
MINDEE_V2_FINDOC_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID }}
MINDEE_V2_SE_TESTS_BLANK_PDF_URL: ${{ secrets.MINDEE_V2_SE_TESTS_BLANK_PDF_URL }}
MINDEE_V2_SE_TESTS_CLASSIFICATION_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_CLASSIFICATION_MODEL_ID }}
MINDEE_V2_SE_TESTS_CROP_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_CROP_MODEL_ID }}
MINDEE_V2_SE_TESTS_OCR_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_OCR_MODEL_ID }}
MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID }}
MINDEE_LOG_LEVEL: DEBUG
run: |
bundle exec rake integration

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test Code Samples
name: Smoke Test

on:
workflow_call:
Expand All @@ -9,12 +9,13 @@ env:
MINDEE_ACCOUNT_SE_TESTS: ${{ secrets.MINDEE_ACCOUNT_SE_TESTS }}
MINDEE_API_KEY_SE_TESTS: ${{ secrets.MINDEE_API_KEY_SE_TESTS }}
MINDEE_V2_API_KEY: ${{ secrets.MINDEE_V2_SE_TESTS_API_KEY }}
MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID }}
MINDEE_V2_SE_TESTS_FAILURE_WEBHOOK_ID: ${{ secrets.MINDEE_V2_SE_TESTS_FAILURE_WEBHOOK_ID }}
MINDEE_V2_SE_TESTS_CLASSIFICATION_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_CLASSIFICATION_MODEL_ID }}
MINDEE_V2_SE_TESTS_CROP_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_CROP_MODEL_ID }}
MINDEE_V2_SE_TESTS_OCR_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_OCR_MODEL_ID }}
MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID }}
MINDEE_V2_FINDOC_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_FINDOC_MODEL_ID }}
MINDEE_V2_SE_TESTS_BLANK_PDF_URL: ${{ secrets.MINDEE_V2_SE_TESTS_BLANK_PDF_URL }}
MINDEE_V2_CLASSIFICATION_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_CLASSIFICATION_MODEL_ID }}
MINDEE_V2_CROP_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_CROP_MODEL_ID }}
MINDEE_V2_FAILURE_WEBHOOK_ID: ${{ secrets.MINDEE_V2_SE_TESTS_FAILURE_WEBHOOK_ID }}
MINDEE_V2_OCR_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_OCR_MODEL_ID }}
MINDEE_V2_SPLIT_MODEL_ID: ${{ secrets.MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID }}

jobs:
test:
Expand All @@ -23,14 +24,13 @@ jobs:
strategy:
matrix:
ruby:
- "3.0"
- "3.1"
- "3.2"
- "3.3"
- "3.4"
- "4.0"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: recursive

Expand All @@ -40,14 +40,14 @@ jobs:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Tests V1 code samples
- name: Tests V2 code samples
env:
MINDEE_LOG_LEVEL: DEBUG
run: |
./spec/test_code_samples_v1.sh
./spec/test_v2_code_samples.sh

- name: Tests V2 code samples
- name: Tests V1 code samples
env:
MINDEE_LOG_LEVEL: DEBUG
run: |
./spec/test_code_samples_v2.sh
./spec/test_v1_code_samples.sh ${{ secrets.MINDEE_ACCOUNT_SE_TESTS }} ${{ secrets.MINDEE_ENDPOINT_SE_TESTS }}
40 changes: 40 additions & 0 deletions .github/workflows/_test-units-lite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#
# Run lite unit tests.
#
name: Unit Tests - Minimal Dependencies

on:
workflow_call:

env:
MINDEE_GEM_NAME: mindee-lite

jobs:
tests:
name: Run Unit Tests
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- "ubuntu-24.04"
- "macos-latest"
ruby:
- "3.2"
- "4.0"
steps:
- uses: actions/checkout@v5
with:
submodules: recursive

- name: set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Run Rspec
env:
MINDEE_LOG_LEVEL: DEBUG
run: |
bundle exec rake spec
Loading
Loading