Skip to content

Commit

Permalink
Rename (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
cariad committed Oct 23, 2021
1 parent a381e9f commit 2b8ab53
Show file tree
Hide file tree
Showing 18 changed files with 324 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.coverage
changedifferently.egg-info
coverage.xml
dist
htmlcov
stackdiff.egg-info
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"cSpell.words": [
"changedifferently"
"epilog",
"stackdiff"
]
}
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include changedifferently/version/VERSION
include stackdiff/version/VERSION
6 changes: 6 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,21 @@ verify_ssl = true
name = "pypi"

[packages]
ansiscape = "~=1.0"
boto3 = "~=1.18"
differently = "==1.0.0a6"
tabulate = "~=0.8"

[dev-packages]
black = "==21.9b0"
boto3-stubs = {extras = ["cloudformation"], version = "*"}
flake8 = "*"
isort = "*"
mypy = "*"
pytest = "*"
pytest-cov = "*"
twine = "*"
types-tabulate = "~=0.8"
shellcheck-py = "*"
yamllint = "*"

Expand Down
164 changes: 158 additions & 6 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# changedifferently
Visualises the changes described by an Amazon Web Services CloudFormation change set
# stackdiff

Visualises the changes described by an Amazon Web Services CloudFormation stack change set
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ else
version="-1.-1.-1"
fi

echo "${version}" > changedifferently/version/VERSION
echo "${version}" > stackdiff/version/VERSION
rm -rf dist
python setup.py bdist_wheel
rm -rf build
2 changes: 1 addition & 1 deletion lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ else
fi

flake8 .
mypy changedifferently
mypy stackdiff
mypy tests
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ profile = 'black'
skip = '.venv'

[tool.pytest.ini_options]
addopts = '--cov=changedifferently --cov-branch --cov-report=html --cov-report=term-missing:skip-covered --cov-report=xml --no-cov-on-fail'
addopts = '--cov=stackdiff --cov-branch --cov-report=html --cov-report=term-missing:skip-covered --cov-report=xml --no-cov-on-fail'
log_cli = 1
testpaths = 'tests'
21 changes: 13 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from setuptools import setup # pyright: reportMissingTypeStubs=false

from changedifferently.version import get_version
from stackdiff.version import get_version

readme_path = Path(__file__).parent / "README.md"

Expand Down Expand Up @@ -36,21 +36,26 @@
author="Cariad Eccleston",
author_email="[email protected]",
classifiers=classifiers,
description="Visualises the changes described by an Amazon Web Services CloudFormation change set",
description="Visualises the changes described by an Amazon Web Services CloudFormation stack change set",
entry_points={
"console_scripts": [
"stackdiff=stackdiff.__main__:cli_entry",
],
},
include_package_data=True,
license="MIT",
long_description=long_description,
long_description_content_type="text/markdown",
name="changedifferently",
name="stackdiff",
packages=[
"changedifferently",
"changedifferently.version",
"stackdiff",
"stackdiff.version",
],
package_data={
"changedifferently": ["py.typed"],
"changedifferently.version": ["py.typed"],
"stackdiff": ["py.typed"],
"stackdiff.version": ["py.typed"],
},
python_requires=">=3.8",
url="https://github.com/cariad/changedifferently",
url="https://github.com/cariad/stackdiff",
version=version,
)
File renamed without changes.
32 changes: 32 additions & 0 deletions stackdiff/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from argparse import ArgumentParser
from sys import stdout

from boto3.session import Session

from stackdiff.stack_diff import StackDiff
from stackdiff.version import get_version


def cli_entry() -> None:
parser = ArgumentParser(
description="Visualises the changes described by an Amazon Web Services CloudFormation stack change set.",
epilog="Made with love by Cariad Eccleston: https://github.com/cariad/stackdiff",
)

parser.add_argument("--change", help="change set ARN, ID or name")
parser.add_argument("--stack", help="stack ARN, ID or name")
parser.add_argument("--version", action="store_true", help="print the version")

args = parser.parse_args()

if args.version:
print(get_version())
exit(0)

cs = StackDiff(change=args.change, session=Session(), stack=args.stack)
cs.render_differences(stdout)
cs.render_changes(stdout)


if __name__ == "__main__":
cli_entry()
File renamed without changes.
Loading

0 comments on commit 2b8ab53

Please sign in to comment.