-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fdbf080
commit 939c7ad
Showing
6 changed files
with
105 additions
and
12 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.. _django-models: | ||
|
||
Django model structure | ||
====================== | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
.. _mp-covenants-fake-ocr: | ||
|
||
mp-covenants-fake-ocr | ||
=============================== | ||
|
||
- Code: `mp-covenants-fake-ocr on Github <https://github.com/UMNLibraries/mp-covenants-fake-ocr>`_ | ||
|
||
This component is designed to mimic actions of OCR step, but skip actual OCR, to avoid needing to re-OCR files that have already been OCRed, which is relatively expensive. The function opens a previously created OCR JSON saved to s3 and passes data about it on to the next step. This lambda is only used for DeedPageProcessorFAKEOCR, which is run to correct errors in post-OCR stages of the main DeedPageProcessor Step Function. This step function is triggered by the Django management command `trigger_lambda_refresh` | ||
|
||
|
||
Steps of the function | ||
--------------------- | ||
|
||
1. Check event for valid raw image path. | ||
2. Determine matching OCR JSON and OCR TXT s3 paths, which should already exist | ||
3. Open pre-existing OCR JSON file | ||
4. Generate new UUID and stats, save stats object | ||
5. Pass output on to next stage. | ||
|
||
Software development requirements | ||
--------------------------------- | ||
|
||
The Lambda components of the Deed Machine are built using Amazon's Serverless Application Model (SAM) and the AWS SAM CLI tool. | ||
|
||
- Pipenv (Can use other virtual environments, but will require fiddling on your part) | ||
- AWS SAM CLI | ||
- Docker | ||
- Python 3 | ||
|
||
Quickstart commands | ||
------------------- | ||
|
||
To build the application: | ||
|
||
.. code-block:: bash | ||
pipenv install | ||
pipenv shell | ||
sam build | ||
To rebuild and deploy the application: | ||
|
||
.. code-block:: bash | ||
sam build && sam deploy | ||
To run tests: | ||
|
||
.. code-block:: bash | ||
pytest |