Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@bertsky
Copy link
Collaborator

@bertsky bertsky commented Jul 10, 2023

To be discussed, but the current code is inefficient and hard to reuse.

Since the existing functions are all private anyway, perhaps we could be more bold here and encapsulate each single PAGE check with a public member in PageValidator?

Copy link
Member

@kba kba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obviously more efficient like this.

The main reason why these are private methods is that it keeps the interface small and allows for a single location where _resolve_workspace is called. If we add that to the individual methods (subsequent calls become a no-op once self.workspace is set), we could make them public.

bertsky and others added 2 commits July 10, 2023 17:09
Co-authored-by: Konstantin Baierer <[email protected]>
# Conflicts:
#	src/ocrd_validators/workspace_validator.py
@kba
Copy link
Member

kba commented Feb 12, 2024

I know this is a draft but it is a useful improvement even without further changes to the API - can we merge?

@bertsky bertsky marked this pull request as ready for review February 12, 2024 17:11
@bertsky
Copy link
Collaborator Author

bertsky commented Feb 12, 2024

I know this is a draft but it is a useful improvement even without further changes to the API - can we merge?

Sure. Will try to be more bold next time.

@kba kba merged commit ebd01c0 into OCR-D:master Feb 12, 2024
@bertsky bertsky deleted the workspace-validator-page-checks-loop branch June 6, 2024 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants