From 91a56b4bcc9385c4b99167fb067543b77c032a02 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jul 2022 11:31:34 -0400 Subject: [PATCH 1/2] Add repro as published in python/importlib_resources#253 --- hydra_plugins/dummy_plugin.py | 7 +++++++ setup.cfg | 10 ++++++++++ setup.py | 6 ++++++ test/__init__.py | 0 test/config/run.yaml | 2 ++ test/test.py | 8 ++++++++ 6 files changed, 33 insertions(+) create mode 100644 hydra_plugins/dummy_plugin.py create mode 100644 setup.cfg create mode 100644 setup.py create mode 100644 test/__init__.py create mode 100644 test/config/run.yaml create mode 100644 test/test.py diff --git a/hydra_plugins/dummy_plugin.py b/hydra_plugins/dummy_plugin.py new file mode 100644 index 00000000..033bbcda --- /dev/null +++ b/hydra_plugins/dummy_plugin.py @@ -0,0 +1,7 @@ +from hydra.core.config_search_path import ConfigSearchPath +from hydra.plugins.search_path_plugin import SearchPathPlugin + + +class Dummy(SearchPathPlugin): + def manipulate_search_path(self, search_path: ConfigSearchPath) -> None: + search_path.append(provider="dummy-search-path-plugin", path="pkg://test/config") \ No newline at end of file diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..ec2bf6f8 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,10 @@ +[metadata] +name = test + +[options] +python_requires = >= 3.8 +packages = test +install_requires = + hydra-core==1.1.0 + hydra-joblib-launcher==1.1.5 + importlib_resources==5.8.0 \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..bac24a43 --- /dev/null +++ b/setup.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python + +import setuptools + +if __name__ == "__main__": + setuptools.setup() diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/test/config/run.yaml b/test/config/run.yaml new file mode 100644 index 00000000..e75235df --- /dev/null +++ b/test/config/run.yaml @@ -0,0 +1,2 @@ +defaults: + - override hydra/launcher: joblib \ No newline at end of file diff --git a/test/test.py b/test/test.py new file mode 100644 index 00000000..01cec9c2 --- /dev/null +++ b/test/test.py @@ -0,0 +1,8 @@ +import hydra + +@hydra.main(config_path='.', config_name='run') +def test(cfg): + pass + +if __name__ == "__main__": + test() \ No newline at end of file From ac61ccedab3a1a89550434a999508579d53313c7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 3 Jul 2022 14:11:19 -0400 Subject: [PATCH 2/2] Add __init__, making 'test.config' a package. --- test/config/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test/config/__init__.py diff --git a/test/config/__init__.py b/test/config/__init__.py new file mode 100644 index 00000000..e69de29b