fjuniorr / flowmapper

Mappings between elementary flows
MIT License
0 stars 1 forks source link

Add option to allow inclusion of generated unique id in mapping results (from python and cli) #29

Open fjuniorr opened 7 months ago

fjuniorr commented 7 months ago

I am really reluctant to add a field to the produced mapping which is not in the source data, even if it is reproducible. Everyone using the mapping lists will need to special case the logic for that field, and it is so much easier to just test if all provided fields match. Moreover, I think some people could assume that an id field is definitive and only try to match against that (and not find anything).

So I would prefer to make this a configurable option with a negative default.

Originally posted by @cmutel in https://github.com/fjuniorr/flowmapper/issues/27#issuecomment-1827169378

fjuniorr commented 6 months ago

In order to do the analysis for https://github.com/fjuniorr/flowmapper/pull/47#issuecomment-1841566693 it was extremely useful[^1] to have the generated unique id in the glad output.

I'm leaving this open until we decide how to best incorporate this into other export formats, such as Flowmap.to_randonneur and the --unmatched and --matched flags available in the CLI after https://github.com/fjuniorr/flowmapper-ci/issues/7.

[^1]: implemented in https://github.com/fjuniorr/flowmapper/commit/d161fb1005c5c15f3cf90bfa7b2502fa63d59ad2

fjuniorr commented 6 months ago

Just a reminder that in https://github.com/fjuniorr/flowmapper/commit/d161fb1005c5c15f3cf90bfa7b2502fa63d59ad2 I did not expose a flag --ensure-id in the CLI command flowmapper map, which is also useful.