Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Reduce reliance on GitHub API #513

Open
kallewesterling opened this issue Nov 3, 2021 · 3 comments
Open

Reduce reliance on GitHub API #513

kallewesterling opened this issue Nov 3, 2021 · 3 comments
Labels
bug Something isn't working @high High-priority issue

Comments

@kallewesterling
Copy link
Member

kallewesterling commented Nov 3, 2021

issue 1

@szweibel reports an issue with the GitHub API that complains a bit too much about overusing it. No wonder, since all the text snippets are run through the GitHub API. However, we need GitHub-flavored markdown translation somehow, because we rely on that quite heavily in the curricular markdown, if I remember correctly.

I'll start a list here of other repositories that might be of interest to build in (in place of my own caching system + reliance on the GitHub API):

There's also this relevant thread which might be helpful.

issue 2

A related issue is that the caching system should default to the built-in Python markdown converter, but that does not seem to happen according to @szweibel's reporting.

@kallewesterling
Copy link
Member Author

kallewesterling commented Nov 3, 2021

Here are the reports:

I've been looking into the Django app you've written, and this time when I run the build command, it breaks every time at the same place. I added a little print command and got this:
"documentation_url": "https://docs.github.com/en/free-pro-team@latest/rest/overview/resources-in-the-rest-api#secondary-rate-limits", "message": "You have exceeded a secondary rate limit. Please wait a few minutes before you try again."
But no matter how long I wait, it keeps giving that message!

...and...

Actually, relatedly I get this error:
File "/mnt/d/apps/django-app/backend/github.py", line 165, in __init__ self.parsed_data = self.parse() File "/mnt/d/apps/django-app/backend/github.py", line 512, in parse self.sections['frontmatter'] = self._fix_frontmatter() File "/mnt/d/apps/django-app/backend/github.py", line 643, in _fix_frontmatter install_link = 'shortcuts/install/' in url TypeError: argument of type 'NoneType' is not iterable

@kallewesterling kallewesterling added @high High-priority issue bug Something isn't working labels Nov 3, 2021
@szweibel
Copy link
Collaborator

szweibel commented Nov 3, 2021

It's always in a specific place, which is the weird thing. It fails on python manage.py buildworkshop --name command-line but succeeds on python manage.py buildworkshop --name python

@szweibel
Copy link
Collaborator

szweibel commented Nov 4, 2021

I made an edit to force use of the built-in markdown parser. The build command still fails at the same place, so it seems like the cause is something else.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working @high High-priority issue
Projects
None yet
Development

No branches or pull requests

2 participants