mobiusbyte / bumpit Goto Github PK
View Code? Open in Web Editor NEWA small command line tool to bump tracked versions in your repository.
Home Page: https://pypi.org/project/bumpit/
License: MIT License
A small command line tool to bump tracked versions in your repository.
Home Page: https://pypi.org/project/bumpit/
License: MIT License
bumpit
needs to handle semver extensions properly. These are
release
build
Function next_version
has 5 arguments (exceeds 4 allowed). Consider refactoring.
Function _build_calver
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Describe the bug
Bumpit when invoked without the .bumpit.yaml
file gives a file not found error.
To Reproduce
Steps to reproduce the behavior:
pip install bumpit
bumpit -d
Expected behavior
No error, just help text saying file is missing.
Additional context
Traceback (most recent call last):
File "/home/jose/.virtualenvs/build_tools/bin/bumpit", line 8, in <module>
sys.exit(main())
File "/home/jose/.virtualenvs/build_tools/lib/python3.7/site-packages/bumpit/console/cli.py", line 48, in main
bumpit() # pragma: no cover
File "/home/jose/.virtualenvs/build_tools/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/jose/.virtualenvs/build_tools/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/jose/.virtualenvs/build_tools/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/jose/.virtualenvs/build_tools/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/jose/.virtualenvs/build_tools/lib/python3.7/site-packages/bumpit/console/cli.py", line 26, in bumpit
configuration = Configuration.parse(config)
File "/home/jose/.virtualenvs/build_tools/lib/python3.7/site-packages/bumpit/core/config.py", line 15, in parse
with open(file, "rb") as fh:
FileNotFoundError: [Errno 2] No such file or directory: '.bumpit.yaml'
For example, release/1.0.0
or v1.0.0
An app developer should be able to use bumpit as a library instead of just using the CLI.
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring.
https://codeclimate.com/github/mobiusbyte/bumpit/bumpit/core/vcs.py#issue_5dbf280f142864000100002f
Is your feature request related to a problem? Please describe.
Possibly, when used with a brand new jenkins machine git config --user.* is not setup correctly.
Pygit2 provides a cleaner interface to running git commands.
Describe the solution you'd like
bumpit.yaml
user:
name: username
email: [email protected]
Code sample:
import pygit2
tagger = pygit2.Signature('Bumpit Bot', '[email protected]')
repo.create_tag(name="version", repo.head.tatget.hex ,pygit2.GIT_OBJ_BLOB, tagger, "Next release")
References:
https://github.com/libgit2/pygit2/blob/5b015f7008c4c3079d72e948669bcd3964c00633/test/test_tag.py#L58
Edits
Added more details to examples and code sample in pygit2
Function _auto_transform
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Function run
has 5 arguments (exceeds 4 allowed). Consider refactoring.
Function _transform_numerical_part
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Current calver implementation is super naive. We need to support different token formats of CalVer.
Function build_formatter
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Function update
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.