https://github.com/RadioAstronomySoftwareGroup/pyuvdata
Revision 09b465b75e5472b07c3ae4219ae08e4895b41edf authored by pre-commit-ci[bot] on 08 August 2022, 22:51:39 UTC, committed by Bryna Hazelton on 09 August 2022, 18:47:19 UTC
updates:
- [github.com/pycqa/flake8: 5.0.2 → 5.0.4](https://github.com/pycqa/flake8/compare/5.0.2...5.0.4)
- [github.com/Lucas-C/pre-commit-hooks-bandit: v1.0.5 → v1.0.6](https://github.com/Lucas-C/pre-commit-hooks-bandit/compare/v1.0.5...v1.0.6)
1 parent c44c9d5
Raw File
Tip revision: 09b465b75e5472b07c3ae4219ae08e4895b41edf authored by pre-commit-ci[bot] on 08 August 2022, 22:51:39 UTC
[pre-commit.ci] pre-commit autoupdate
Tip revision: 09b465b
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