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

adding more blinka repos #192

Merged
merged 3 commits into from
Nov 5, 2020

Conversation

FoamyGuy
Copy link
Contributor

@FoamyGuy FoamyGuy commented Nov 2, 2020

I think this may be what is needed to resolve #189.

I tried testing it out locally by running circuitpython_libraries.py I found that I had to insert my github username somewhere to get it working. And once I did that it seemed to start running, but then reported hitting my github API rate limit and started sleeping for ~1hr before presumably continuing.

I'm not certain what the rate limit is set to, nor how many calls this script is attempting to make, so I'm not sure if it's actually practical for me to be able to test it or not.

Either way I am happy to add or change anything else that needs to get updated for this if someone can point me in the right direction.

@FoamyGuy FoamyGuy requested a review from a team November 2, 2020 18:01
@makermelissa
Copy link
Collaborator

I think it will be more involved than this. For instance this line has the repo hardcoded:
https://github.com/adafruit/adabot/blob/master/adabot/circuitpython_libraries.py#L160

@FoamyGuy
Copy link
Contributor Author

FoamyGuy commented Nov 2, 2020

Good catch, thank you!

The latest commit is an attempt to fix that, but is still untested.

I can try to spend some time this week working my way through the logic in this script to see if there are more changes that will be needed. Maybe there is some way I can tweak it some to use fewer API calls to try to narrow down my testing to just the portion I am actively changing.

@makermelissa
Copy link
Collaborator

I think I remember hearing something about an adabot console, which may be the correct way to test this, but don't have much information on that.

@FoamyGuy
Copy link
Contributor Author

FoamyGuy commented Nov 2, 2020

It may be an issue of authenticated API calls vs. unauthenticated ones as well. It seems the rate limit is much higher for authenticated ones so perhaps it's just a matter of getting it to make the requests from my user instead of unauthenticated.

@FoamyGuy
Copy link
Contributor Author

FoamyGuy commented Nov 4, 2020

I think we might be good to go with the latest version. I was able to successfully run the report by providing my username and token in an environment variable and it did increase my API rate limit enough that I can have about 3 tries per hour if it completes the full thing.

Here is the Blinka section that it generated:

### Blinka
* 11 pull requests merged
  * 6 authors - twa127, jolesieur, michaellass, dmanla, FoamyGuy, makermelissa
  * 2 reviewers - ladyada, makermelissa
* 4 open pull requests
  * https://github.com/adafruit/Adafruit_Python_PureIO/pull/1 (Open 1613 days)
  * https://github.com/adafruit/Adafruit_Blinka/pull/304 (Open 149 days)
  * https://github.com/adafruit/Adafruit_Blinka_bleio/pull/20 (Open 41 days)
  * https://github.com/adafruit/Adafruit_Blinka_Displayio/pull/41 (Open 16 days)
* 5 closed issues by 2 people, 2 opened by 2 people
* Removed Hacktoberfest label from 0 issues.
* 44 open issues
  * https://github.com/adafruit/Adafruit_Blinka/issues
* PyPI Downloads in the last week: 1733
Number of supported boards: 52

Process finished with exit code 0

at the beginning it printed this:

Found 273 repos to check.
Found 248 submodules in the bundle.

which does show 6 additional repos as compared to the output from actions in the most recent report run: https://github.com/adafruit/adabot/runs/1345816601?check_suite_focus=true#step:9:14

For reference here is the output from the report without the changes in this PR:

### Blinka
* 4 pull requests merged
  * 3 authors - dmanla, twa127, michaellass
  * 1 reviewers - makermelissa
* 1 open pull requests
  * https://github.com/adafruit/Adafruit_Blinka/pull/304 (Open 148 days)
* 2 closed issues by 1 people, 1 opened by 1 people
* Removed Hacktoberfest label from 0 issues.
* 27 open issues
  * https://github.com/adafruit/Adafruit_Blinka/issues
* PyPI Downloads in the last week: 1687
Number of supported boards: 52

@makermelissa
Copy link
Collaborator

makermelissa commented Nov 5, 2020

This looks good. Maybe make it so that 2 repos lists don't need to be updated by doing something like:

blinka_repos = [
    "Adafruit_Blinka",
    "Adafruit_Blinka_bleio",
    "Adafruit_Blinka_Displayio",
    "Adafruit_Python_PlatformDetect",
    "Adafruit_Python_PureIO",
    "Adafruit_Blinka_PyPortal",
    "Adafruit_Python_Extended_Bus",
]

repos = common_funcs.list_repos(
    include_repos=tuple(blinka_repos)
    + ("CircuitPython_Community_Bundle", "cookiecutter-adafruit-circuitpython")
)

Copy link
Collaborator

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

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

Looks great.

@makermelissa makermelissa merged commit f165e24 into adafruit:master Nov 5, 2020
@FoamyGuy
Copy link
Contributor Author

FoamyGuy commented Nov 5, 2020

Thanks @makermelissa, its much nicer this way without the duplicated list. I didn't know it was so easy to concatenate tuples together like that.

@makermelissa
Copy link
Collaborator

Yeah, it's pretty easy with Python. This was a little trickier since we're concatenating a list and tuple, hence the tuple wrapper. Also, we could have made the blinka list a tuple instead of a list in order to simplify things, but I wasn't worried about adabot needing to be super memory efficient.

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.

Add more libraries to Adafruit Blinka statistics
2 participants