https://github.com/RadioAstronomySoftwareGroup/pyuvdata
Revision 16b1cd62aec168d95695e3605dba8f616b36aceb authored by pyxieloustar on 01 November 2021, 15:42:05 UTC, committed by Bryna Hazelton on 01 November 2021, 18:26:43 UTC
1 parent c150677
Tip revision: 16b1cd62aec168d95695e3605dba8f616b36aceb authored by pyxieloustar on 01 November 2021, 15:42:05 UTC
address comments, keyword depracation, docstrings
address comments, keyword depracation, docstrings
Tip revision: 16b1cd6
branch_scheme.py
# -*- mode: python; coding: utf-8 -*-
# Copyright (c) 2020 Radio Astronomy Software Group
# Licensed under the 2-clause BSD License
"""Define branch_scheme for versioning."""
def branch_scheme(version): # pragma: nocover
"""
Local version scheme that adds the branch name for absolute reproducibility.
If and when this is added to setuptools_scm this function and file can be removed.
"""
if version.exact or version.node is None:
return version.format_choice("", "+d{time:{time_format}}", time_format="%Y%m%d")
else:
if version.branch == "main":
return version.format_choice("+{node}", "+{node}.dirty")
else:
return version.format_choice("+{node}.{branch}", "+{node}.{branch}.dirty")
Computing file changes ...