https://github.com/RadioAstronomySoftwareGroup/pyuvdata
Revision 53a0ec1f2cb5e101c514697f45dbb96d0dd687d8 authored by Garrett Keating on 07 August 2020, 18:37:01 UTC, committed by Garrett Keating on 07 August 2020, 18:37:01 UTC
1 parent 47066bb
Raw File
Tip revision: 53a0ec1f2cb5e101c514697f45dbb96d0dd687d8 authored by Garrett Keating on 07 August 2020, 18:37:01 UTC
Added the new numpy requirement to the changelog
Tip revision: 53a0ec1
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 == "master":
            return version.format_choice("+{node}", "+{node}.dirty")
        else:
            return version.format_choice("+{node}.{branch}", "+{node}.{branch}.dirty")
back to top