Giter Club home page Giter Club logo

Comments (8)

woodruffw avatar woodruffw commented on July 18, 2024 2

This action wraps twine under the hood, which doesn't (currently) have a --dry-run or equivalent flag. I think it probably makes sense to try and have that kind of behavior upstreamed first so that gh-action-pypi-publish can re-expose it 🙂

from gh-action-pypi-publish.

webknjaz avatar webknjaz commented on July 18, 2024 1

I mean that checking the version is something for the underlying tool (Twine) to consider as it'd be something people would want to do locally and on other platforms (like GitLab).

Having it specific to GitHub Action does would mean that each of the other platforms would also need to reinvent the wheel. This project is meant as a thin wrapper, not a place for heavy features.

from gh-action-pypi-publish.

ahelwer avatar ahelwer commented on July 18, 2024 1

Okay, I will see what is possible using upstream

from gh-action-pypi-publish.

webknjaz avatar webknjaz commented on July 18, 2024 1

FTR, here's the endpoint that can potentially be used for the version presence: https://warehouse.pypa.io/api-reference/json.html#get--pypi--project_name---version--json.

Although, I don't know if it covers the case of a removed version (the releases are immutable and you cannot re-upload the same version/filename post removal, even if the project was deleted and the ownership changed).

from gh-action-pypi-publish.

ahelwer avatar ahelwer commented on July 18, 2024

Doesn't seem likely to happen since they closed this issue pypa/twine#207

Mostly I want to check:

  • Will authentication succeed?
  • Does the package version already exist?

It should be noted that the npm publish --dry-run command does neither of those things so is basically useless as far as I can tell, but whatever.

from gh-action-pypi-publish.

woodruffw avatar woodruffw commented on July 18, 2024

Ah yeah, I remember the rationale there: there's a good argument that twine (and this workflow) really don't do much at all on their own, so users who want to exercise them are better off running the full workflow against TestPyPI or similar rather than adding a new --dry-run mode.

However, given that TestPyPI has its own credentials and package namespace, using it to test for authentication/package existence is kind of moot...

from gh-action-pypi-publish.

webknjaz avatar webknjaz commented on July 18, 2024
  • Does the package version already exist?

Adding to what William said, this doesn't seem like something that should be specific to only one ecosystem wrapper (GitHub Action).

from gh-action-pypi-publish.

ahelwer avatar ahelwer commented on July 18, 2024

@webknjaz what do you mean?

from gh-action-pypi-publish.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.