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

Inject pypi overrides into search #192

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

blast-hardcheese
Copy link
Collaborator

Initial pass of this functionality, if a user searches for a package that we already know should be something else, just pretend that's what they typed.

An unintended consequence of this is giving better matches for package extensions in an ecosystem:

Before

Replit-Devon-Stewarts-MacBook-Pro:upm ((c7d056ef...)) dstewart$ make upm && ./cmd/upm/upm --lang python3-pip search discord
cd cmd/upm && go build -ldflags "-X 'github.com/replit/upm/internal/cli.version=${VERSION:-development version}'"
Name                  Description                                                                                                   Version
-------------------   -----------------------------------------------------------------------------------------------------------   -----------------
discord               A mirror package for discord.py. Please install that instead.                                                 2.3.2
discord2              A Python wrapper for the Discord API                                                                          2.0.1
discord-db            Helpfull db writen on sqlite3, already has channel vars, global user vars, server user vars and server vars   0.1.0
discord-experiments   A wrapper to the Discord Experiments API                                                                      0.0.1
discord-config        Easy config module for Discord bots                                                                           0.0.2
discord-logging       Transfer logs acquired by logging module to discord with webhook!                                             1.0
discord.py            A Python wrapper for the Discord API                                                                          2.3.2
discord-lib           Create discord.py clients from XML, JSON, yaml etc                                                            0.0.5
discord-interactive   A package allowing you to display interactive help in Discord easily                                          4.1.0
discord-cli           A simple command line interface for discord bots                                                              1.0.0
discord-android       Make your discord.py bots appear as if they are on a phone.                                                   1.1.0
discord-musicbot      MusicBot bot for Discord.                                                                                     0.0.3.dev20170604
discord-webhook       Easily send Discord webhooks with Python                                                                      1.3.0
discord.js            The Python module for discord.js.                                                                             1.0.7
discord-rpc           An Python wrapper for Discord RPC                                                                             4.0
discord-logger        Discord Logger is a custom message logger to Discord for Python 3                                             1.2.3
discord-emoji         Converter between discord emoji and unicode emoji.                                                            1.4.2
notify-discord        A simple python script to push notification on discord's channel using webhooks                               0.1
Justify-discord       Discord bot util                                                                                              1.0
dronefly-discord      Dronefly Discord library                                                                                      0.1.1

After

Replit-Devon-Stewarts-MacBook-Pro:upm ((c7d056ef...)) dstewart$ make upm && ./cmd/upm/upm --lang python3-pip search discord
cd cmd/upm && go build -ldflags "-X 'github.com/replit/upm/internal/cli.version=${VERSION:-development version}'"
Name                      Description                                                                                                            Version
-----------------------   --------------------------------------------------------------------------------------------------------------------   ------------
discord.py                A Python wrapper for the Discord API                                                                                   2.3.2
discord.py-ipc            A discord.py extension for inter-process communication.                                                                1.1.0
discord.py-Console        Executes commands from console while your bot is running.                                                              0.1.2
discord-apii-py           discord api wrapper made by zt#7380                                                                                    0.0.1
discord-py-dashboard      Веб-перехватчик и расширение discord.py на основе запросов для создания панели управления ботом.                       0.3.1
discord.py-paginator      A button & interactions pagination template for discord bots coded in discord.py                                       1.5.0
discord.py-pagination     Easily create pagination for your embeds.                                                                              0.0.5
discord-api.py            This is discord-api wrapper.                                                                                           0.2.1
discord.py-stubs          discord.py stubs                                                                                                       1.7.3
discord-interactions.py   A library around the Discord Interactions API                                                                          0.0.8
discord.py-self           A Python wrapper for the Discord user API                                                                              2.0.0
discord.py-fork           A fork of an Python wrapper for the Discord API                                                                        2.0.0a0
discord.py-unofficial     A python wrapper for the Discord API                                                                                   0.17.1
discord-py-interactions   Easy, simple, scalable and modular: a Python API wrapper for interactions.                                             5.11.0
discord-oauth2.py         Use Discord's OAuth2 effortlessly! Turns the auth code to a access token and the access token into scope infomation.   1.2.1
py-discord                A Discord API wrapper.                                                                                                 0.0.1
echo-discord.py           A Python wrapper for the Discord API                                                                                   1.2.6
django-discord-py         Easy to use, easy to setup discord bots with django integration                                                        2023.301.243
flare-discord.py          Provides a simple, single import cog to add a checkable page to your bot for uptime status monitoring                  1.0.0
py-discord-api            Python's Library for Discord API                                                                                       0.0.1

Initial pass of this functionality, if a user searches for a package that we already know should be something else, just pretend that's what they typed
@blast-hardcheese blast-hardcheese requested a review from a team as a code owner December 19, 2023 22:57
@blast-hardcheese blast-hardcheese requested review from airportyh and removed request for a team December 19, 2023 22:57
@blast-hardcheese blast-hardcheese added the enhancement New feature or request label Dec 19, 2023
@blast-hardcheese blast-hardcheese enabled auto-merge (squash) December 19, 2023 23:28
@blast-hardcheese blast-hardcheese requested review from cdmistman and removed request for airportyh December 19, 2023 23:30
@blast-hardcheese blast-hardcheese merged commit 0b61932 into main Dec 19, 2023
5 checks passed
@blast-hardcheese blast-hardcheese deleted the dstewart/feat/pypi-search-overrides branch December 19, 2023 23:39
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

Successfully merging this pull request may close these issues.

2 participants