-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from dataiku/feature/add-easyocr
add easyocr and accept pdf
- Loading branch information
Showing
22 changed files
with
340 additions
and
134 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
pipeline { | ||
options { | ||
disableConcurrentBuilds() | ||
} | ||
agent { label 'dss-plugin-tests'} | ||
environment { | ||
PLUGIN_INTEGRATION_TEST_INSTANCE="$HOME/instance_config.json" | ||
UNIT_TEST_FILES_STATUS_CODE = sh(script: 'ls ./tests/*/unit/test*', returnStatus: true) | ||
INTEGRATION_TEST_FILES_STATUS_CODE = sh(script: 'ls ./tests/*/integration/test*', returnStatus: true) | ||
} | ||
stages { | ||
stage('Run Unit Tests') { | ||
when { environment name: 'UNIT_TEST_FILES_STATUS_CODE', value: "0"} | ||
steps { | ||
sh 'echo "Running unit tests"' | ||
catchError(stageResult: 'FAILURE') { | ||
sh """ | ||
make unit-tests | ||
""" | ||
} | ||
sh 'echo "Done with unit tests"' | ||
} | ||
} | ||
stage('Run Integration Tests') { | ||
when { environment name: 'INTEGRATION_TEST_FILES_STATUS_CODE', value: "0"} | ||
steps { | ||
sh 'echo "Running integration tests"' | ||
catchError(stageResult: 'FAILURE') { | ||
sh """ | ||
make integration-tests | ||
""" | ||
} | ||
sh 'echo "Done with integration tests"' | ||
} | ||
} | ||
} | ||
post { | ||
always { | ||
script { | ||
allure([ | ||
includeProperties: false, | ||
jdk: '', | ||
properties: [], | ||
reportBuildPolicy: 'ALWAYS', | ||
results: [[path: 'tests/allure_report']] | ||
]) | ||
|
||
def status = currentBuild.currentResult | ||
sh "file_name=\$(echo ${env.JOB_NAME} | tr '/' '-').status; touch \$file_name; echo \"${env.BUILD_URL};${env.CHANGE_TITLE};${env.CHANGE_AUTHOR};${env.CHANGE_URL};${env.BRANCH_NAME};${status};\" >> $HOME/daily-statuses/\$file_name" | ||
cleanWs() | ||
} | ||
} | ||
} | ||
} |
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
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,8 +1,12 @@ | ||
pdf2image==1.14.0 | ||
pypdfium2==4.17.0 | ||
pytesseract==0.3.7 | ||
Pillow==8.1.0 | ||
Pillow==8.2.0 | ||
matplotlib==3.3.4; python_version <= '3.9' | ||
matplotlib==3.7.1; python_version >= '3.10' | ||
opencv-python==4.5.1.48; python_version <= '3.9' | ||
opencv-python==4.7.0.72; python_version >= '3.10' | ||
deskew==0.10.3 | ||
deskew==0.10.33 | ||
torch==1.11.0; python_version >= '3.10' | ||
torch==1.9.1; python_version <= '3.9' | ||
easyocr==1.7.0 | ||
packaging==21.3 |
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
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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import dataiku | ||
from dataiku.customrecipe import get_input_names_for_role | ||
from dataiku.customrecipe import get_output_names_for_role | ||
|
||
|
||
def get_input_output(input_type='dataset', output_type='dataset'): | ||
if input_type == 'folder': | ||
input_names = get_input_names_for_role('input_folder')[0] | ||
input_obj = dataiku.Folder(input_names) | ||
else: | ||
input_names = get_input_names_for_role('input_dataset')[0] | ||
input_obj = dataiku.Dataset(input_names) | ||
|
||
if output_type == 'folder': | ||
output_names = get_output_names_for_role('output_folder')[0] | ||
output_obj = dataiku.Folder(output_names) | ||
else: | ||
output_names = get_output_names_for_role('output_dataset')[0] | ||
output_obj = dataiku.Dataset(output_names) | ||
|
||
return input_obj, output_obj |
Oops, something went wrong.