tpaviot / ProcessScheduler

A Python package for automatic and optimized resource scheduling
https://processscheduler.github.io/
GNU General Public License v3.0
58 stars 17 forks source link

gantt task time format #146

Open cygnyx opened 1 month ago

cygnyx commented 1 month ago

I'm trying this library in a day/week timeframe instead of hour/minute.

I modified render_gantt_matplotlib to add another parameter: def render_gantt_plotly( solution: SchedulingSolution, fig_size: Optional[Tuple[int, int]] = None, show_plot: Optional[bool] = True, show_indicators: Optional[bool] = True, render_mode: Optional[str] = "Resource", sort: Optional[str] = None, fig_filename: Optional[str] = None, html_filename: Optional[str] = None, time_format: Optional[str] = "%H:%M" )

and later changed: times_str.append(t.strftime("%H:%M")) to: times_str.append(t.strftime(time_format))

Can this be included?

tpaviot commented 3 weeks ago

t.strftime is used in the render_gantt_matplotlib function, not plotly. Are you sure about the suggested change?

cygnyx commented 3 weeks ago

Yes, I was using it for a Gantt chart. I thought it was a minor change that would increase its suitability. But I have moved on to another approach - if this is inconsistent with your project’s goals, please close without making this change.

On Jun 18, 2024, at 9:58 PM, Thomas Paviot @.***> wrote:

t.strftime is used in the render_gantt_matplotlib function, not plotly. Are you sure about the suggested change?

— Reply to this email directly, view it on GitHub https://github.com/tpaviot/ProcessScheduler/issues/146#issuecomment-2177745038, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTUB2W3TSXC7IHENMWXMZLZIEFXHAVCNFSM6AAAAABH4OT62KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZXG42DKMBTHA. You are receiving this because you authored the thread.