Open tversteeg opened 3 years ago
Format of what? The gef files, or the state we keep internally when we parsed it?
Format of what? The gef files, or the state we keep internally when we parsed it?
The whole Cpt
and Borehole
classes. So basically the parsed state.
Right, there is room for optimization here. I think we should consider a naive to_json
, but also a serialize
/ deserialize
. (with some options, e.g. `parquet, ipc, compression types).
For instance the columnar format of the DataFrame
can be stored in binary and be compressed. Which can save quite some wire transfer.
Why not use pydantic's BaseModel which makes it easy with json() and parse_raw()
Hi @tversteeg, this feature would be useful for some services I'm running. Ok if I put a PR in for this enhancement? How do you feel about usage of Pydantic?
Any PRs are greatly appreciated! Pydantic looks like a nice solution for this problem.
The current format is not serializable, so it can't be non-trivially sent over a network connection. We need to add
Cpt.from_json()
andCpt.to_json()
methods (same for Borehole).