Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#9508 closed enhancement (fixed)

Centralized service for validator rules

Reported by: naoliv Owned by: team
Priority: normal Milestone: 14.01
Component: Core validator Version:
Keywords: Cc:

Description

Likewise we have an option to select and enable external sources for map paint styles, tagging presets and plugins, couldn't we also have this service for a centralized validation rules?

As an example, we (the Brazilian community) are collecting a series of tests for our needs (if the ref tag follows a specific regex rule, for example) that aren't useful for other countries.
Other countries/regions could do the same.
Rules could be created and enabled for very specialized cases if needed.

The user could enable and disable tests as he needs and also always have the latest version (exactly how the plugins work).

Attachments (0)

Change History (19)

comment:1 Changed 6 years ago by Don-vip

Excellent idea !

comment:2 Changed 6 years ago by Don-vip

Component: External presetCore validator
Milestone: 14.01

comment:3 Changed 6 years ago by simon04

This requires the setup of some Trac machinery on (like for Styles plus http://josm.openstreetmap.de/styles).

Vincent, would you set that up? Then we could integrate the SourceEditor in JOSM.

comment:4 Changed 6 years ago by Don-vip

Owner: changed from team to Don-vip
Status: newassigned

Yep, I will do that :) I hope to be able to have enough time for 14.01 milestone (see 9538#comment3 for my idea). If not it will be for 14.02 :)

comment:5 Changed 6 years ago by Don-vip

OK, first part done: Rules and rules

comment:6 Changed 6 years ago by Don-vip

Owner: changed from Don-vip to team
Status: assignednew

Not sure to have a lot of time to work on it right now...

comment:7 Changed 6 years ago by Don-vip

Ticket #9538 has been marked as a duplicate of this ticket.

comment:8 Changed 6 years ago by stoecker

@Vincent:

I changed to use #!rules and not #!mapcss. Otherwise surely there will be any trouble in future, especially when we want to add an validator for correct rules. Also completed the server implementation.

comment:9 Changed 6 years ago by stoecker

Seems to work (also can be joined with styles and presets on one page).

Missing:

  • Editor support
  • Documentation in Wiki, especially I think the possibility, that Styles, Presets and Rules can be on one page should somehow be made clear
  • Check if Zip files with multiple elements is only downloaded once when really used multiple times (i.e. style and rule)

comment:10 Changed 6 years ago by stoecker

Do we want to manage the JOSM styles in Wiki also? In this case we'd need to add a locking mechanism like for the default entries in Maps-Page.

Currently "Maps" pages get validated, Styles, Presets and Rules not. An validator for the XML formats is easy to add. Is there something for MapCSS?

comment:11 in reply to:  8 Changed 6 years ago by Don-vip

Replying to stoecker:

I changed to use #!rules and not #!mapcss.

Proper solution, thanks :)

comment:12 in reply to:  10 Changed 6 years ago by Don-vip

Replying to stoecker:

Do we want to manage the JOSM styles in Wiki also?

I don't know if it's worth it.

By the way I'm implementing the GUI stuff right now :)

comment:13 Changed 6 years ago by Don-vip

In 6666/josm:

see #9508 - refactor validator preferences + handling of JScrollPane policies ("vertical as needed" / "horizontal as needed" are default policies)

comment:14 Changed 6 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 6670/josm:

fix #9508 - Centralized service for validator rules

comment:15 Changed 6 years ago by stoecker

I updated the site checker, so it also checks presets and styles and not only maps pages. Also added rules, but for the mapcss formats there is no validation engine available yet. Is there anything which can be used to verify basic validity of data format? Best would be some python code :-)

comment:16 in reply to:  15 Changed 6 years ago by simon04

Replying to stoecker:

Is there anything which can be used to verify basic validity of data format? Best would be some python code :-)

For the internal files, we have source:trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java

Writing another implementation in Python seems to be a lot of work …

comment:17 Changed 6 years ago by Don-vip

@naoliv: do you think you'll be able to share a custom rule before we release the tested version ? It would be great to see at least a community rule on the wiki :)

comment:18 Changed 6 years ago by naoliv

I am working on this :-)
I just need to migrate some rules from the old format (.cfg) to the new one and then I will publish it.

comment:19 Changed 6 years ago by simon04

In 6720/josm:

see #9508 - Don't print loading of internal MapCSS validator files

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.