Skip to content

Commit

Permalink
Update to 0.2.2 (#109)
Browse files Browse the repository at this point in the history
* 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
Mark Beacom authored Mar 24, 2020
1 parent b2abd73 commit 480c4dd
Showing 6 changed files with 60 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ SHA1 := $$(git log -1 --pretty=%h)
CURRENT_BRANCH := $$(git symbolic-ref -q --short HEAD)
LATEST_TAG := ${REPO_NAME}:latest
GIT_TAG := ${REPO_NAME}:${SHA1}
VERSION := v0.2.1
VERSION := v0.2.2

info: ## Show information about the current git state.
@echo "Github Project: https://github.com/${REPO_NAME}\nCurrent Branch: ${CURRENT_BRANCH}\nSHA1: ${SHA1}\n"
3 changes: 3 additions & 0 deletions cloudendure/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .cloudendure import CloudEndure

__all__ = ["CloudEndure"]
2 changes: 1 addition & 1 deletion cloudendure/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.1"
__version__ = "0.2.2"
20 changes: 20 additions & 0 deletions cloudendure/cloudendure.py
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@
from .events import Event, EventHandler
from .exceptions import CloudEndureHTTPException, CloudEndureMisconfigured
from .templates import TerraformTemplate
from .utils import get_user_agent

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

def __repr__(self) -> str:
"""Provide the representation for the CloudEndure object.
Returns:
str: The string representation of the CloudEndure object.
"""
return f"<CloudEndure - Project: {self.project_name}>"

@property
def version(self) -> str:
"""Display the CloudEndure module version.
Returns:
str: The CloudEndure Python module version.
"""
return get_user_agent()

def _get_role_credentials(self, name: str, role: str) -> Dict[str, Any]:
_sts_client: boto_client = boto3.client("sts")

3 changes: 1 addition & 2 deletions cloudendure/config.py
Original file line number Diff line number Diff line change
@@ -62,8 +62,7 @@ def __init__(
_config: PosixPath = Path(self.config_path)
if not _config.exists():
print(
"No CloudEndure YAML configuration found! Creating it at: (%s)",
self.config_path,
f"No CloudEndure YAML configuration found! Creating it at: ({self.config_path})"
)
self.write_yaml_config(config=self.BASE_CONFIG)
self.update_config()
35 changes: 34 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cloudendure"
version = "0.2.1"
version = "0.2.2"
description = "Python wrapper and CLI for CloudEndure"
authors = ["Mark Beacom <mark@markbeacom.com>", "Tom Warnock <twarnock@2ndwatch.com>"]
maintainers = ["Evan Lucchesi <evan@2ndwatch.com>", "Nick Selpa <nselpa@2ndwatch.com>"]
@@ -13,6 +13,39 @@ include = [
readme = "README.md"
repository = "https://github.com/2ndWatch/cloudendure-python"
homepage = "https://2ndwatch.github.io/cloudendure-python/"
classifiers = [
"Environment :: Console",
"Environment :: MacOS X",
"Environment :: Win32 (MS Windows)",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: MacOS :: MacOS 9",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft",
"Operating System :: Microsoft :: MS-DOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: Microsoft :: Windows :: Windows 10",
"Operating System :: Microsoft :: Windows :: Windows 8.1",
"Operating System :: Microsoft :: Windows :: Windows 8",
"Operating System :: Microsoft :: Windows :: Windows 7",
"Operating System :: Microsoft :: Windows :: Windows Server 2008",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Internet",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Session",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: User Interfaces",
"Topic :: Utilities",
]

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

0 comments on commit 480c4dd

Please sign in to comment.