emodpy.utils module¶
-
class
emodpy.utils.
EradicationPlatformExtension
(value)¶ Bases:
enum.Enum
An enumeration.
-
LINUX
= ''¶
-
Windows
= '.exe'¶
-
-
class
emodpy.utils.
EradicationBambooBuilds
(value)¶ Bases:
enum.Enum
An enumeration.
-
GENERIC_LINUX
= 'DTKGENCI-SCONSLNXGEN'¶
-
GENERIC_WIN
= 'DTKGENCI-SCONSWINGEN'¶
-
GENERIC
= 'DTKGENCI-SCONSLNXGEN'¶
-
TBHIV_LINUX
= 'DTKTBHIVCI-SCONSRELLNXTBHIV'¶
-
TBHIV_WIN
= 'DTKTBHIVCI-SCONSWINTBHIV'¶
-
TBHIV
= 'DTKTBHIVCI-SCONSRELLNXTBHIV'¶
-
MALARIA_LINUX
= 'DTKMALCI-SCONSLNXMAL'¶
-
MALARIA_WIN
= 'DTKMALCI-SCONSWINMAL'¶
-
MALARIA
= 'DTKMALCI-SCONSLNXMAL'¶
-
HIV_LINUX
= 'DTKHIVCI-SCONSRELLNXHIV'¶
-
HIV_WIN
= 'DTKHIVCI-RELWINHIV'¶
-
HIV
= 'DTKHIVCI-SCONSRELLNXHIV'¶
-
DENGUE_LINUX
= 'DTKDENGCI-SCONSRELLNX'¶
-
DENGUE_WIN
= 'DTKDENGCI-VSRELWINALL'¶
-
DENGUE
= 'DTKDENGCI-SCONSRELLNX'¶
-
FP_LINUX
= 'DTKFPCI-SCONSRELLNX'¶
-
FP_WIN
= 'DTKFPCI-SCONSWINFP'¶
-
FP
= 'DTKFPCI-SCONSRELLNX'¶
-
TYPHOID_LINUX
= 'DTKTYPHCI-SCONSRELLNX'¶
-
TYPHOID_WIN
= 'DTKTYPHCI-SCONSWINENV'¶
-
TYPHOID
= 'DTKTYPHCI-SCONSRELLNX'¶
-
EMOD_RELEASE
= 'EMODREL-SCONSRELLNX'¶
-
RELEASE
= 'DTKREL-SCONSRELLNX'¶
-
-
class
emodpy.utils.
BambooArtifact
(value)¶ Bases:
enum.Flag
An enumeration.
-
ERADICATION
= 1¶
-
SCHEMA
= 2¶
-
PLUGINS
= 4¶
-
ALL
= 7¶
-
-
emodpy.utils.
get_github_eradication_url
(version: str, extension: emodpy.utils.EradicationPlatformExtension = <EradicationPlatformExtension.LINUX: ''>) → str¶ Get the github eradication url for specified release
- Parameters
version – Release to fetch
extension – Optional extensions. Defaults to Linux(None)
- Returns
Url of eradication release
-
emodpy.utils.
save_bamboo_credentials
(username, password)¶ Save bamboo api login credentials using keyring.
- Parameters
username (str) – bamboo api login username (e.g. somebody@idmod.org)
password (str) – bamboo api login password
-
emodpy.utils.
bamboo_api_login
()¶ Automatically login to bamboo, prompt for credentials if none are cached or there’s no login session.
-
emodpy.utils.
download_bamboo_artifacts
(plan_key: str, build_num: str = None, scheduled_builds_only: bool = True, artifact: emodpy.utils.BambooArtifact = <BambooArtifact.ERADICATION: 1>, out_path: str = None) → list¶ Downloads artifact(s) for a DTK Bamboo build plan to the specified path
- Parameters
plan_key (str) –
build_num (str) –
scheduled_builds_only (bool) –
artifact (BambooArtifact) –
out_path (str) – Output path to save file (default to current directory)
- Returns
Returns list of downloaded files on filesystem
-
emodpy.utils.
download_latest_bamboo
(plan: emodpy.utils.EradicationBambooBuilds, scheduled_builds_only: bool = True, out_path: str = None) → str¶ Downloads the Eradication binary for the latest successful build for a Bamboo Plan to specified path. Exists for backward compatibility, just a pass-thru to download_latest_eradication().
- Parameters
plan – Bamboo Plan key. for supported build
out_path – Output path to save file (default to current directory)
- Returns
Returns local filename of downloaded file
-
emodpy.utils.
download_latest_eradication
(plan: emodpy.utils.EradicationBambooBuilds, scheduled_builds_only: bool = True, out_path: str = None) → str¶ Downloads the Eradication binary for the latest successful build for a Bamboo Plan to specified path.
- Parameters
plan – Bamboo Plan key. for supported build
out_path – Output path to save file (default to current directory)
- Returns
Returns local filename of downloaded file
-
emodpy.utils.
download_latest_reporters
(plan: emodpy.utils.EradicationBambooBuilds, scheduled_builds_only: bool = True, out_path: str = None) → list¶ Downloads the reporter plugins for the latest successful build for a Bamboo Plan to specified path.
- Parameters
plan – Bamboo Plan key. for supported build
out_path – Output path to save file (default to current directory)
- Returns
Returns list of local filenames of downloaded files
-
emodpy.utils.
download_latest_schema
(plan: emodpy.utils.EradicationBambooBuilds, scheduled_builds_only: bool = True, out_path: str = None) → str¶ Downloads the schema.json for the latest successful build for a Bamboo Plan to specified path.
- Parameters
plan – Bamboo Plan key. for supported build
out_path – Output path to save file (default to current directory)
- Returns
Returns local filename of downloaded file