Modify

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#21954 closed enhancement (fixed)

[Patch] Preset tag update: surface=DecoTurf → surface=

Reported by: stevel2520@… Owned by: team
Priority: normal Milestone: 22.03
Component: Internal preset Version:
Keywords: surface decoturf acrylic Cc:

Description

The value of the surface tag DecoTurf has been replaced by acrylic, it should be updated in the editor.

Attachments (2)

josm_21954.patch (728 bytes ) - added by skyper 2 years ago.
patch
josm_21954_validator.patch (1.1 KB ) - added by skyper 2 years ago.
patch for validator

Download all attachments as: .zip

Change History (11)

by skyper, 2 years ago

Attachment: josm_21954.patch added

patch

comment:1 by skyper, 2 years ago

Keywords: surface decoturf acrylic added; preset tag removed
Summary: Preset tag update: surface=DecoTurf → surface=acrylic[Patch] Preset tag update: surface=DecoTurf → surface=
Version: latest

I guess this change is ok. ~900 to ~2100 in favor of acrylic which is document on the wiki Tag:surface=acrylic.
I've attached a patch for the preset.
Do we need a validator rule?

Last edited 2 years ago by skyper (previous) (diff)

comment:2 by taylor.smock, 2 years ago

decoturf was added in r8123 (2015). The template for Key:surface has had surface=acrylic since 2020.

As far as the validator rule goes, I don't think so. TagInfo surface=decoturf indicates there are a total of 881 instances of surface=decoturf. Updating our preset will prevent the introduction of new instances (once everyone updates...). If this is an issue in a month or two (AKA someone is adding them using a newer version of JOSM) then maybe we should create a validator rule.

I think that someone should make a MR challenge to verify those surfaces. Or do a mechanical edit.

Anyway, I've updated Item:Q18703 (surface=decoturf) to redirect to Item:Q18772 (surface=acrylic) so that validators depending upon wiki data will flag decoturf.

comment:3 by taylor.smock, 2 years ago

Resolution: fixed
Status: newclosed

In 18404/josm:

fix #21954: Change decoturf to acrylic (patch by skyper)

comment:4 by taylor.smock, 2 years ago

Milestone: 22.03

by skyper, 2 years ago

Attachment: josm_21954_validator.patch added

patch for validator

comment:5 by skyper, 2 years ago

Anyway, I attached a patch for validator: josm_21954_validator.patch

comment:6 by taylor.smock, 2 years ago

I don't want to apply the validator patch (I think deprecated tagging, when it is a one->one mapping, should be done via a mechanical edit). But at the same time, adding it to the validator lets people know that the tagging changed, so they don't manually type it in.

I'd probably be happier if there was a process for removing the check from the mapcss validator (i.e., "once all versions of JOSM in use are later than r18404 or earlier than r8123, remove deprecation check for decoturf").

Anyway, I'll go ahead and apply it.

comment:7 by skyper, 2 years ago

I understand your dislike and I feel similar. Maybe, we need a jenkins test to check the tags in trunk/resources/data/validator/deprecated.mapcss and trunk/resources/data/validator/ignoretags.cfg against numbers of taginfo. Otherwise, I fear these files will grow in length for ever, carrying some kind of tag history.

comment:8 by taylor.smock, 2 years ago

I'm modifying your patch a bit so it looks like this:

/* #21954 decoturf was added to JOSM presets in r8123 and replaced with acrylic in r18404 */
*[surface=decoturf] {
  throwWarning: tr("{0} is deprecated", "{0.tag}");
  suggestAlternative: "surface=acrylic";
  fixAdd: "surface=acrylic";
  group: tr("deprecated tagging");
}

For the Jenkins test, we'd have to either create a minimal parser for mapcss in python/another scripting language, or have JOSM output the tags to look for. We could probably do a regex like \*\[([a-zA-Z=:_]*)\] {, and use group 1 to extract the key/tag. We would want to have a daily check for the tag, and only create a ticket to remove it if the tag has not been added for a year or so. I'll see if I can create a job in GitLab CI for this, since I don't have the ability to make Jenkins jobs.

We could not use TagInfo chronology -- we'd have to use the stats api, as they don't track little used tags in chronology (like surface=decoturf).

comment:9 by taylor.smock, 2 years ago

In 18405/josm:

see #21954: Change decoturf to acrylic, add validator check (patch by skyper, modified)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.