Git Product home page Git Product logo

Comments (8)

di avatar di commented on July 19, 2024

Thanks for filing the issue!

I'm not sure I understand why the local version would be lower than what's on PyPI? Why would it be 1.3.0 and not 1.4.0?

from bump.

NexSabre avatar NexSabre commented on July 19, 2024

My mistake, this is an inaccurate example.
When we're implementing patches and we don't want to waste time changing patch numbers. It's enough for us to set minor/major and we don't want to add to our process that every time CI builds a package for us and it commits a change to the code with a new number.

We can then set myself to version 1.4.0 and all patches will be numbered via pypi.org.

from bump.

di avatar di commented on July 19, 2024

Wouldn't this just be the same as bumping with bump --patch? Why would the local version be different than what's on PyPI?

from bump.

NexSabre avatar NexSabre commented on July 19, 2024

The result for the first iteration will be the same as with --patch, but when we do it next time (and more without manually bumbing version), we can get a conflict at uploading file with the same version to the pypi.

from bump.

di avatar di commented on July 19, 2024

The usual workflow would be something like:

  • make some changes
  • run bump
  • commit/push/merge the changes
  • publish to pypi

That way whatever the version is, either locally, in your repo or CI environment, it's the same as the latest version on PyPI.

Based on that, I'm not sure what the scenario where running bump --patch one or multiple times would produce a version that's already on PyPI -- can you explain how that would happen?

from bump.

NexSabre avatar NexSabre commented on July 19, 2024

Sometimes we don't have the option of adding new versions to the code in the building process (pipeline is forbidden to use write access), and sometimes we forget to raise the patch version.

We originally used it with Artifactory, now I adapted it to pypi.org.

I added an additional condition:

local   |   pypi.org  |  after update 
1.2.9   |    1.3.0    |  -> 1.3.1
1.3.0   |    1.3.0    |  -> 1.3.1
1.3.0   |    1.3.1    |  -> 1.3.2
1.4.0   |    1.3.0    |  -> 1.4.0

from bump.

di avatar di commented on July 19, 2024

So you're increasing the version number when publishing, but not adding it back to the source code? Why not just ensure the version number is increased whenever changes are made?

This tool is primarily focused on taking the local source as the source of truth, and then bumping it. Introducing the potential for the current state on PyPI (or any other index) to change how this works is somewhat counter to the goals, I'm not sure if this is a use case it makes sense to support.

from bump.

NexSabre avatar NexSabre commented on July 19, 2024

Ok, no problem, I'll keep this change in my fork. Closing issue and PR #18

from bump.

Related Issues (13)

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.