_origen.utility
¶
Submodules¶
Functions¶
reverse_bits()
: Undocumented.
-
_origen.utility.
reverse_bits
()¶
Classes¶
Location
: Helper class to store and query “location” types, which could be local paths, git URLs, as either SSH or HTTPS, or something else.Transaction
: Undocumented.
-
class
_origen.utility.
Location
¶ Helper class to store and query “location” types, which could be local paths, git URLs, as either SSH or HTTPS, or something else. The location need not be valid to create an instance of this class.
-
git
¶ If the location points to a Git repo, returns that repo URL.
Notes
Returns the Git repo for either HTTPS or SSH paths.
- Returns
Repo URL as a
str
, if the Location points to a Git repo None: Otherwise- Return type
str
-
git_https
¶ If the location points to a Git repo via HTTPS, returns that repo URL.
- Returns
Repo URL as a
str
, if the Location points to a Git repo via HTTPS None: Otherwise- Return type
str
-
git_ssh
¶ If the location points to a Git repo via SSH, returns that repo URL.
- Returns
Repo URL as a
str
, if the Location points to a Git repo via SSH None: Otherwise- Return type
str
-
path
¶ If the location points to an OS path, return that path.
- Returns
Repo URL as a pathlib.Path object, if the Location points to a local path. None: Otherwise
- Return type
pathlib.Path
-
target
¶ Returns the location’s target, regardless of what it may be.
- Returns
Location’s target as a
str
- Return type
str
-
url
¶ If the location points to a web URL, returns that URL.
- Returns
URL as a
str
, if the Location points to a URL None: Otherwise- Return type
str
-