Skip to content

Comments

Registry docs addition#720

Open
brianhenn wants to merge 8 commits intomainfrom
registry-docs-addition
Open

Registry docs addition#720
brianhenn wants to merge 8 commits intomainfrom
registry-docs-addition

Conversation

@brianhenn
Copy link
Contributor

@brianhenn brianhenn commented Jan 6, 2026

Adds a test that ensures that registered config classes for ace are imported into the namespace for docs purposes. Adds some missing symbols covered by the test.

@pytest.mark.parametrize(
"config_registry_class",
[
CorrectorSelector,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thought is that these registries are tightly coupled to ace and therefore it's appropriate to test them here even if they actually reside in core.

MISSING_SYMBOLS.clear()


WHITELISTED_SYMBOLS = [ # used only for testing, not in __all__
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, could avoid permanently registering these classes and thus having to whitelist by using context managers in the test modules.

def test_registry_symbols_are_imported(config_registry_class):
registered_config_names = config_registry_class.get_available_types()
for registered_config_name in registered_config_names:
registered_config = config_registry_class.registry._types[
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relying on private registry._types here; could make public since we already make their name strings public.

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