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: add github stars based readme extraction and embedding #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

shahrukhx01
Copy link
Contributor

@shahrukhx01 shahrukhx01 commented Apr 14, 2023

Adds the following features:

  • Given the username of the GitHub user, fetch all of their stars
  • Extract a subset of metadata from the API response of GitHub
  • Fetch readme for each repo
  • Embed and store each repo with metadata

@shahrukhx01 shahrukhx01 self-assigned this Apr 14, 2023
@shahrukhx01
Copy link
Contributor Author

@nps1ngh please feel free to directly push your commits to this branch directly.


from acad_gpt.parsers.base_parser import BaseParser
from acad_gpt.parsers.config import GitHubMDParserConfig
from acad_gpt.utils.github_md_parser_utils import (
Copy link
Contributor

Choose a reason for hiding this comment

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

I think, we should keep this contained within a single module and not separate them out as utilities. What do you say? @shahrukhx01

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, please feel free to move things around. I’m quite open to changes in this module

repos = []

while True:
response = requests.get(f"{GITHUB_API_URL}/users/{github_username}/starred?page={page}")
Copy link
Contributor

Choose a reason for hiding this comment

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

does PyGithub not have anything for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nps1ngh i believe it does but then you’ve to do the hassle getting a authtoken. However, with this we hit the rate limit quite rapidly. Would you like to take a look at PyGithub then?

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.

2 participants