Map NSI-country-names to Osmose country names / Fix failing tests #2404
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See #2385
In some cases NSI uses a different country subdivision than Osmose.
This adds a map for such cases.
It doesn't fix cases where:
Also my map probably isn't complete, I went through it fairly quickly, but left the code to get the missing entries at the bottom.
Another thing that probably has to be done is to have some library to convert the 3-letter codes (like
fra
) to 2 letter codes (likefr
). Possibly https://github.com/pycountry/pycountryAlso fixes the tests, since the Marseille firefighter case isn't enabled for all of France
p.s. I don't like the map solution very much, since it'll be difficult to maintain, but as mentioned in the issue I don't see many good alternatives...
With the other PR (about incorrect country codes) merged, and ignoring "001", this would be the remaining list of unsupported countries