Modify

Opened 11 years ago

Closed 11 years ago

Last modified 11 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 by Don-vip, 11 years ago

Excellent idea !

comment:2 by Don-vip, 11 years ago

Component: External presetCore validator
Milestone: 14.01

comment:3 by simon04, 11 years ago

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 by Don-vip, 11 years ago

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 by Don-vip, 11 years ago

OK, first part done: Rules and rules

comment:6 by Don-vip, 11 years ago

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 by Don-vip, 11 years ago

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

comment:8 by stoecker, 11 years ago

@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 by stoecker, 11 years ago

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 by stoecker, 11 years ago

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?

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

Replying to stoecker:

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

Proper solution, thanks :)

in reply to:  10 comment:12 by Don-vip, 11 years ago

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 by Don-vip, 11 years ago

In 6666/josm:

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

comment:14 by Don-vip, 11 years ago

Resolution: fixed
Status: newclosed

In 6670/josm:

fix #9508 - Centralized service for validator rules

comment:15 by stoecker, 11 years ago

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 :-)

in reply to:  15 comment:16 by simon04, 11 years ago

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 by Don-vip, 11 years ago

@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 by naoliv, 11 years ago

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 by simon04, 11 years ago

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. 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.