chromadol/base.py defines two different classes both named ChromaUris at module scope:
@appendable(item2kv=uuid_key)
@ValueCodecs.single_nested_value("uris")
class ChromaUris(ChromaCollection):
"""ChromaCollection but reading and writing only the 'uris' field."""
@appendable(item2kv=uuid_key)
@ValueCodecs.single_nested_value("metadata")
class ChromaUris(ChromaCollection):
"""ChromaCollection but reading and writing only the 'uris' field."""
The second definition (metadata-scoped) silently shadows the first (uris-scoped) at module scope, so chromadol.base.ChromaUris currently always resolves to the metadata-field class, and the uris-field class is unreachable by name from outside the module (only reachable if something captured a reference before the second class statement executed, e.g. within the same module body). The metadata-scoped class's docstring is also copy-pasted from the uris one ("...only the 'uris' field").
Likely fix: rename the second class to ChromaMetadata and fix its docstring. Worth a quick audit of chromadol/__init__.py's __all__/exports and any docs referencing ChromaUris for the metadata use case, since they may currently be describing the wrong name.
Noticed while landing #2 (#3) — unrelated to that fix, left untouched there.
chromadol/base.pydefines two different classes both namedChromaUrisat module scope:The second definition (metadata-scoped) silently shadows the first (uris-scoped) at module scope, so
chromadol.base.ChromaUriscurrently always resolves to the metadata-field class, and the uris-field class is unreachable by name from outside the module (only reachable if something captured a reference before the secondclassstatement executed, e.g. within the same module body). The metadata-scoped class's docstring is also copy-pasted from the uris one ("...only the 'uris' field").Likely fix: rename the second class to
ChromaMetadataand fix its docstring. Worth a quick audit ofchromadol/__init__.py's__all__/exports and any docs referencingChromaUrisfor the metadata use case, since they may currently be describing the wrong name.Noticed while landing #2 (#3) — unrelated to that fix, left untouched there.