Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transport Properties using Onsager Formalism #56

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions transport_analysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@

from . import _version


__version__ = _version.get_versions()["version"]
24 changes: 6 additions & 18 deletions transport_analysis/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,7 @@ def git_pieces_from_vcs(
env.pop("GIT_DIR", None)
runner = functools.partial(runner, env=env)

_, rc = runner(
GITS, ["rev-parse", "--git-dir"], cwd=root, hide_stderr=not verbose
)
_, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, hide_stderr=not verbose)
if rc != 0:
if verbose:
print("Directory %s not under git control" % root)
Expand Down Expand Up @@ -325,9 +323,7 @@ def git_pieces_from_vcs(
pieces["short"] = full_out[:7] # maybe improved later
pieces["error"] = None

branch_name, rc = runner(
GITS, ["rev-parse", "--abbrev-ref", "HEAD"], cwd=root
)
branch_name, rc = runner(GITS, ["rev-parse", "--abbrev-ref", "HEAD"], cwd=root)
# --abbrev-ref was added in git-1.6.3
if rc != 0 or branch_name is None:
raise NotThisMethod("'git rev-parse --abbrev-ref' returned error")
Expand Down Expand Up @@ -376,9 +372,7 @@ def git_pieces_from_vcs(
mo = re.search(r"^(.+)-(\d+)-g([0-9a-f]+)$", git_describe)
if not mo:
# unparsable. Maybe git-describe is misbehaving?
pieces["error"] = (
"unable to parse git-describe output: '%s'" % describe_out
)
pieces["error"] = "unable to parse git-describe output: '%s'" % describe_out
return pieces

# tag
Expand Down Expand Up @@ -407,9 +401,7 @@ def git_pieces_from_vcs(
pieces["distance"] = len(out.split()) # total number of commits

# commit date: see ISO-8601 comment in git_versions_from_keywords()
date = runner(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[
0
].strip()
date = runner(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]
Expand Down Expand Up @@ -497,9 +489,7 @@ def render_pep440_pre(pieces: Dict[str, Any]) -> str:
if pieces["closest-tag"]:
if pieces["distance"]:
# update the post release segment
tag_version, post_version = pep440_split_post(
pieces["closest-tag"]
)
tag_version, post_version = pep440_split_post(pieces["closest-tag"])
rendered = tag_version
if post_version is not None:
rendered += ".post%d.dev%d" % (
Expand Down Expand Up @@ -688,9 +678,7 @@ def get_versions() -> Dict[str, Any]:
verbose = cfg.verbose

try:
return git_versions_from_keywords(
get_keywords(), cfg.tag_prefix, verbose
)
return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, verbose)
except NotThisMethod:
pass

Expand Down
Loading