Skip to content

Commit 480c4dd

Browse files
author
Mark Beacom
authored
Update to 0.2.2 (#109)
* Closes #105 - Add CloudEndure import entry * Closes #106 - Add version subcommand * Fixes #107 - Fix bad string sub * Closes #108 - Add classifiers and update patch to 0.2.2
1 parent b2abd73 commit 480c4dd

File tree

6 files changed

+60
-5
lines changed

6 files changed

+60
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SHA1 := $$(git log -1 --pretty=%h)
88
CURRENT_BRANCH := $$(git symbolic-ref -q --short HEAD)
99
LATEST_TAG := ${REPO_NAME}:latest
1010
GIT_TAG := ${REPO_NAME}:${SHA1}
11-
VERSION := v0.2.1
11+
VERSION := v0.2.2
1212

1313
info: ## Show information about the current git state.
1414
@echo "Github Project: https://github.com/${REPO_NAME}\nCurrent Branch: ${CURRENT_BRANCH}\nSHA1: ${SHA1}\n"

cloudendure/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .cloudendure import CloudEndure
2+
3+
__all__ = ["CloudEndure"]

cloudendure/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.2.1"
1+
__version__ = "0.2.2"

cloudendure/cloudendure.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from .events import Event, EventHandler
2222
from .exceptions import CloudEndureHTTPException, CloudEndureMisconfigured
2323
from .templates import TerraformTemplate
24+
from .utils import get_user_agent
2425

2526
HOST: str = "https://console.cloudendure.com"
2627
headers: Dict[str, str] = {"Content-Type": "application/json"}
@@ -107,6 +108,25 @@ def __init__(
107108
"Failed to authenticate with CloudEndure! Please check your credentials and try again!"
108109
)
109110

111+
def __repr__(self) -> str:
112+
"""Provide the representation for the CloudEndure object.
113+
114+
Returns:
115+
str: The string representation of the CloudEndure object.
116+
117+
"""
118+
return f"<CloudEndure - Project: {self.project_name}>"
119+
120+
@property
121+
def version(self) -> str:
122+
"""Display the CloudEndure module version.
123+
124+
Returns:
125+
str: The CloudEndure Python module version.
126+
127+
"""
128+
return get_user_agent()
129+
110130
def _get_role_credentials(self, name: str, role: str) -> Dict[str, Any]:
111131
_sts_client: boto_client = boto3.client("sts")
112132

cloudendure/config.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ def __init__(
6262
_config: PosixPath = Path(self.config_path)
6363
if not _config.exists():
6464
print(
65-
"No CloudEndure YAML configuration found! Creating it at: (%s)",
66-
self.config_path,
65+
f"No CloudEndure YAML configuration found! Creating it at: ({self.config_path})"
6766
)
6867
self.write_yaml_config(config=self.BASE_CONFIG)
6968
self.update_config()

pyproject.toml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "cloudendure"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
description = "Python wrapper and CLI for CloudEndure"
55
authors = ["Mark Beacom <[email protected]>", "Tom Warnock <[email protected]>"]
66
maintainers = ["Evan Lucchesi <[email protected]>", "Nick Selpa <[email protected]>"]
@@ -13,6 +13,39 @@ include = [
1313
readme = "README.md"
1414
repository = "https://github.com/2ndWatch/cloudendure-python"
1515
homepage = "https://2ndwatch.github.io/cloudendure-python/"
16+
classifiers = [
17+
"Environment :: Console",
18+
"Environment :: MacOS X",
19+
"Environment :: Win32 (MS Windows)",
20+
"License :: OSI Approved :: MIT License",
21+
"Natural Language :: English",
22+
"Operating System :: MacOS",
23+
"Operating System :: MacOS :: MacOS 9",
24+
"Operating System :: MacOS :: MacOS X",
25+
"Operating System :: Microsoft",
26+
"Operating System :: Microsoft :: MS-DOS",
27+
"Operating System :: Microsoft :: Windows",
28+
"Operating System :: Microsoft :: Windows :: Windows 10",
29+
"Operating System :: Microsoft :: Windows :: Windows 8.1",
30+
"Operating System :: Microsoft :: Windows :: Windows 8",
31+
"Operating System :: Microsoft :: Windows :: Windows 7",
32+
"Operating System :: Microsoft :: Windows :: Windows Server 2008",
33+
"Operating System :: POSIX :: Linux",
34+
"Programming Language :: Python",
35+
"Programming Language :: Python :: 3",
36+
"Programming Language :: Python :: 3.7",
37+
"Programming Language :: Python :: 3.8",
38+
"Programming Language :: Python :: 3.9",
39+
"Programming Language :: Python :: 3 :: Only",
40+
"Programming Language :: Python :: Implementation :: CPython",
41+
"Topic :: Internet",
42+
"Topic :: Internet :: WWW/HTTP",
43+
"Topic :: Internet :: WWW/HTTP :: Session",
44+
"Topic :: Software Development :: Libraries",
45+
"Topic :: Software Development :: Libraries :: Python Modules",
46+
"Topic :: Software Development :: User Interfaces",
47+
"Topic :: Utilities",
48+
]
1649

1750
[tool.poetry.dependencies]
1851
python = "^3.7"

0 commit comments

Comments
 (0)