Skip to content

Commit 5dffd76

Browse files
Merge pull request #208 from regulaforensics/feature/SP-23182
SP-23182 - remove example license
2 parents 4912e4a + 519fe85 commit 5dffd76

File tree

6 files changed

+11
-18
lines changed

6 files changed

+11
-18
lines changed

.github/workflows/run-smoke-test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,3 @@ jobs:
2727
working-directory: example
2828
env:
2929
API_BASE_PATH: "https://nightly-api.regulaforensics.com"
30-
TEST_LICENSE: ${{secrets.TEST_LICENSE}}

example/example.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44

55
host = os.getenv("API_BASE_PATH", "https://api.regulaforensics.com")
66

7-
# read optional local license file
8-
if os.path.isfile('regula.license') and os.access('regula.license', os.R_OK):
9-
with open("regula.license", "rb") as f:
10-
print("Found local license file. Using it for performing request...")
11-
regula_license = f.read()
12-
137
with open("WHITE.jpg", "rb") as f:
148
white_page_0 = f.read()
159

@@ -26,11 +20,6 @@
2620
}
2721
params = ProcessParams(alreadyCropped=True, scenario=Scenario.FULLPROCESS)
2822

29-
# Add license to request
30-
# request = RecognitionRequest(system_info=ProcessSystemInfo(license=base64.b64encode(regula_license).decode()), process_params=params, images=[
31-
# RecognitionImage(image=white_page_0, light_index=Light.WHITE, page_index=0),
32-
# ])
33-
3423
request = RecognitionRequest(process_params=params, images=[
3524
RecognitionImage(image=white_page_0, light_index=Light.WHITE, page_index=0),
3625
# RecognitionImage(image=ir_page_0, light_index=Light.IR, page_index=0),

regula/documentreader/webclient/gen/models/chosen_document_type.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ class ChosenDocumentType(BaseModel):
2121
"""
2222
Contains information about one document type candidate
2323
""" # noqa: E501
24-
document_name: StrictStr = Field(description="Document name", alias="DocumentName")
24+
document_name: Optional[StrictStr] = Field(default=None, description="Document name", alias="DocumentName")
2525
id: StrictInt = Field(description="Unique document type template identifier (Regula's internal numeric code)", alias="ID")
2626
p: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="A measure of the likelihood of correct recognition in the analysis of this type of document", alias="P")
2727
rotated180: StrictInt = Field(description="true if the document of the given type is rotated by 180 degrees", alias="Rotated180")
2828
rfid_presence: RfidLocation = Field(alias="RFID_Presence")
29-
fdsid_list: FDSIDList = Field(alias="FDSIDList")
29+
fdsid_list: Optional[FDSIDList] = Field(default=None, alias="FDSIDList")
3030
necessary_lights: StrictInt = Field(description="Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document", alias="NecessaryLights")
3131
check_authenticity: StrictInt = Field(description="Set of authentication options provided for this type of document (combination of Authenticity enum)", alias="CheckAuthenticity")
3232
uv_exp: StrictInt = Field(description="The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme", alias="UVExp")

regula/documentreader/webclient/gen/models/one_candidate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ class OneCandidate(BaseModel):
2121
"""
2222
Contains information about one document type candidate
2323
""" # noqa: E501
24-
document_name: StrictStr = Field(description="Document name", alias="DocumentName")
24+
document_name: Optional[StrictStr] = Field(default=None, description="Document name", alias="DocumentName")
2525
id: StrictInt = Field(description="Unique document type template identifier (Regula's internal numeric code)", alias="ID")
2626
p: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="A measure of the likelihood of correct recognition in the analysis of this type of document", alias="P")
2727
rotated180: StrictInt = Field(description="true if the document of the given type is rotated by 180 degrees", alias="Rotated180")
2828
rfid_presence: RfidLocation = Field(alias="RFID_Presence")
29-
fdsid_list: FDSIDList = Field(alias="FDSIDList")
29+
fdsid_list: Optional[FDSIDList] = Field(default=None, alias="FDSIDList")
3030
necessary_lights: StrictInt = Field(description="Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document", alias="NecessaryLights")
3131
check_authenticity: StrictInt = Field(description="Set of authentication options provided for this type of document (combination of Authenticity enum)", alias="CheckAuthenticity")
3232
uv_exp: StrictInt = Field(description="The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme", alias="UVExp")

regula/documentreader/webclient/gen/models/process_params.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ class ProcessParams(BaseModel):
9898
do_barcodes: Optional[List[InputBarcodeType]] = Field(default=None, description="Set the types of barcodes to process.", alias="doBarcodes")
9999
strict_dl_category_expiry: Optional[StrictBool] = Field(default=None, description="Set to force DL categories expiry date to affect the overall status or not. As documents usually have their own date of expiry, which might be less or greater than category expiry date, this might be handy for specific cases.", alias="strictDLCategoryExpiry")
100100
generate_alpha2_codes: Optional[StrictBool] = Field(default=None, description="Set to generate Alpha-2 codes for nationality and issuing state fields.", alias="generateAlpha2Codes")
101-
__properties: ClassVar[List[str]] = ["generateDTCVC", "lcidFilter", "checkLiveness", "lcidIgnoreFilter", "oneShotIdentification", "useFaceApi", "faceApi", "doDetectCan", "imageOutputMaxHeight", "imageOutputMaxWidth", "scenario", "resultTypeOutput", "doublePageSpread", "generateDoublePageSpreadImage", "fieldTypesFilter", "dateFormat", "measureSystem", "imageDpiOutMax", "alreadyCropped", "customParams", "config", "log", "logLevel", "forceDocID", "matchTextFieldMask", "fastDocDetect", "updateOCRValidityByGlare", "checkRequiredTextFields", "returnCroppedBarcode", "imageQa", "strictImageQuality", "respectImageQuality", "forceDocFormat", "noGraphics", "depersonalizeLog", "multiDocOnImage", "shiftExpiryDate", "minimalHolderAge", "returnUncroppedImage", "mrzFormatsFilter", "forceReadMrzBeforeLocate", "parseBarcodes", "convertCase", "splitNames", "disablePerforationOCR", "documentGroupFilter", "processAuth", "deviceId", "deviceType", "deviceTypeHex", "ignoreDeviceIdFromImage", "documentIdList", "rfid", "checkAuth", "authParams", "mrzDetectMode", "generateNumericCodes", "strictBarcodeDigitalSignatureCheck", "selectLongestNames", "doBarcodes", "strictDLCategoryExpiry", "generateAlpha2Codes"]
101+
pdf_pages_limit: Optional[StrictInt] = Field(default=None, description="Limits the number of pages to be processed from a PDF file.", alias="pdfPagesLimit")
102+
__properties: ClassVar[List[str]] = ["generateDTCVC", "lcidFilter", "checkLiveness", "lcidIgnoreFilter", "oneShotIdentification", "useFaceApi", "faceApi", "doDetectCan", "imageOutputMaxHeight", "imageOutputMaxWidth", "scenario", "resultTypeOutput", "doublePageSpread", "generateDoublePageSpreadImage", "fieldTypesFilter", "dateFormat", "measureSystem", "imageDpiOutMax", "alreadyCropped", "customParams", "config", "log", "logLevel", "forceDocID", "matchTextFieldMask", "fastDocDetect", "updateOCRValidityByGlare", "checkRequiredTextFields", "returnCroppedBarcode", "imageQa", "strictImageQuality", "respectImageQuality", "forceDocFormat", "noGraphics", "depersonalizeLog", "multiDocOnImage", "shiftExpiryDate", "minimalHolderAge", "returnUncroppedImage", "mrzFormatsFilter", "forceReadMrzBeforeLocate", "parseBarcodes", "convertCase", "splitNames", "disablePerforationOCR", "documentGroupFilter", "processAuth", "deviceId", "deviceType", "deviceTypeHex", "ignoreDeviceIdFromImage", "documentIdList", "rfid", "checkAuth", "authParams", "mrzDetectMode", "generateNumericCodes", "strictBarcodeDigitalSignatureCheck", "selectLongestNames", "doBarcodes", "strictDLCategoryExpiry", "generateAlpha2Codes", "pdfPagesLimit"]
102103

103104
model_config = ConfigDict(
104105
populate_by_name=True,
@@ -231,7 +232,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
231232
"selectLongestNames": obj.get("selectLongestNames"),
232233
"doBarcodes": obj.get("doBarcodes"),
233234
"strictDLCategoryExpiry": obj.get("strictDLCategoryExpiry"),
234-
"generateAlpha2Codes": obj.get("generateAlpha2Codes")
235+
"generateAlpha2Codes": obj.get("generateAlpha2Codes"),
236+
"pdfPagesLimit": obj.get("pdfPagesLimit")
235237
})
236238
return _obj
237239

regula/documentreader/webclient/gen/models/text_field_type.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,9 @@ class TextFieldType(int, Enum):
662662
EF_CARD_ACCESS = 692
663663
SHORT_FLIGHT_NUMBER = 693
664664
AIRLINE_CODE = 694
665+
FT_MVC_AGENCY = 695
666+
FT_ISSUING_STATE_CODE_ALPHA2 = 696
667+
FT_NATIONALITY_CODE_ALPHA2 = 697
665668

666669
@classmethod
667670
def from_json(cls, json_str: str) -> Self:

0 commit comments

Comments
 (0)