gams / openkongqi

Outdoor air quality data
Apache License 2.0
3 stars 6 forks source link

Remove wildcard "*" when building UUID #72

Closed libokj closed 3 years ago

libokj commented 3 years ago

image

Replace wildcard with the respective region name when building the UUID (e.g. okq:cnemc:cn:cnemc:*:1524a:latest should be okq:cnemc:cn:cnemc:hunan:zhuzhou:1524a:latest).

Potentially relevant code: https://github.com/gams/openkongqi/blob/c7d94c2f14e85f0a64f3796a08ea3023b0f8681f/openkongqi/utils.py#L29

hrbonz commented 3 years ago

I think the best way to solve the current problem is to inject the bits covered by the wildcard as a prefix to the station UUID.

In the test example with us:*, the keys in openkongqi.stations._STATIONS_MAP are us:ca and us:oh.

TODO