pypa / pypa/packaging.python.org

GitHub Actions tutorial: Problem with equal version names when uploading to test.pypi

Open
#804 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

type: enhancement type: question
Dominant language
Python
Stars
1.7k
Forks
1.7k
Avg merge
3d 12h
Merged PRs (30d)
4

Description

When following this guide I ran into a problem related to https://github.com/pypa/packaging.python.org/issues/777.

The point is that you cannot upload packages to pypi (or test.pypi) with the same (version) name. This definitely happens when uploading to test.pypi on every push. The workflow from this tutorial therefore fails even when running it for a second time with the following message:

This filename has already been used, use a different version.

A solution is given by @bhazelton with the script from https://github.com/RadioAstronomySoftwareGroup/pyuvdata/pull/931: https://gist.github.com/plaplant/0902f09e59166bac742bbd554f3cd2f9/raw/make_dev_version.sh

However this raises another issue (the one of filling up test pypi space) which is reported in https://github.com/pypa/packaging.python.org/issues/777.

Another solution (as implemented in the same PR mentioned above) is to only publish on test.pypi for tagged versions, same as for pypi. However this defeats the purpose of publishing to test.pypi as the same package is also directly published to pypi.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the GitHub Actions tutorial workflow that publishes to test.pypi, then review packaging.python.org issue 777 and the linked pyuvdata pull request and versioning script. Compare the repeated-upload failure with the proposed publishing behavior and document or implement a settled approach that allows the tutorial to be rerun successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python
Domain
ci-cd, documentation, release
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.