Skip to content

Commit

Permalink
Linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
evekhm committed Jul 19, 2024
1 parent b8ca445 commit fc2b90a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions classify-split-extract-workflow/classify-job/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ WORKDIR $APP_HOME
COPY . ./

# Install production dependencies.
RUN pip install -r requirements.txt

RUN pip install --no-cache-dir -r requirements.txt
CMD ["/usr/local/bin/python3", "classify.py"]
2 changes: 1 addition & 1 deletion classify-split-extract-workflow/classify-job/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def load_config(bucket_name: str, filename: str) -> Optional[Dict[Any, Any]]:

last_modified_time = blob.updated
global LAST_MODIFIED_TIME_OF_CONFIG
if last_modified_time == LAST_MODIFIED_TIME_OF_CONFIG:
if LAST_MODIFIED_TIME_OF_CONFIG == last_modified_time:
return CONFIG_DATA

logger.info(f"Reloading config from: {filename}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ def split_pdf(gcs_uri: str, entities: List[Document.Entity]) -> Dict:
if page_refs:
start_page = int(page_refs[0].page)
end_page = int(page_refs[-1].page)
else:
logger.warning(f"Skipping {pdf_path} entity due to no page refs, no splitting")
continue
page_range = (
f"pg{start_page + 1}"
if start_page == end_page
Expand Down

0 comments on commit fc2b90a

Please sign in to comment.