Modify

Opened 3 years ago

Closed 15 months ago

#9254 closed defect (fixed)

Too few colors, UTF8 issue

Reported by: anonymous Owned by: rjollos
Priority: normal Component: TicketChartsMacro
Severity: normal Keywords: colors utf8 ascii
Cc: rjollos, ivanelson Trac Release: 0.11

Description (last modified by rjollos)

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@… 3 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 3 years ago by alexandre.cabrol@…

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

comment:1 Changed 15 months ago by rjollos

  • Description modified (diff)

comment:2 Changed 15 months ago by rjollos

  • Cc ivanelson added

comment:3 Changed 15 months ago by ivanelson

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

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

comment:4 follow-up: Changed 15 months ago by rjollos

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 15 months ago by ivanelson

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 follow-up: Changed 15 months ago by 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.

comment:7 in reply to: ↑ 6 ; follow-up: Changed 15 months 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 15 months ago by ivanelson

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 follow-up: Changed 15 months ago by 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.

comment:10 in reply to: ↑ 7 Changed 15 months ago by rjollos

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 15 months ago by ivanelson

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 15 months ago by rjollos

  • Owner changed from aviram to rjollos
  • Status changed from new to assigned

Thanks for testing. I will apply the patch.

comment:13 Changed 15 months ago by rjollos

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 15 months ago by rjollos

  • Resolution set to fixed
  • Status changed from assigned to closed

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

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.