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

Python Package Guide: Fix breakout box / admonition that shows a user how to rename their package if the name is taken on pypi #244

Open
3 tasks
Tyler-Bonnell opened this issue Apr 15, 2024 · 4 comments
Labels
help wanted We welcome a contributor to work on this issue! thank you in advance! pycascades sprintable

Comments

@Tyler-Bonnell
Copy link
Contributor

Tyler-Bonnell commented Apr 15, 2024

When setting up the TestPyPi upload for my custom package -- I noticed there was already a package with my name available in TestPyPi and PyPi. The Package Guide (https://www.pyopensci.org/python-package-guide/tutorials/publish-pypi.html) Step 3. Setup your TestPyPI account states to rename your package (to avoid duplicate names).

I am currently working through the process now, and it is unclear the steps that need to be taken to successfully rename the package?

  • Rename the associated GitHub repository (and local cloned folder)
  • Rename the package files within src/
  • Rebuild the dist files after renaming the package

These were the steps I am considering -- but I am unsure if there are others (what the ideal order of operations would be). It would be great if further documentation could be provided on this.

@lwasser lwasser added help wanted We welcome a contributor to work on this issue! thank you in advance! sprintable labels May 19, 2024
@lwasser
Copy link
Member

lwasser commented May 19, 2024

This issue relates to a documentation / tutorial page around what happens if you create a package locally, want to publish it to pypi and then learn AFTER that the name is already taken. it would walk a user through all of the places that they'd want to update things following best practices. this likely looks like

  1. Find a name that will work / isn't taken
  2. update pyproject.toml file
  3. update both your project and package directory
  4. update github repo name
  5. update removes to github repo (you don't have to do this but it's a good idea to keep things clear)
  6. publish to pypi to capture the name.
    i suspect you'd want to do this all in the same day so the new name doesn't get taken :)

@Tyler-Bonnell if i didn't capture this quite right please let me know!

@pb-413
Copy link
Contributor

pb-413 commented May 21, 2024

For me, the work is captured in the following two commits, with the second being optional but recommended.

  1. Update project name in pyproject.toml; update folder name under src (commit)
  2. Update README.md entries (commit)

More info about my experience under #261, including errors encountered when trying to have hyphens in new name.

pb-413 added a commit to pb-413/python-package-guide that referenced this issue May 21, 2024
@lwasser
Copy link
Member

lwasser commented May 31, 2024

@Tyler-Bonnell @pb-413 submitted a pr that i just merged - the text is here does that fix address your concerns?

(you have to open the dropdown on the page - the styles are odd but we can fix that later - that is a sphinx theme issue!.

@lwasser
Copy link
Member

lwasser commented Jul 12, 2024

I do want to keep this issue open. I think what we want to do is

  1. make that admonition visible to everyone (rather than a drop down link that people might miss)
  2. rename the admonition: How to rename your Python package if the name is already taken in PyPI // TestPyPi

Once we do that this issue is complete. this is a very beginner friendly task!!

@lwasser lwasser changed the title Python Package Guide: Changing Name of a Package (Pre-Existing TestPyPi/PyPi Packages with Same Name) Python Package Guide: Fix breakout box / admonition that shows a user how to rename their package if the name is taken on pypi Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted We welcome a contributor to work on this issue! thank you in advance! pycascades sprintable
Projects
Status: Beginner Friendly / Non Technical
Development

No branches or pull requests

3 participants