Skip to content

Commit

Permalink
add registry_prefix forward-argument to import_plugin (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
mschrimpf authored Aug 3, 2023
1 parent f773ef7 commit 82d086b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions brainscore_core/plugin_management/import_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def installation_preference():
return pref


def import_plugin(library_root: str, plugin_type: str, identifier: str):
def import_plugin(library_root: str, plugin_type: str, identifier: str, registry_prefix: str = None):
"""
Installs the dependencies of the given plugin and imports its base package:
Given the identifier `Futrell2018-pearsonr` from library_root `brainscore_language`,
Expand All @@ -87,7 +87,8 @@ def import_plugin(library_root: str, plugin_type: str, identifier: str):
:meth:`~brainscore_core.plugin_management.ImportPlugin.install_requirements` installs all requirements
in that directory's requirements.txt, and the plugin base package is imported
"""
importer = ImportPlugin(library_root, plugin_type, identifier)
importer = ImportPlugin(library_root=library_root, plugin_type=plugin_type, identifier=identifier,
registry_prefix=registry_prefix)

if installation_preference() != 'no':
importer.install_requirements()
Expand All @@ -102,4 +103,5 @@ def print_plugin_dir(library_root: str, plugin_type: str, identifier: str):

if __name__ == '__main__':
import fire

fire.Fire()

0 comments on commit 82d086b

Please sign in to comment.