What should logging the provenance of the a codelist look like #46
Replies: 2 comments 1 reply
-
|
@oylenshpeegul i'd be super interested to hear about your thoughts on this. The first step would be to think about what the codelist.rs would look like with "logging" on. Specifically, I'm imagining a lightweight internal logger that captures key actions during the lifecycle of a codelist - something like a Vec of structured log lines that we could later write to a file, or expose via bindings. As a first step, I'm picturing output along the lines of: Initially this would just live inside the Codelist struct as a log field, but I expect it to grow over time. A few questions I’m thinking about: Logging
Saving more widelyThis also connects to something broader: I think we need to clarify and formalise the saving model. At the moment we have “save to JSON” and “save to CSV”, but these are very format-specific and slightly ambiguous about what’s actually being saved. It might be better to distinguish between two types of saving:
That split would let us define clearer and more consistent APIs for saving and loading, and reduce confusion about what each method is actually doing. Would love to know your thoughts - especially if you have any instinct on how to keep this ergonomic while still being flexible and future-proof givn that we want the python API to be pretty simple. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In an ideal world, the end product here would let a user recreate a codelist by following the log as a set of instructions. This would include where the codelist came from (i.e. loaded from file, manually created etc), what codes were added and when, what codes were removed, any manipulation of codes (like truncating or mapping - when we have that) etc.
If we start from the python api, i am imagining that we would have something like:
The logging would have a timestamp to allow us to order them.
Beta Was this translation helpful? Give feedback.
All reactions