Giter Club home page Giter Club logo

Comments (9)

mforbes avatar mforbes commented on July 23, 2024

I still don't have a definitive answer for how to do this. Another option is to include a variable __version__ (name as per PEP8 at the top of the nbstripout.py file and then read this in, or just manually change both that and the contents in setup.py.

from nbstripout.

michaelaye avatar michaelaye commented on July 23, 2024

The python packaging guide offers 7 methods for doing this, just pick the one that you think fits best to your project:
https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/

from nbstripout.

michaelaye avatar michaelaye commented on July 23, 2024

but bumpversion and versioneer are certainly worth a look as well, depending on how easy they are to setup.

from nbstripout.

mforbes avatar mforbes commented on July 23, 2024

I tried bumpversion once, but found it not intunitive enough to use naturally when I only used it sporadically, so I stopped. That was a while ago - it might be better now. The idea is nice.

from nbstripout.

michaelaye avatar michaelaye commented on July 23, 2024

I had a quick look at versioneer, sounds easy enough to use after a few clear installation steps.

from nbstripout.

kynan avatar kynan commented on July 23, 2024

I have used versioneer in the past. It is quite "heavy" though, so I'm not sure it's worth the hassle for such a simple project.

from nbstripout.

kynan avatar kynan commented on July 23, 2024

@michaelaye Thanks for pointing out the various options. For something as simple as nbstripout maybe bumpversion is enough. I'll give it a go.

from nbstripout.

kynan avatar kynan commented on July 23, 2024

OK, reasonably happy with bumpversion from a quick test apart from missing support annotated tags: peritus/bumpversion#2, peritus/bumpversion#58, peritus/bumpversion#74.

from nbstripout.

kynan avatar kynan commented on July 23, 2024

Since I'm impatient I simply installed the bumpversion branch pr'ed in peritus/bumpversion#58:

pip install git+https://github.com/ekohl/bumpversion@annotated-tags

from nbstripout.

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.