umonkey / treemap

A web app for crowd-mapping urban trees.
0 stars 1 forks source link

Feature/adding null default option of tree state #104

Closed Gregory108 closed 2 weeks ago

Gregory108 commented 2 weeks ago

Mapping from aerial imagery, i.e. preliminary mapping tree coordinates, in most cases is insufficient for ruling on tree.state -- only for coordinates.

Hence, a neutral category is necessary:

@umonkey help wanted!

PS: adding one value required changing or editing code in ~35 places with lots of boilerplate. I'd create a very low-priority refactoring issue for "folding" repetitive "ifs and [test]s" IF it is possible. -> Is it possible?

umonkey commented 2 weeks ago

The code looks OK. Tests usually tell you if there are issues. However, it would be much less code changes to add a new status value "unknown" instead of making it nullable.

Gregory108 commented 2 weeks ago

But test fails ^^^^^^^^^^^^^^^^^^^^^ expected `Option<String>`, found `String (and not even the one that I added by analogy)

umonkey commented 2 weeks ago

Fixed existing errors. I will test this later today. It would help if you could describe test steps.