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

After #42 still errors when no forks #43

Closed
davidpfarrell opened this issue Nov 30, 2021 · 5 comments · Fixed by #44
Closed

After #42 still errors when no forks #43

davidpfarrell opened this issue Nov 30, 2021 · 5 comments · Fixed by #44

Comments

@davidpfarrell
Copy link
Contributor

211130-19:36:04.425 INFO: time window for stargazer/fork data: ('2020-02-18', '2021-11-28')
211130-19:36:04.425 INFO: custom time window for stargazer plot: ('2020-02-18', '2021-11-28')
Traceback (most recent call last):
  File "/analyze.py", line 1653, in <module>
    main()
  File "/analyze.py", line 134, in main
    add_fork_section(df_forks, sf_date_axis_lim, sf_starts_earlier_than_vc_data)
  File "/analyze.py", line 1244, in add_fork_section
    assert starts_earlier_than_vc_data is None
AssertionError
+ ANALYZE_ECODE=1
+ set -e
+ set +x
error: analyze.py returned with code 1 -- exit.
@jgehrcke
Copy link
Owner

Thank you! Yeah I will only release after having built automated tests : ).

@davidpfarrell
Copy link
Contributor Author

Yeah but I need tool tips now :) It was such joy reviewing my stats yesterday :)

I've re-forked the repo and added if len() checks around add_fork_section and add_stargazers_section - This will get me through for now.

I'll keep an eye out for further commits and/or releases.

Also feel free to lemme know any time you want me to give @main a try.

I doubt all 3 of my no-fork repos will get forks between now and then - so I'll be able to help test :)

jgehrcke added a commit that referenced this issue Dec 2, 2021
Fix #43, introduce bats-based test runner, do more mypy-based checking, improve report, improve makefile
@jgehrcke
Copy link
Owner

jgehrcke commented Dec 2, 2021

I've done quite a bit of work in #44 to get that bug covered in automated tests. Also added a fix.

Currently, make bats-test executes three scenarios:

± make bats-test
docker run --entrypoint "/bin/bash" -v /home/jp/dev/github-repo-stats:/cwd jgehrcke/github-repo-stats-base:bfc24d971 \
	-c 'cd /cwd && bats --print-output-on-failure tests/analyze.bats'
1..3
ok 1 analyze.py: snapshots: some, vcagg: yes, stars: some, forks: none
ok 2 analyze.py: snapshots: some, vcagg: yes, stars: none, forks: some
ok 3 analyze.py: snapshots: some, vcagg: yes, stars: some, forks: some

The test cases are defined here: https://github.com/jgehrcke/github-repo-stats/blob/3aa1455e03979b96fc197e622461644a274c66dc/tests/analyze.bats

Prior to the fix, test 2 and 3 both failed with the problem you have reported here.

@davidpfarrell
Copy link
Contributor Author

Gave the updated @main a try:

This repository has no forks yet.

👍

@jgehrcke
Copy link
Owner

jgehrcke commented Dec 2, 2021

Thank you for the feedback @davidpfarrell :).

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