-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* don't use unnecessary .keys() calls * Fixed Tuples to be length enforced unlike lists. This allows one to define a set length for an iterative argument * Fixed Tuples to be length enforced unlike lists. This allows one to define a set length for an iterative argument * Removed legacy backend and API (dataclasses and custom typed interface). Updated markdown save call to support advanced types so that saved configurations are now valid spock config input files. Changed tuples to support length restrictions. * updated versioneer * updated versioneer pt.2 * updating GitPython calls to get the correct info and to check parent directories that was causing git errors * added extra info to check for docker or k8s * removed block dump notation * added extra info write as comments to TOML. Fall back to no extra info for JSON and warn as comments are not allowed
- Loading branch information
Showing
40 changed files
with
421 additions
and
3,064 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Copyright 2019 FMR LLC <[email protected]> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# This file helps to compute a version number in source trees obtained from | ||
# git-archive tarball (such as those provided by githubs download-from-tag | ||
|
@@ -10,7 +6,7 @@ | |
# that just contains the computed version number. | ||
|
||
# This file is released into the public domain. Generated by | ||
# versioneer-0.18 (https://github.com/warner/python-versioneer) | ||
# versioneer-0.19 (https://github.com/python-versioneer/python-versioneer) | ||
|
||
"""Git implementation of _version.py.""" | ||
|
||
|
@@ -45,7 +41,7 @@ def get_config(): | |
cfg = VersioneerConfig() | ||
cfg.VCS = "git" | ||
cfg.style = "pep440" | ||
cfg.tag_prefix = "None" | ||
cfg.tag_prefix = "" | ||
cfg.parentdir_prefix = "None" | ||
cfg.versionfile_source = "spock/_version.py" | ||
cfg.verbose = False | ||
|
@@ -61,7 +57,7 @@ class NotThisMethod(Exception): | |
|
||
|
||
def register_vcs_handler(vcs, method): # decorator | ||
"""Decorator to mark a method as the handler for a particular VCS.""" | ||
"""Create decorator to mark a method as the handler of a VCS.""" | ||
def decorate(f): | ||
"""Store f in HANDLERS[vcs][method].""" | ||
if vcs not in HANDLERS: | ||
|
@@ -97,9 +93,7 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, | |
if verbose: | ||
print("unable to find command, tried %s" % (commands,)) | ||
return None, None | ||
stdout = p.communicate()[0].strip() | ||
if sys.version_info[0] >= 3: | ||
stdout = stdout.decode() | ||
stdout = p.communicate()[0].strip().decode() | ||
if p.returncode != 0: | ||
if verbose: | ||
print("unable to run %s (error)" % dispcmd) | ||
|
@@ -169,6 +163,10 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose): | |
raise NotThisMethod("no keywords at all, weird") | ||
date = keywords.get("date") | ||
if date is not None: | ||
# Use only the last line. Previous lines may contain GPG signature | ||
# information. | ||
date = date.splitlines()[-1] | ||
|
||
# git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant | ||
# datestamp. However we prefer "%ci" (which expands to an "ISO-8601 | ||
# -like" string, which we must then edit to make compliant), because | ||
|
@@ -304,6 +302,9 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): | |
# commit date: see ISO-8601 comment in git_versions_from_keywords() | ||
date = run_command(GITS, ["show", "-s", "--format=%ci", "HEAD"], | ||
cwd=root)[0].strip() | ||
# Use only the last line. Previous lines may contain GPG signature | ||
# information. | ||
date = date.splitlines()[-1] | ||
pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) | ||
|
||
return pieces | ||
|
@@ -342,18 +343,18 @@ def render_pep440(pieces): | |
|
||
|
||
def render_pep440_pre(pieces): | ||
"""TAG[.post.devDISTANCE] -- No -dirty. | ||
"""TAG[.post0.devDISTANCE] -- No -dirty. | ||
Exceptions: | ||
1: no tags. 0.post.devDISTANCE | ||
1: no tags. 0.post0.devDISTANCE | ||
""" | ||
if pieces["closest-tag"]: | ||
rendered = pieces["closest-tag"] | ||
if pieces["distance"]: | ||
rendered += ".post.dev%d" % pieces["distance"] | ||
rendered += ".post0.dev%d" % pieces["distance"] | ||
else: | ||
# exception #1 | ||
rendered = "0.post.dev%d" % pieces["distance"] | ||
rendered = "0.post0.dev%d" % pieces["distance"] | ||
return rendered | ||
|
||
|
||
|
@@ -389,7 +390,7 @@ def render_pep440_old(pieces): | |
The ".dev0" means dirty. | ||
Eexceptions: | ||
Exceptions: | ||
1: no tags. 0.postDISTANCE[.dev0] | ||
""" | ||
if pieces["closest-tag"]: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.