-
-
Notifications
You must be signed in to change notification settings - Fork 221
Missing documentation for calver #725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi buddies, any quick start for how to use it? |
Starting point is to use one of the Calver named Version shemes as per the readme The documentation rework in #880 will eventually provide better examples |
I tried to change the |
Current behavior is that on exact tags The Tag wins |
I'm either blind or the docs are still missing for this? Basically I wonder if/how can I achieve this:
|
@jziolkowski this would be something called "calver-by-month" its currently not implemented setuptools-scm/src/setuptools_scm/version.py Lines 323 to 413 in d665621
im open to adoption it to support calver-by-month but i cant implement it myself soon |
Hey there @RonnyPfannschmidt , I wasn't able to find instructions on setting up setuptools-csm with calver versions like you described ( |
[tool.setuptools_scm]
version_scheme = "calver-by-date" https://github.com/pypa/setuptools-scm/blob/main/pyproject.toml#L103 i need to add the docs |
I tried using |
The commit date is used else artifacts from archives/checkouts of old commits would report the wrong date It's necessary to disable version normalization to get padding as by default the python ecosystem strips leading zeroes |
Oh, I see. As for date format, is it possible to customize it? |
I figured it out myself! I followed in def myversion_func(version: ScmVersion) -> str:
from setuptools_scm.version import guess_next_date_ver
return version.format_next_version(
guess_next_date_ver,
node_date=version.node_date,
date_fmt='%Y.1%m.1%d',
version_cls=version.config.version_cls,
)
if __name__ == "__main__":
setup(use_scm_version={"version_scheme": myversion_func}) in [tool.setuptools_scm]
local_scheme = "node-and-timestamp"
#version_scheme = "calver-by-date"
root = "../../" |
I am afraid
This manifests itself in the package version being overriden and set to When I pin |
what version of setuptools is in use there? |
the output with SETUPTOOLS_SCM_DEBUG woudl help |
python3.12, built from source |
As for SETUPTOOLS_SCM_DEBUG do you need something specific from the output? It is much more verbose. |
The first significant difference between the two outputs is in this fragment: 8.2.0:
8.2.1:
So with 8.2.0 user-provided function is used for version_scheme (calver_func), while 8.2.1 uses |
I found out that this project supports calver (e.g. calver-by-date) but these options are not documented
The text was updated successfully, but these errors were encountered: