Deepomatic Platform
  • Overview
  • Release notes
    • January 2025
    • November 21, 2024
    • October 17, 2024
    • September 19, 2024
    • July 18, 2024
    • June 27, 2024
    • May 23, 2024
    • April 18, 2024
    • March 21, 2024
    • February 22, 2024
    • January 18, 2024
    • December 13, 2023
    • October 26, 2023
    • July 20, 2023
    • June 29, 2023
    • May 29, 2023
    • April 27, 2023
    • March 30, 2023
    • February 17, 2023
    • January 19, 2023
    • December 22, 2022
    • November 18, 2022
    • October 19, 2022
    • September 19, 2022
    • July 27, 2022
    • June 26, 2022
    • May 17, 2022
    • April 13, 2022
    • March 17, 2022
    • February 10, 2022
    • December 21, 2021
    • October 26, 2021
  • Getting started
  • ADMIN & USER MANAGEMENT
    • Invite and manage users
      • Invite group of users at once
      • SSO
        • Azure Active Directory
  • Deepomatic Engage
    • Integrate applications
      • Deepomatic vocabulary
      • Deepomatic connectors
        • Set-up
        • Camera Connector
        • Work Order Connector
      • API integration
        • Authentication
        • Errors
        • API reference
          • Work order management
          • Analysis
            • Guide field workers
            • Perform an analysis
            • Correct an analysis
          • Data retrieval
          • Endpoints' list
      • Batch processing
        • Format
        • Naming conventions
        • Processing
        • Batch status & errors
      • Data export
    • Use the mobile application
      • Configure a mobile application
      • Create & visualize work orders
      • Complete work orders
      • Offline experience
    • Manage your business operations with customisable solutions
      • Roles
      • Alerting
      • Field services
        • Reviewing work orders
        • Exploring work orders
        • Grouping work orders
        • Monitoring assets performance
      • Insights
  • Security
    • Security
    • Data Protection
Powered by GitBook
On this page
  • How to use the lib
  • How do you release a new version ?
  • What's in that lib ?
  • Google OCR

Was this helpful?

  1. Deepomatic Drive
  2. Configuring Visual Automation Applications
  3. Assembling workflows
  4. Workflow implementation
  5. Write the task-group implementation

How to use the SA lib

Was this helpful?

This lib source code is in the deepomatic-workflows-sa-lib repository:

How to use the lib

If you want your workflow to use that lib, you'll have to specify the sa_lib key in your in specs.yaml.

# specs.yaml
version: 2
sa_lib: <version>
...

With that done, sa_lib will be made available for standard import:

from deepomatic.workflows.sa import <...>
...

Version can be:

  • local: will use the version of that lib you have locally installed. Useful for local debuging/developping. To use it, first install the library in your local env. and change your package version in specs.yaml to sa_lib: local

    git clone git@github.com:Deepomatic/deepomatic-workflows-sa-lib.git
    cd deepomatic-workflows-sa-lib
    pip install --editable ./
  • <MAJOR.MINOR.BUGFIX>: workflow server will download the corresponding sa lib.

How do you release a new version ?

  • work on a branch different from master: you can test how your library behave with the local option of the workflow server

  • make a Pull Request to validate your work:

    • CI/CD will automatically be launch and validate code (lint + test)

    • Have someone review your code

  • merge the PR once it's validated

  • then, on your shell:

    git checkout master
    git pull origin master
    git tag -a <X.Y.Z> -m "version <X.Y.Z>" #ex 0.0.4
    git push origin tag <X.Y.Z>
  • a github action will automatically package your library and made a <X.Y.Z> version available as a release.

  • you can then specify your library on the workflow server side in the specs.yaml

What's in that lib ?

This is not at all the complete doc of the lib SA which is in the SA's ownership. It's purpose is just to introduce it, but don't be scared to dig in the code, it's yours !

Google OCR

I recommend using the GoogleOCRProcessor class to use the Google vision OCR:

from lib.google_ocr_processing import GoogleOCRProcessor

image_ocr = GoogleOCRProcessor(image)

# Access the predicted text
image_ocr.text

Go take a look !

GoogleOCRProcessor is a wrapper around the function implemented in deepomatic-workflows. It gives various methods to efficiently use google predictions.

here
google_ocr
https://github.com/Deepomatic/deepomatic-workflows-sa-lib