pcdsutils.version.VersionProxy

class pcdsutils.version.VersionProxy[source]

Version handling helper that pairs with setuptools-scm.

This allows for pkg.__version__ to be dynamically retrieved on request by way of setuptools-scm.

This deferred evaluation of the version until it is checked saves time on package import.

This supports the following scenarios:

  1. A git checkout (.git exists)

  2. A git archive / a tarball release from GitHub that includes version

    information in .git_archival.txt.

  3. An existing _version.py generated by setuptools_scm

  4. A fallback in case none of the above match - resulting in a version of

    0.0.unknown

Attributes:
data

Methods

capitalize()

count(value)

index(value, [start, [stop]])

Raises ValueError if the value is not present.

maketrans(x[, y, z])

Return a translation table usable for str.translate().

casefold

center

encode

endswith

expandtabs

find

format

format_map

isalnum

isalpha

isascii

isdecimal

isdigit

isidentifier

islower

isnumeric

isprintable

isspace

istitle

isupper

join

ljust

lower

lstrip

partition

removeprefix

removesuffix

replace

rfind

rindex

rjust

rpartition

rsplit

rstrip

split

splitlines

startswith

strip

swapcase

title

translate

upper

zfill

__init__()[source]

Methods

__init__()

capitalize()

casefold()

center(width, *args)

count(value)

encode([encoding, errors])

endswith(suffix[, start, end])

expandtabs([tabsize])

find(sub[, start, end])

format(*args, **kwds)

format_map(mapping)

index(value, [start, [stop]])

Raises ValueError if the value is not present.

isalnum()

isalpha()

isascii()

isdecimal()

isdigit()

isidentifier()

islower()

isnumeric()

isprintable()

isspace()

istitle()

isupper()

join(seq)

ljust(width, *args)

lower()

lstrip([chars])

maketrans(x[, y, z])

Return a translation table usable for str.translate().

partition(sep)

removeprefix(prefix, /)

removesuffix(suffix, /)

replace(old, new[, maxsplit])

rfind(sub[, start, end])

rindex(sub[, start, end])

rjust(width, *args)

rpartition(sep)

rsplit([sep, maxsplit])

rstrip([chars])

split([sep, maxsplit])

splitlines([keepends])

startswith(prefix[, start, end])

strip([chars])

swapcase()

title()

translate(*args)

upper()

zfill(width)

Attributes

data