Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preset warning #10370

Closed
UKChris-osm opened this issue Jan 18, 2025 · 4 comments
Closed

Preset warning #10370

UKChris-osm opened this issue Jan 18, 2025 · 4 comments
Labels
question Not Actionable - just a question about something

Comments

@UKChris-osm
Copy link
Collaborator

When running npm run dist a moment ago, the following error was shown (along with quite a few presets):

Warning - no iD source preset found for brands/shop/gold_buyer

... but adding one of the Gold Buyers in iD, such as or en Cash seems to work fine.

What's causing the error message?

@UKChris-osm UKChris-osm added bug question Not Actionable - just a question about something labels Jan 18, 2025
@Snowysauce
Copy link
Collaborator

Snowysauce commented Jan 31, 2025

I kind of retraced the steps of the JS file, and this is what I came up with:

  • Every category file (e.g., brands/amenity/bank) is checked against the folder of presets at id-tagging-schema for a matching key-value pair (amenity/bank.json). Each individual entry in the files is also checked for something that matches even more specific conditions (e.g., "italian.json" in the restaurant subfolder of the presets for entries in brands/amenity/restaurants with cuisine set to italian), and if something is found there, the script inserts that preset in place of the general category file preset match for that entry.
  • Any category file without at least a matching key-value preset generates a warning. The only way to resolve the warning is to convince id-tagging-schema to create a preset for the key-value, and from my experience, that's much easier said than done. As of this writing, the full warning list is:
Warning - no iD source preset found for brands/amenity/food_sharing
Warning - no iD source preset found for brands/amenity/training
Warning - no iD source preset found for brands/club/freemasonry
Warning - no iD source preset found for brands/office/insurance_adjuster
Warning - no iD source preset found for brands/office/logistics
Warning - no iD source preset found for brands/office/mortgage
Warning - no iD source preset found for brands/shop/gold_buyer
Warning - no iD source preset found for brands/shop/mobile_phone_accessories
Warning - no iD source preset found for brands/shop/pest_control
Warning - no iD source preset found for brands/shop/plant_hire
Warning - no iD source preset found for brands/shop/power_tools
Warning - no iD source preset found for brands/shop/truck
Warning - no iD source preset found for brands/shop/truck_repair
Warning - no iD source preset found for operators/advertising/screen
Warning - no iD source preset found for operators/boundary/aboriginal_lands
Warning - no iD source preset found for operators/boundary/national_park
Warning - no iD source preset found for operators/boundary/protected_area
Warning - no iD source preset found for operators/emergency/water_rescue
Warning - no iD source preset found for operators/office/visa
Warning - no iD source preset found for operators/route/tracks
  • However, the source for the preset listing is presets.json in the dist folder - the script does not take a live read of id-tagging-schema's repository. Although a preset for shop/gold_buyer was added in December, there hasn't been an update to presets.json since August. This creates the disconnect you've seen where iD actually does have the preset for brands/shop/gold_buyer, but the NSI can't "see" it yet, so to speak, hence the error.

In summary, these warnings appear to be for missing code snippets that are entirely out of our control, and are probably best described as heads-up notices for anyone that actually wants to deal with the red tape at id-tagging-schema. Functionally, it doesn't matter if they ever exist as long as id-tagging-schema has a generic preset for the category key (e.g., shop/_yes.json for */shop/*). The presets in, say, brands/shop/power_tools can be searched for and added in iD just fine as-is.

EDIT: To round things out, I looked at operators/route/tracks, which doesn't have a generic preset in id-tagging-schema to fall back on. In these cases, the NSI presets for individual operators cannot be freely searched for, but they will still appear/take effect while editing any relations that match the NSI preset.

@Snowysauce
Copy link
Collaborator

I just left the full warning list over at openstreetmap/id-tagging-schema#362, but it's entirely up to id-tagging-schema if they want to address any of it.

@Snowysauce Snowysauce removed the bug label Jan 31, 2025
@matkoniecz
Copy link
Contributor

Warning - no iD source preset found for brands/shop/gold_buyer

note openstreetmap/id-tagging-schema#1374 that I made

it seems to be waiting for release, see https://github.com/openstreetmap/id-tagging-schema/releases

@Snowysauce
Copy link
Collaborator

I've edited dist_files.js to give more context to the "iD source preset" messages, and downgraded the messages themselves from warnings to general logging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Not Actionable - just a question about something
Projects
None yet
Development

No branches or pull requests

3 participants