-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lint_er.py: if there's no metadata folder, script doesn't run til the end #18
Comments
Since we allow empty metadata folders, maybe the simplest solution is to put in an empty metadata folder when this happens. Otherwise, something like prsv-tools/src/prsv_tools/ingest/lint_er.py Line 104 in ea7bf2a
Maybe we should add a block to all metadata folders like this
Although that would be pretty repetitive. The other option is to put some more logic in |
Yeah, I am still thinking about a strategy of this. Your method (if not
metadata_path.exists():) was what I was thinking. There are four functions
that depend on metadata_path.iterdir(), so maybe this is not too bad. I am
a bit hesitant on putting more logic into lint_package, because I quite
like how simple and "flat" it is currently for readability. But we can try
that too!
…On Mon, Aug 21, 2023 at 11:37 AM Nick Krabbenhoeft ***@***.***> wrote:
Since we allow empty metadata folders, maybe the simplest solution is to
allow empty metadata folders.
Otherwise, something like
https://github.com/NYPL/prsv-tools/blob/ea7bf2ab978edfc74d48fcc01222a84a3c20b5b8/src/prsv_tools/ingest/lint_er.py#L104
should return True if the metadata folder is missing.
Maybe we should add a block to all metadata folders like this
if not metadata_path.exists():
logging.info('no metadata folder'
return True
Although that would be pretty repetitive.
The other option is to put some more logic in lint_package that first
tests if a metadata folder exists and then chooses which functions to run.
—
Reply to this email directly, view it on GitHub
<#18 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYEXVZZMPSO2M2XGIJFNXV3XWN6ELANCNFSM6AAAAAA3YRU3RE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
*Hilary Shiue (she/her/hers)*
Digital Repository Coordinator
Digital Preservation Program
Library Services Center
*The New York Public Library *31-11 Thomson Avenue, Long Island City, NY
11101
917.229.9580 | x39580
|
Edited my response, since my first idea was nonsensical |
functions with "metadata_path.iterdir()" would throw FileNotFoundError because the metadata path doesn't exist.
The text was updated successfully, but these errors were encountered: