Closed martinberoiz closed 3 months ago
This looks good so far!
But it's not implemented in the code. I wonder if it would be better to implement it before merging?
E.g. make version
an attribute of the Catalog
class, whose value is somehow set automatically to match the current version of the package?
ooh, I see what you mean... I didn't think about that, but I think your solution makes sense. Let me try adding it like you suggested.
I don't have much experience with dataclasses and typing in python, does this change make sense to you?
from . import __version__
...
@dataclasses.dataclass
class Catalog:
"""Contains events detected/analyzed by a pipeline.
Fields
------
version: str
The schema version.
catalog_name: str
...
"""
version: str = ".".join(__version__.split(".")[:2])
I thought maybe we don't include the patch part of the version ("1.0" instead of "1.0.0")
@jroulet How about now?
Looks good. Is it good to merge now?
Yes, go ahead
Adds a schema version to the schema + linting.