Giter Site home page Giter Site logo

Comments (4)

mtkennerly avatar mtkennerly commented on May 23, 2024

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.

cclecle avatar cclecle commented on May 23, 2024

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.

mtkennerly avatar mtkennerly commented on May 23, 2024

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.

cclecle avatar cclecle commented on May 23, 2024

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)

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.