https://github.com/RadioAstronomySoftwareGroup/pyuvdata
Revision 3407c4ee100c5ca271faa4f7cf2e7999e7f9e5ac authored by Matthew Kolopanis on 10 February 2021, 16:37:17 UTC, committed by Paul La Plante on 16 February 2021, 20:13:13 UTC
1 parent 6fe481f
Raw File
Tip revision: 3407c4ee100c5ca271faa4f7cf2e7999e7f9e5ac authored by Matthew Kolopanis on 10 February 2021, 16:37:17 UTC
remove parallel stuff, we can tackle this beast later if necessary
Tip revision: 3407c4e
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")
back to top