Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/_test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,16 @@ jobs:

- name: Install Ghostscript and ImageMagick on macOS
if: runner.os == 'macOS'
run: brew install ghostscript imagemagick
run: |
brew update
brew install ghostscript imagemagick || true
brew reinstall jpeg-turbo imagemagick
# Diagnostics: fail early with a readable message if JPEG can't be written
magick -version
which -a magick
magick -list format | grep -iE '^\s*JPE?G'
magick -size 10x10 xc:white /tmp/check.jpg && magick mogrify -resize 5x5 /tmp/check.jpg

- name: Change ImageMagick security policy on Ubuntu
if: runner.os == 'Linux'
run: |
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/_test-units.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,15 @@ jobs:
- name: Install Ghostscript and ImageMagick on macOS
if: runner.os == 'macOS'
run: |
brew install ghostscript imagemagick
/usr/bin/security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain
brew update
brew install ghostscript imagemagick || true
brew reinstall jpeg-turbo imagemagick
# Diagnostics: fail early with a readable message if JPEG can't be written
magick -version
which -a magick
magick -list format | grep -iE '^\s*JPE?G'
magick -size 10x10 xc:white /tmp/check.jpg && magick mogrify -resize 5x5 /tmp/check.jpg

- name: Change ImageMagick security policy on Ubuntu
if: runner.os == 'Linux'
run: |
Expand Down
6 changes: 0 additions & 6 deletions bin/v1/products.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
sync: true,
async: true,
},
'barcode-reader' => {
description: 'Barcode Reader',
doc_class: Mindee::V1::Product::BarcodeReader::BarcodeReaderV1,
sync: true,
async: false,
},
'cropper' => {
description: 'Cropper',
doc_class: Mindee::V1::Product::Cropper::CropperV1,
Expand Down
24 changes: 0 additions & 24 deletions docs/code_samples/bank_account_details_v1.txt

This file was deleted.

24 changes: 0 additions & 24 deletions docs/code_samples/barcode_reader_v1.txt

This file was deleted.

24 changes: 0 additions & 24 deletions docs/code_samples/idcard_fr_v1.txt

This file was deleted.

28 changes: 0 additions & 28 deletions docs/code_samples/workflow_execution.txt

This file was deleted.

39 changes: 0 additions & 39 deletions lib/mindee/v1/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -294,45 +294,6 @@ def enqueue_and_parse(
queue_res
end

# rubocop:enable Metrics/CyclomaticComplexity
# Sends a document to a workflow.
#
# Accepts options either as a Hash or as a WorkflowOptions struct.
#
# @param input_source [Mindee::Input::Source::LocalInputSource, Mindee::Input::Source::URLInputSource]
# @param workflow_id [String]
# @param options [Hash, WorkflowOptions] Options to configure workflow behavior. Possible keys:
# * `document_alias` [String, nil] Alias to give to the document.
# * `priority` [Symbol, nil] Priority to give to the document.
# * `full_text` [bool] Whether to include the full OCR text response in compatible APIs.
# * `rag` [bool, nil] Whether to enable Retrieval-Augmented Generation.
#
# * `public_url` [String, nil] A unique, encrypted URL for accessing the document validation interface without
# requiring authentication.
# * `page_options` [Hash, nil] Page cutting/merge options:
# * `:page_indexes` Zero-based list of page indexes.
# * `:operation` Operation to apply on the document, given the `page_indexes specified:
# * `:KEEP_ONLY` - keep only the specified pages, and remove all others.
# * `:REMOVE` - remove the specified pages, and keep all others.
# * `:on_min_pages` Apply the operation only if document has at least this many pages.
# @return [Mindee::V1::Parsing::Common::WorkflowResponse]
def execute_workflow(input_source, workflow_id, options: {})
opts = options.is_a?(WorkflowOptions) ? options : WorkflowOptions.new(params: options)
if opts.respond_to?(:page_options) && input_source.is_a?(Input::Source::LocalInputSource)
process_pdf_if_required(input_source, opts)
end

workflow_endpoint = V1::HTTP::WorkflowEndpoint.new(workflow_id, api_key: @api_key.to_s)
logger.debug("Sending document to workflow '#{workflow_id}'")

prediction, raw_http = workflow_endpoint.execute_workflow(
input_source,
opts
)

Mindee::V1::Parsing::Common::WorkflowResponse.new(V1::Product::Universal::Universal, prediction, raw_http)
end

# Load a prediction.
#
# @param product_class [Mindee::Inference] class of the product
Expand Down
3 changes: 0 additions & 3 deletions lib/mindee/v1/product.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# frozen_string_literal: true

require_relative 'product/barcode_reader/barcode_reader_v1'
require_relative 'product/cropper/cropper_v1'
require_relative 'product/financial_document/financial_document_v1'
require_relative 'product/fr/bank_account_details/bank_account_details_v1'
require_relative 'product/fr/bank_account_details/bank_account_details_v2'
require_relative 'product/fr/bank_statement/bank_statement_v2'
require_relative 'product/fr/id_card/id_card_v1'
require_relative 'product/fr/id_card/id_card_v2'
require_relative 'product/international_id/international_id_v2'
require_relative 'product/invoice/invoice_v4'
Expand Down
47 changes: 0 additions & 47 deletions lib/mindee/v1/product/barcode_reader/barcode_reader_v1.rb

This file was deleted.

47 changes: 0 additions & 47 deletions lib/mindee/v1/product/barcode_reader/barcode_reader_v1_document.rb

This file was deleted.

38 changes: 0 additions & 38 deletions lib/mindee/v1/product/barcode_reader/barcode_reader_v1_page.rb

This file was deleted.

This file was deleted.

Loading
Loading