Skip to content
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

Resource manager respecting processor's moduledir #904

Merged
merged 6 commits into from
Sep 4, 2022
Merged

Conversation

kba
Copy link
Member

@kba kba commented Aug 18, 2022

This implements proper support for processor's moduledir:

  • Processors have a new CLI option --dump-module-dir that prints the moduledir of the processor
  • When downloading a model
    • unless --location is explicitly overridden, resmgr will inspect the resource_location in a processor's ocrd-tool.json and select the first one
    • if the location is module, will get the directory via --dump-module-dir
  • For list-installed, looks up the directory via --dump-module-dir and will look in it as well.

This also removes the find_resources method which is mostly redundant with list-available

It is a draft because I introduced a bug where downloading a model duplicates all the entries for that executable. Will have to debug this further tomorrow.

@kba kba marked this pull request as ready for review August 30, 2022 16:02
@kba
Copy link
Member Author

kba commented Aug 30, 2022

It is a draft because I introduced a bug where downloading a model duplicates all the entries for that executable. Will have to debug this further tomorrow.

Debugged and ready to go.

@kba kba changed the title wip: resource manager respecting processor's moduledir Resource manager respecting processor's moduledir Aug 30, 2022
@kba kba mentioned this pull request Sep 4, 2022
@kba kba merged commit 52b621e into master Sep 4, 2022
@kba kba deleted the resmgr-moduledir branch September 4, 2022 14:04
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