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

Build up stargazer timeseries beyond 40k gazers using periodic snapshots #78

Merged
merged 19 commits into from
Sep 30, 2023

Conversation

jgehrcke
Copy link
Owner

WIP for #76.

@Torantulino
Copy link

Thank you for working on this, excited to see it merged!

Expectation: does not fail analyze.py if file
does not exist.
This is quite powerful, so this CSV file in the repo might
be of decent use for external applications:

- one data point per day at most
- surpasses the 40k limit
The test data file I have added here has a
date point that is early compared to
stars-raw.csv which should be ignored.

I manually inspected the resulting
report.html, it shows the 2023;1000 data point
in the plot.
I did this to see if resampling works well, found
a tiny issue -- see next commit
Make it so that the right-most data point
never goes into the future even if the
resample interval gets large.

The resample interval in the test suite is
~240 hours, and it became a little more than
a cosmetic problem: it looked like inventing
a data point from the (near) future :).
--views-clones-aggregate-inpath tests/data/A/views_clones_aggregate.csv \
--fork-ts-inpath=tests/data/A/forks.csv \
--stargazer-ts-inpath=tests/data/A/stars.csv \
--stargazer-ts-snapshot-inpath=tests/data/A/stars-snapshots.csv
Copy link
Owner Author

@jgehrcke jgehrcke Sep 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That cmdline arg is the decisive addition in this test.

@jgehrcke jgehrcke changed the title [WIP] build up stargazer timeseries beyond 40k gazers using periodic snapshots Build up stargazer timeseries beyond 40k gazers using periodic snapshots Sep 30, 2023
@jgehrcke
Copy link
Owner Author

Thank you for working on this, excited to see it merged!

Thank you for the encouragement @Torantulino; it sometimes helps in the open-source world.

My plan is to merge something still today to get some further testing done (I have pipelines set up that run this action from its main branch. I hope not too many others have that :)).

Will then do a little more maintenance work, potentially do a little more thinking. Then I will invite you to test this out from the main branch, and then if things look good I will make a new release.

Screenshot from local testing (synthetic data):

Screenshot from 2023-09-30 22-44-10

@jgehrcke jgehrcke merged commit 57fc0c2 into main Sep 30, 2023
1 check passed
@jgehrcke
Copy link
Owner Author

jgehrcke commented Sep 30, 2023

Such a 'tiny feature', so much code. Well well. State management as always is complex, but I start to feel good about this.

Tested this in action with

...
    steps:
      - name: GHRS
        uses: jgehrcke/github-repo-stats@HEAD

(note the @HEAD).

I think this has worked as expected.

@ntindle @Torantulino @Swiftyos if you want to help testing this before release then please switch to jgehrcke/github-repo-stats@HEAD -- I am then happy to read logs / inspect outcome myself. Otherwise I understand if you want to wait for this being on the RELEASE branch. Cheers!

@ntindle
Copy link

ntindle commented Sep 30, 2023

I'll let the team know!

@Swiftyos
Copy link

Swiftyos commented Oct 3, 2023

Thank you, I've deployed it to our repo now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants