Skip to content

PyPi Support Proposal #2

@kumarabhirup

Description

@kumarabhirup

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 🙌

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions