-
-
Notifications
You must be signed in to change notification settings - Fork 409
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
Force constant version date length #1995
Conversation
d775e31
to
6c2f344
Compare
Codecov Report
@@ Coverage Diff @@
## master #1995 +/- ##
=======================================
Coverage 59.99% 59.99%
=======================================
Files 70 70
Lines 8111 8111
=======================================
Hits 4866 4866
Misses 3245 3245 📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
I feel like there's a better way to do this with a datetime transformation to ISO format? https://docs.python.org/3/library/datetime.html#datetime.date.isoformat |
Ok, then I should use |
@andrewfullard done |
@@ -2,7 +2,6 @@ | |||
|
|||
import sys | |||
from setuptools_scm import version_from_scm | |||
from setuptools_scm.version import guess_next_date_ver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import
@@ -2,7 +2,6 @@ | |||
|
|||
import sys | |||
from setuptools_scm import version_from_scm | |||
from setuptools_scm.version import guess_next_date_ver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import
iso_date = date(*release).isoformat() | ||
iso_date = iso_date.replace("-",".") | ||
|
||
version = f"{iso_date}.{str(build)}" | ||
version = version.rstrip(".0") if version.endswith(".0") else version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed?
Description
Currently, version names have the form
tardis-YYYY.MM.DD.B
with:Y: year
M: month
D: day
B: build number (if build number is >0, otherwise version is just
YYYY.MM.DD
)But for months from 1-9 and days from 1-9 the version is resolved as YYYY.M.D.
With this patch the number of digits is always 8.
Motivation and context
How has this been tested?
Locally run with the
tardis
env activated:python .ci-helpers/get_next_version.py
Examples
Type of change
Checklist