Comments (9)
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.
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.
but bumpversion
and versioneer
are certainly worth a look as well, depending on how easy they are to setup.
from nbstripout.
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.
I had a quick look at versioneer, sounds easy enough to use after a few clear installation steps.
from nbstripout.
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.
@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.
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.
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)
- `--dry-run` should exit non-0 if files would be updated HOT 1
- Should be agnosting on trailing blank lines HOT 9
- [Feature Request] Process Folders (Batch / Bulk) HOT 1
- Doesn't strip out pycharm metadata HOT 9
- New release HOT 2
- Replace cram with prysk HOT 2
- Read config from `setup.cfg` HOT 1
- Option to error on cell outputs exceeding `--max-size` HOT 4
- It is recommended to remove pytest-runnner from setup_requires in setup.py HOT 4
- Strip output_type=stderr only, with keep_output? HOT 4
- Possible nbstripout-fast integration HOT 6
- Prevent committing notebooks with errors in cell outputs HOT 6
- Specifying Python executable path in `nbstripout --install`
- 'nbstripout' is not recognized as an internal or external command, operable program or batch file. HOT 2
- Not compatible with `pre-commit-hooks/pretty-format-json` hook HOT 4
- `git config filter.nbstripout.extrakeys ` support for `attachments`? HOT 4
- Support setting defaults for command line arguments via git config
- No valid notebook detected HOT 4
- required = true by default or make doc more explicit about it HOT 5
- Support git-filter-repo HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nbstripout.