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

PyPi Support Proposal #2

Open
kumarabhirup opened this issue May 26, 2020 · 1 comment
Open

PyPi Support Proposal #2

kumarabhirup opened this issue May 26, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@kumarabhirup
Copy link
Owner

kumarabhirup commented May 26, 2020

Project Overview

We should add the PyPi packages in the search dropdown and we should let users review them. Just like they can review NPM Packages :)

The project is a lerna monorepo.

  • packages/web is the frontend.
  • packages/backend is the backend.

The frontend uses Next.js and React.

The backend is a GraphQL Yoga Server with Queries and Mutations that query Database using Prisma 1.

How to start the development server instructions available in the README.

Files to look at in the Backend

Note: That API is just for 3rd party services to access ratings of a package. It isn't used by the frontend.

  • getPackageQuery.ts Line 25
    This is where we fetch data from the NPM API to get the data for an NPM package. In this same file, in the same way, we will write the code to fetch the data of a PyPi package.

  • searchPackageQuery.ts Line 22
    Here as you see, the API is fetching packages from NPM. We will now have to also fetch PyPi packages and merge them with the NPM results.
    We will sort the search results properly, on the frontend.

  • Every other mutation that writes/deletes/updates/flags the reviews, will have to be updated a little bit so that the mutation would understand that is it updating a PyPi package.

Files to look at in the Frontend

  • meta.js Line 18
    We will have to feature packages from PyPi as well.

  • Searchbox Component
    Searchbox will have to visually support PyPi results as well.

  • /packages/web/pages have a folder named npm for easy Next.js Routing. Now we will have to create similar folder and files for pypi as well so that users can review packages on /pypi route.


I hope the overview is clear enough, now we can create a Pull Request to add this feature.

If you have any questions, feel free to ask 🙌

@kumarabhirup kumarabhirup added the enhancement New feature or request label May 26, 2020
@Natureshadow Natureshadow self-assigned this May 26, 2020
@kumarabhirup kumarabhirup self-assigned this May 26, 2020
@hedyhli
Copy link

hedyhli commented Jul 31, 2020

Hello, I discovered pkgreview.dev a few minutes ago, and I also thought support for PyPI would be awesome, hope this gets implemented 😁

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

No branches or pull requests

3 participants