Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12860 closed defect (othersoftware)

Unit test fails because preset has moved GIT repository (?)

Reported by: mdk Owned by: team
Priority: normal Milestone:
Component: Unit tests Version: latest
Keywords: github Cc:

Description

It looks like the unit test
org.openstreetmap.josm.gui.preferences.map.TaggingPresetPreferenceTestIT.testValidityOfAvailablePresets
fails because it can't find preset icons:

ERROR: Failed to locate image 'https://raw.githubusercontent.com/yopaseopor/traffic_signs_preset_JOSM/master/traffic_signs/BE/BE_D9.png'
...
ERROR: Failed to locate image 'https://raw.githubusercontent.com/yopaseopor/traffic_signs_preset_JOSM/master/traffic_signs/BE/BE_F101b_FOOT_BICYCLE_HORSE.png'

but it looks like the repository has moved from
raw.githubusercontent.com/yopaseopor/traffic_signs_preset_JOSM
to
github.com/yopaseopor/traffic_signs_preset_JOSM
and also there is a little change in the Path ("blob"). You find the icons now at

https://github.com/yopaseopor/traffic_signs_preset_JOSM/blob/master/traffic_signs/BE/BE_C9.png

Attachments (0)

Change History (8)

comment:1 by stoecker, 9 years ago

Report this in the github project not here. The links are in the XML file, we don't invent anything additional. As the author supplies a zip, there should not be URL's in the icon fields at all, but only the names of the included icon files.

comment:2 by Don-vip, 9 years ago

Keywords: github added
Resolution: othersoftware
Status: newclosed

comment:3 by yopaseopor, 9 years ago

Can I supply the xml file instead of the zip file? It has +2800 icons (traffic signs) thus 25 folders (countries).

Last edited 9 years ago by yopaseopor (previous) (diff)

comment:4 by stoecker, 9 years ago

Using a xml file with links is not recommended. Each link will be loaded individually and that takes time.

There are two solutions.

  • The Zip variant with XML and icons icluded.
  • Using "data:" URL's to include the icons in the XML file.

Zip has the advantage of compression, whereas the data URL's waste additional space due to base64 encoding and the XML itself is also uncompressed and takes longer to load.

A question - If I understand correctly you moved from JOSM wiki to GIT for size limitations? I'm not aware we have any size limitations on JOSM wiki.

comment:5 by yopaseopor, 9 years ago

Yes, the maximum size per file or text is 2 MB (Well, I don't know exactly how it works the limits files but I had two errors of size when I had tried to "duplicate" Spain data for making Belgium before take the externalization option.

comment:6 by yopaseopor, 9 years ago

In other way I have a big error in preset "content is not allowed in prolog" . JOSM does not tell me where is the error (in a way I can find it and fix it - number of line (for example). The error exists when I try to add any traffic sign (folder traffic_sign/BE or traffic_sign/ES - for this reason I put all of them via URL). Any idea?

comment:7 by stoecker, 9 years ago

Your second error looks like an XML error. You can find these e.g. with xmllint or other similar tools.

Yes, we have a size limit for attachments, but that should not affect presets. In the simple case that the icon files to be attached exceed the size limit, simply attach more than one zip file with each containing a part of the icons.

comment:8 by yopaseopor, 9 years ago

Fixed. After 51 changes I have discovered in some of the 2500+ files some non-english characters (nor in the XML file).

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.