Comments (4)
This is intentional as the default behavior, but you can set --pattern default-unprefixed
(or in Python: pattern=Pattern.DefaultUnprefixed
) to make the v
optional. You can also pass in custom patterns without having to patch the library's constant.
This is covered in the README: https://github.com/mtkennerly/dunamai#tips
Isn't a thing it should support from scratch as PEP440 does not require it ?
The main reason is to prevent false positives from tags that weren't meant to be a version. For example, without the v
, it would turn tags like 3.11-compat
into version 3.11compat0
.
from dunamai.
Ok thanks, but is avoiding user errors really more important than being compliant with standards... ?
- Both PEP440 ans SemVer doesn't have this prefix.
- if one is using dunamai, he would certainly use version identifier only as tag..
Would make more sense to have an option to disable it.
But anyway, the problem is not on my own code but through copier .
I will raise an issue on there side to see if they can add the corresponding option..
from dunamai.
Ok thanks, but is avoiding user errors really more important than being compliant with standards... ?
From my perspective, those standards apply to the final output version, but not to the tag itself. There may not be standards for tag naming, but there are at least common patterns, and I would say the v
prefix is very common, even if it's not universal. Just as an anecdotal example, the Mypy and Pylint repositories use v
, whereas Black and Poetry don't. There are pros and cons to both sides of this trade-off, but I do personally think that keeping the v
is a good default behavior.
if one is using dunamai, he would certainly use version identifier only as tag..
I'm someone who uses Dunamai, and my projects have v
in the tags 🙃 I think we would need some research first in order to say what most people do.
from dunamai.
You are right about the global usage, it is variable on projet / people.
But I thought the point of this lib was about standards, not random developers habits... That's actually why it is used on big projects isn't it ?
I see no good enougth reason to have a non-standardized format mandatory while standardized one are actually not supported by default.
Furthermore this library is advertized as 'standards-compliant version strings' (from readme).
I know it's supposed to be for writing version but again it's shame that the only accepted ones are non-standard by default for reading :-/
By the way, was not asking you if you agree to remove the 'v' bu just to make it optional.
from dunamai.
Related Issues (20)
- Could not properly parse with Version.parse HOT 9
- Possibly misleading vcs check message for git HOT 1
- Style is overwritten which causes validation of format regardless if user passed parameter HOT 15
- 1.16.0: pytest needs `setuptools` HOT 9
- sdist is missing tests HOT 1
- Wrong version being reported HOT 9
- Bump fails for lazy clone (GitLab CI/CD) with `tag-branch = "master"` HOT 2
- dunamai 1.18.0 silently does not produce version with `--strict` in CI HOT 2
- Git version detection fails if `log.excludeDecoration = refs/tags` set in git config HOT 2
- Support getting versions from VCS at a specified directory HOT 2
- Visual Studio Code Workspace Settings file is missing ending `}` HOT 1
- calver versioning HOT 1
- Remove python dependency upper bound HOT 1
- `test__version__from_fossil` fails without home HOT 6
- bump behavior different in command line and python API HOT 4
- "RuntimeError: Unable to detect version control system" HOT 3
- Add option for detecting only changed files as dirty HOT 1
- Confusing behavior (bug?) v0.0.0 fallback code does not work if there are *any* tags in the repo HOT 1
- Inconsistent distance for non-matching tags 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 dunamai.