ForceBalance API  1.3
Automated optimization of force fields and empirical potentials
Classes | Functions | Variables
src._version Namespace Reference

Classes

class  NotThisMethod
 Exception raised if a method is not valid for the current scenario. More...
 
class  VersioneerConfig
 Container for Versioneer configuration parameters. More...
 

Functions

def get_keywords ()
 Get the keywords needed to look up the version information. More...
 
def get_config ()
 Create, populate and return the VersioneerConfig() object. More...
 
def register_vcs_handler (vcs, method)
 Decorator to mark a method as the handler for a particular VCS. More...
 
def run_command (commands, args, cwd=None, verbose=False, hide_stderr=False, env=None)
 Call the given command(s). More...
 
def versions_from_parentdir (parentdir_prefix, root, verbose)
 Try to determine the version from the parent directory name. More...
 
def git_get_keywords (versionfile_abs)
 Extract version information from the given file. More...
 
def git_versions_from_keywords (keywords, tag_prefix, verbose)
 Get version information from git keywords. More...
 
def git_pieces_from_vcs (tag_prefix, root, verbose, run_command=run_command)
 Get version from 'git describe' in the root of the source tree. More...
 
def plus_or_dot (pieces)
 Return a + if we don't already have one, else return a . More...
 
def render_pep440 (pieces)
 Build up version string, with post-release "local version identifier". More...
 
def render_pep440_pre (pieces)
 TAG[.post.devDISTANCE] – No -dirty. More...
 
def render_pep440_post (pieces)
 TAG[.postDISTANCE[.dev0]+gHEX] . More...
 
def render_pep440_old (pieces)
 TAG[.postDISTANCE[.dev0]] . More...
 
def render_git_describe (pieces)
 TAG[-DISTANCE-gHEX][-dirty]. More...
 
def render_git_describe_long (pieces)
 TAG-DISTANCE-gHEX[-dirty]. More...
 
def render (pieces, style)
 Render the given version pieces into the requested style. More...
 
def get_versions ()
 Get version information or return default if unable to do so. More...
 

Variables

dictionary LONG_VERSION_PY = {}
 
dictionary HANDLERS = {}
 

Function Documentation

◆ get_config()

def src._version.get_config ( )

Create, populate and return the VersioneerConfig() object.

Definition at line 42 of file _version.py.

◆ get_keywords()

def src._version.get_keywords ( )

Get the keywords needed to look up the version information.

Definition at line 23 of file _version.py.

◆ get_versions()

def src._version.get_versions ( )

Get version information or return default if unable to do so.

Definition at line 499 of file _version.py.

Here is the call graph for this function:

◆ git_get_keywords()

def src._version.git_get_keywords (   versionfile_abs)

Extract version information from the given file.

Definition at line 144 of file _version.py.

Here is the call graph for this function:

◆ git_pieces_from_vcs()

def src._version.git_pieces_from_vcs (   tag_prefix,
  root,
  verbose,
  run_command = run_command 
)

Get version from 'git describe' in the root of the source tree.

This only gets called if the git-archive 'subst' keywords were not expanded, and _version.py hasn't already been rewritten with a short version string, meaning we're inside a checked out source tree.

Definition at line 235 of file _version.py.

Here is the call graph for this function:

◆ git_versions_from_keywords()

def src._version.git_versions_from_keywords (   keywords,
  tag_prefix,
  verbose 
)

Get version information from git keywords.

Definition at line 174 of file _version.py.

Here is the call graph for this function:

◆ plus_or_dot()

def src._version.plus_or_dot (   pieces)

Return a + if we don't already have one, else return a .

Definition at line 322 of file _version.py.

◆ register_vcs_handler()

def src._version.register_vcs_handler (   vcs,
  method 
)

Decorator to mark a method as the handler for a particular VCS.

Store f in HANDLERS[vcs][method].

Definition at line 66 of file _version.py.

Here is the call graph for this function:

◆ render()

def src._version.render (   pieces,
  style 
)

Render the given version pieces into the requested style.

Definition at line 466 of file _version.py.

Here is the call graph for this function:

◆ render_git_describe()

def src._version.render_git_describe (   pieces)

TAG[-DISTANCE-gHEX][-dirty].

Like 'git describe –tags –dirty –always'.

Exceptions: 1: no tags. HEX[-dirty] (note: no 'g' prefix)

Definition at line 430 of file _version.py.

◆ render_git_describe_long()

def src._version.render_git_describe_long (   pieces)

TAG-DISTANCE-gHEX[-dirty].

Like 'git describe –tags –dirty –always -long'. The distance/hash is unconditional.

Exceptions: 1: no tags. HEX[-dirty] (note: no 'g' prefix)

Definition at line 452 of file _version.py.

◆ render_pep440()

def src._version.render_pep440 (   pieces)

Build up version string, with post-release "local version identifier".

Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty

Exceptions: 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty]

Definition at line 337 of file _version.py.

Here is the call graph for this function:

◆ render_pep440_old()

def src._version.render_pep440_old (   pieces)

TAG[.postDISTANCE[.dev0]] .

The ".dev0" means dirty.

Eexceptions: 1: no tags. 0.postDISTANCE[.dev0]

Definition at line 407 of file _version.py.

◆ render_pep440_post()

def src._version.render_pep440_post (   pieces)

TAG[.postDISTANCE[.dev0]+gHEX] .

The ".dev0" means dirty. Note that .dev0 sorts backwards (a dirty tree will appear "older" than the corresponding clean one), but you shouldn't be releasing software with -dirty anyways.

Exceptions: 1: no tags. 0.postDISTANCE[.dev0]

Definition at line 381 of file _version.py.

Here is the call graph for this function:

◆ render_pep440_pre()

def src._version.render_pep440_pre (   pieces)

TAG[.post.devDISTANCE] – No -dirty.

Exceptions: 1: no tags. 0.post.devDISTANCE

Definition at line 360 of file _version.py.

◆ run_command()

def src._version.run_command (   commands,
  args,
  cwd = None,
  verbose = False,
  hide_stderr = False,
  env = None 
)

Call the given command(s).

Definition at line 80 of file _version.py.

◆ versions_from_parentdir()

def src._version.versions_from_parentdir (   parentdir_prefix,
  root,
  verbose 
)

Try to determine the version from the parent directory name.

Source tarballs conventionally unpack into a directory that includes both the project name and a version string. We will also support searching up two directory levels for an appropriately named parent directory

Definition at line 122 of file _version.py.

Here is the call graph for this function:

Variable Documentation

◆ HANDLERS

dictionary src._version.HANDLERS = {}

Definition at line 61 of file _version.py.

◆ LONG_VERSION_PY

dictionary src._version.LONG_VERSION_PY = {}

Definition at line 60 of file _version.py.