lmmx / tubeulator

TfL open data interface library
https://tubeulator.vercel.app
MIT License
5 stars 0 forks source link

Move renamings in `combine` into the station data model #41

Closed lmmx closed 7 months ago

lmmx commented 7 months ago

The CSV does not have the final say in the matter, my columns are my API. Create a global column namespace [through validation aliasing] instead of mutating upon first contact with the business logic.

If this is not possible in patito, then do it via a rename in the load_model helper, and instead of doing aliasing through fields, do it with a private attribute that stores a renaming mapping (but I’m pretty certain it’ll be doable with field aliases).

https://github.com/lmmx/tubeulator/blob/b271294b11d770ca63c8c96b68bb8ca6e9f36d66/src/tubeulator/network/combine.py#L14-L16