Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support --start-date and --end-date #61

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Pranavchiku
Copy link

Potential fix for #33

With this now, we can do

% ./gh-skyline --user pranavchiku --year 2024 --debug --start-date 01-01-2024 --end-date 01-03-2024

And it generates pranavchiku-01-01-2024-01-03-2024-github-skyline

@chrisreddington
Copy link
Collaborator

Hey @Pranavchiku, thanks for looking into this. I've had a quick scan through and think this might need a little more thought through (happy to carry on bouncing ideas through this PR) before we start talking about deeper implementation details. A few quick concerns that pop up:

  • The amount of complexity for a user to decide their start date/end date or year may not be intuitive. I'm assuming the default would still be year, but then startDate and endDate is additional?
  • Including the year may not make as much sense if the user is not rendering the full year timeline. For example, what if a user generates it from June 2024 to June 2025?
  • The actual render of the skyline is based on there being a 53 weeks to divide them across (to account for leap years). What would the expectation be if a user decided to render a period which is not a year?

There's a fair amount of additional change that would be needed based upon the above questions, so I think it's worth us (collectively as a community) pausing and considering these first 😄

@Pranavchiku
Copy link
Author

Pranavchiku commented Jan 4, 2025

I'm assuming the default would still be year, but then startDate and endDate is additional?

I think we can remove --year, it will automatically infer startYear and endYear from the dates.

For example, what if a user generates it from June 2024 to June 2025?

Exactly, I was thinking same and hence we can remove --year.

What would the expectation be if a user decided to render a period which is not a year?

There can be two approaches:

  1. we shrink the base to match the timeperiod
  2. We increase skyline width dynamically and set a minimum base size

I tried it for a period of May 2024 to Aug 2024 ( GSoC ) period and it gives me the full base with few skylines.

% ./gh-skyline --user pranavchiku --debug --start-date 15-05-2024 --end-date 23-08-2024
image

My motivation behind this to make it gift-able item for GSoC / open source internship participants. Maybe we can add something like --gsoc or similar that can generate

@Pranavchiku
Copy link
Author

Pranavchiku commented Jan 4, 2025

I agree, we need to spend more time before making a final decision over the PR :)

Will be happy to be part of any discussions you are wiling to.

Edit: I marked PR as draft as it needs discussion.

@Pranavchiku Pranavchiku marked this pull request as draft January 4, 2025 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Review
Development

Successfully merging this pull request may close these issues.

2 participants