Modify

Opened 13 years ago

Closed 12 years ago

#9254 closed defect (fixed)

Too few colors, UTF8 issue

Reported by: anonymous Owned by: Ryan J Ollos
Priority: normal Component: TicketChartsMacro
Severity: normal Keywords: colors utf8 ascii
Cc: Ryan J Ollos, Ivanelson Nunes Trac Release: 0.11

Description (last modified by Ryan J Ollos)

Dear All i made a patch due to UTF8/ASCII issues (wip) and increased the number of usable colors.

The patch was from TicketCharts.py@8488.

Attachments (1)

TicketCharts.py.patch (6.6 KB) - added by alexandre.cabrol@… 13 years ago.
Patch to increase number of colors, and manage string convertion (extra chars éè..., into ascii)

Download all attachments as: .zip

Change History (15)

Changed 13 years ago by alexandre.cabrol@…

Attachment: TicketCharts.py.patch added

Patch to increase number of colors, and manage string convertion (extra chars éè..., into ascii)

comment:1 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 Changed 12 years ago by Ryan J Ollos

Cc: Ivanelson Nunes added

comment:3 Changed 12 years ago by Ivanelson Nunes

-class TicketChart(WikiMacroBase):
+class TicketChartMacro(WikiMacroBase):

It seems that there is a difference in the name of the module!?

comment:4 Changed 12 years ago by Ryan J Ollos

The class was recently renamed to conform to Trac conventions. You'll have to ignore that part of the patch.

comment:5 in reply to:  4 Changed 12 years ago by Ivanelson Nunes

Replying to rjollos:

The class was recently renamed to conform to Trac conventions. You'll have to ignore that part of the patch.

Yes class! Sorry. I will delete these lines patch.

comment:6 Changed 12 years ago by Ryan J Ollos

I'm not sure about the encoding that is done in the patch, and whether that is done correctly, but if the additional colors work well for you, I will go ahead and commit that portion of the patch.

comment:7 in reply to:  6 ; Changed 12 years ago by anonymous

Replying to rjollos:

I'm not sure about the encoding that is done in the patch, and whether that is done correctly, but if the additional colors work well for you, I will go ahead and commit that portion of the patch.

If the number of colors is less than the number of keys will be exceptions such as:

list index out of range

If the patch fails or colors are not nice I go back to the original version.

comment:8 Changed 12 years ago by Ivanelson Nunes

The patch failed!

ivan@dctvpsubu120012-bkp:/usr/local/lib/python2.7/dist-packages/TracTicketCharts-0.2dev-py2.7.egg/ticketcharts$ patch < TicketCharts.py.patch 
patching file TicketCharts.py
Hunk #1 FAILED at 90.
Hunk #2 succeeded at 223 (offset 23 lines).
Hunk #3 FAILED at 284.
Hunk #4 succeeded at 383 with fuzz 2 (offset 45 lines).
Hunk #5 FAILED at 374.
patch: **** malformed patch at line 77:

comment:9 Changed 12 years ago by Ryan J Ollos

The codebase has changed significantly since the patch was created. I wouldn't worry about applying the patch anyway, and just directly add the additional colors to the source.

comment:10 in reply to:  7 Changed 12 years ago by Ryan J Ollos

Replying to anonymous:

If the number of colors is less than the number of keys will be exceptions such as:

We should make sure to catch and handle that exception, or better yet, reuse the existing colors once they've all been exhausted. But more colors in the list can only help with this situation, right?

comment:11 in reply to:  9 Changed 12 years ago by Ivanelson Nunes

Replying to rjollos:

The codebase has changed significantly since the patch was created. I wouldn't worry about applying the patch anyway, and just directly add the additional colors to the source.

I copied the patch only the list of colors and manually insert the original. see:

https://dl.dropboxusercontent.com/u/35679162/Ticket_Status_by_Owner.PNG

I think it looks good.

comment:12 Changed 12 years ago by Ryan J Ollos

Owner: changed from aviram to Ryan J Ollos
Status: newassigned

Thanks for testing. I will apply the patch.

comment:13 Changed 12 years ago by Ryan J Ollos

The patch for increasing the number of colors looks good. However, to handle unicode in the output, we should encode as UTF-8, not ascii. That will be handled in #6904.

comment:14 Changed 12 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

(In [13246]) Fixes #9254: Increase number of colors from 6 to 119.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
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.