Repository: mit-ll-responsible-ai/hydra-zen

Issue:
hydra_partial=True and hydra_recursive=False should be permitted
Thanks to #110  we don't need to rely on recursive instantiation to implement `hydra_partial=True` anymore. I.e. we can get rid of:

https://github.com/mit-ll-responsible-ai/hydra-zen/blob/5f48f4b0c408a8a25ed8d5c2aa66b2316e9d8118/src/hydra_zen/structured_configs/_implementations.py#L658-L662

Discussion:

Patch:
diff --git a/src/hydra_zen/structured_configs/_implementations.py b/src/hydra_zen/structured_configs/_implementations.py
index 5bddae30..0b06ce47 100644
--- a/src/hydra_zen/structured_configs/_implementations.py
+++ b/src/hydra_zen/structured_configs/_implementations.py
@@ -681,12 +681,6 @@ def builds(
     if any(not (is_dataclass(_b) and isinstance(_b, type)) for _b in builds_bases):
         raise TypeError("All `build_bases` must be a tuple of dataclass types")
 
-    if hydra_partial is True and hydra_recursive is False:
-        raise ValueError(
-            _utils.building_error_prefix(target)
-            + "`builds(..., hydra_partial=True)` requires that `hydra_recursive=True`"
-        )
-
     if hydra_meta is None:
         hydra_meta = {}
 


Test patch:
diff --git a/tests/test_hydra_behaviors.py b/tests/test_hydra_behaviors.py
index ae2fdeba..5d7b7964 100644
--- a/tests/test_hydra_behaviors.py
+++ b/tests/test_hydra_behaviors.py
@@ -28,9 +28,6 @@ def f_three_vars(x, y, z):
     name=st.none() | st.sampled_from(["NameA", "NameB"]),
 )
 def test_builds_sets_hydra_params(convert, recursive, sig, partial, name, meta, kwargs):
-    if partial and not recursive:
-        assume(False)
-
     out = builds(
         f_three_vars,
         hydra_convert=convert,
diff --git a/tests/test_validation.py b/tests/test_validation.py
index 6b144161..ca7818bf 100644
--- a/tests/test_validation.py
+++ b/tests/test_validation.py
@@ -61,11 +61,6 @@ def test_builds_returns_a_dataclass_type():
     assert is_dataclass(conf) and isinstance(conf, type)
 
 
-def test_builds_hydra_partial_raises_if_recursion_disabled():
-    with pytest.raises(ValueError):
-        builds(dict, hydra_partial=True, hydra_recursive=False)
-
-
 @given(everything_except(Mapping, type(None)))
 def test_builds_hydra_meta_not_mapping_raises(not_a_mapping):
     with pytest.raises(TypeError):