cloud-radar 0.14.0a0__tar.gz → 0.14.0a2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (18) hide show
  1. {cloud_radar-0.14.0a0 → cloud_radar-0.14.0a2}/PKG-INFO +12 -15
  2. {cloud_radar-0.14.0a0 → cloud_radar-0.14.0a2}/README.md +4 -4
  3. {cloud_radar-0.14.0a0 → cloud_radar-0.14.0a2}/pyproject.toml +26 -18
  4. {cloud_radar-0.14.0a0 → cloud_radar-0.14.0a2}/src/cloud_radar/cf/unit/_template.py +17 -2
  5. {cloud_radar-0.14.0a0 → cloud_radar-0.14.0a2}/LICENSE.txt +0 -0
  6. {cloud_radar-0.14.0a0 → cloud_radar-0.14.0a2}/src/cloud_radar/__init__.py +0 -0
  7. {cloud_radar-0.14.0a0 → cloud_radar-0.14.0a2}/src/cloud_radar/cf/__init__.py +0 -0
  8. {cloud_radar-0.14.0a0 → cloud_radar-0.14.0a2}/src/cloud_radar/cf/e2e/__init__.py +0 -0
  9. {cloud_radar-0.14.0a0 → cloud_radar-0.14.0a2}/src/cloud_radar/cf/e2e/_stack.py +0 -0
  10. {cloud_radar-0.14.0a0 → cloud_radar-0.14.0a2}/src/cloud_radar/cf/unit/__init__.py +0 -0
  11. {cloud_radar-0.14.0a0 → cloud_radar-0.14.0a2}/src/cloud_radar/cf/unit/_condition.py +0 -0
  12. {cloud_radar-0.14.0a0 → cloud_radar-0.14.0a2}/src/cloud_radar/cf/unit/_hooks.py +0 -0
  13. {cloud_radar-0.14.0a0 → cloud_radar-0.14.0a2}/src/cloud_radar/cf/unit/_output.py +0 -0
  14. {cloud_radar-0.14.0a0 → cloud_radar-0.14.0a2}/src/cloud_radar/cf/unit/_parameter.py +0 -0
  15. {cloud_radar-0.14.0a0 → cloud_radar-0.14.0a2}/src/cloud_radar/cf/unit/_resource.py +0 -0
  16. {cloud_radar-0.14.0a0 → cloud_radar-0.14.0a2}/src/cloud_radar/cf/unit/_stack.py +0 -0
  17. {cloud_radar-0.14.0a0 → cloud_radar-0.14.0a2}/src/cloud_radar/cf/unit/functions.py +0 -0
  18. {cloud_radar-0.14.0a0 → cloud_radar-0.14.0a2}/src/cloud_radar/cf/unit/test__template.py +0 -0
@@ -1,13 +1,12 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: cloud-radar
3
- Version: 0.14.0a0
3
+ Version: 0.14.0a2
4
4
  Summary: Run functional tests on cloudformation stacks.
5
- Home-page: https://github.com/DontShaveTheYak/cloud-radar
6
5
  License: Apache-2.0
7
6
  Keywords: aws,cloudformation,cloud-radar,testing,taskcat,cloud,radar
8
7
  Author: Levi Blaney
9
- Author-email: shadycuz@gmail.com
10
- Requires-Python: >=3.9,<3.14
8
+ Author-email: shadycuz+dev@gmail.com
9
+ Requires-Python: >=3.9,<4.0
11
10
  Classifier: Development Status :: 2 - Pre-Alpha
12
11
  Classifier: License :: OSI Approved :: Apache Software License
13
12
  Classifier: Operating System :: OS Independent
@@ -15,17 +14,15 @@ Classifier: Programming Language :: Python :: 3
15
14
  Classifier: Programming Language :: Python :: 3.9
16
15
  Classifier: Programming Language :: Python :: 3.10
17
16
  Classifier: Programming Language :: Python :: 3.11
18
- Classifier: Programming Language :: Python :: 3
19
- Classifier: Programming Language :: Python :: 3.10
20
- Classifier: Programming Language :: Python :: 3.11
21
17
  Classifier: Programming Language :: Python :: 3.12
22
18
  Classifier: Programming Language :: Python :: 3.13
23
- Classifier: Programming Language :: Python :: 3.9
24
19
  Classifier: Topic :: Software Development :: Libraries
25
20
  Classifier: Topic :: Software Development :: Testing
26
- Requires-Dist: botocore (>=1.35.36) ; python_version >= "3.13"
21
+ Requires-Dist: botocore (>=1.35.36,<2.0.0)
27
22
  Requires-Dist: cfn-flip (>=1.3.0,<2.0.0)
28
- Requires-Dist: taskcat (>=0.9.41,<0.10.0)
23
+ Requires-Dist: taskcat (>=0.9.41,<1.0.0)
24
+ Project-URL: Changelog, https://github.com/DontShaveTheYak/cloud-radar/releases
25
+ Project-URL: Issues, https://github.com/DontShaveTheYak/cloud-radar/issues
29
26
  Project-URL: Repository, https://github.com/DontShaveTheYak/cloud-radar
30
27
  Description-Content-Type: text/markdown
31
28
 
@@ -37,7 +34,7 @@ Description-Content-Type: text/markdown
37
34
  *** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.
38
35
  *** https://www.markdownguide.org/basic-syntax/#reference-style-links
39
36
  -->
40
- [![Python][python-shield]][pypi-url]
37
+ [![Python][py-versions-shield]][pypi-url]
41
38
  [![Latest][version-shield]][pypi-url]
42
39
  [![Tests][test-shield]][test-url]
43
40
  [![Coverage][codecov-shield]][codecov-url]
@@ -200,8 +197,8 @@ The default values for pseudo parameters:
200
197
  | **NoValue** | "" |
201
198
  | **Partition** | "aws" |
202
199
  | Region | "us-east-1" |
203
- | **StackId** | "" |
204
- | **StackName** | "" |
200
+ | StackId | (generated based on other values) |
201
+ | StackName | "my-cloud-radar-stack" |
205
202
  | **URLSuffix** | "amazonaws.com" |
206
203
  _Note: Bold variables are not fully implemented yet see the [Roadmap](#roadmap)_
207
204
 
@@ -356,7 +353,6 @@ A real functional testing example using Pytest can be seen [here](./tests/test_c
356
353
  ### Unit
357
354
  - Add full functionality to pseudo variables.
358
355
  * Variables like `Partition`, `URLSuffix` should change if the region changes.
359
- * Variables like `StackName` and `StackId` should have a better default than ""
360
356
  - Handle References to resources that shouldn't exist.
361
357
  * It's currently possible that a `!Ref` to a Resource stays in the final template even if that resource is later removed because of a conditional.
362
358
 
@@ -397,6 +393,7 @@ Levi - [@shady_cuz](https://twitter.com/shady_cuz)
397
393
  <!-- MARKDOWN LINKS & IMAGES -->
398
394
  <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
399
395
  [python-shield]: https://img.shields.io/pypi/pyversions/cloud-radar?style=for-the-badge
396
+ [py-versions-shield]: https://img.shields.io/pypi/pyversions/cloud-radar?style=for-the-badge
400
397
  [version-shield]: https://img.shields.io/pypi/v/cloud-radar?label=latest&style=for-the-badge
401
398
  [pypi-url]: https://pypi.org/project/cloud-radar/
402
399
  [test-shield]: https://img.shields.io/github/actions/workflow/status/DontShaveTheYak/cloud-radar/test.yml?label=Tests&style=for-the-badge
@@ -6,7 +6,7 @@
6
6
  *** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.
7
7
  *** https://www.markdownguide.org/basic-syntax/#reference-style-links
8
8
  -->
9
- [![Python][python-shield]][pypi-url]
9
+ [![Python][py-versions-shield]][pypi-url]
10
10
  [![Latest][version-shield]][pypi-url]
11
11
  [![Tests][test-shield]][test-url]
12
12
  [![Coverage][codecov-shield]][codecov-url]
@@ -169,8 +169,8 @@ The default values for pseudo parameters:
169
169
  | **NoValue** | "" |
170
170
  | **Partition** | "aws" |
171
171
  | Region | "us-east-1" |
172
- | **StackId** | "" |
173
- | **StackName** | "" |
172
+ | StackId | (generated based on other values) |
173
+ | StackName | "my-cloud-radar-stack" |
174
174
  | **URLSuffix** | "amazonaws.com" |
175
175
  _Note: Bold variables are not fully implemented yet see the [Roadmap](#roadmap)_
176
176
 
@@ -325,7 +325,6 @@ A real functional testing example using Pytest can be seen [here](./tests/test_c
325
325
  ### Unit
326
326
  - Add full functionality to pseudo variables.
327
327
  * Variables like `Partition`, `URLSuffix` should change if the region changes.
328
- * Variables like `StackName` and `StackId` should have a better default than ""
329
328
  - Handle References to resources that shouldn't exist.
330
329
  * It's currently possible that a `!Ref` to a Resource stays in the final template even if that resource is later removed because of a conditional.
331
330
 
@@ -366,6 +365,7 @@ Levi - [@shady_cuz](https://twitter.com/shady_cuz)
366
365
  <!-- MARKDOWN LINKS & IMAGES -->
367
366
  <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
368
367
  [python-shield]: https://img.shields.io/pypi/pyversions/cloud-radar?style=for-the-badge
368
+ [py-versions-shield]: https://img.shields.io/pypi/pyversions/cloud-radar?style=for-the-badge
369
369
  [version-shield]: https://img.shields.io/pypi/v/cloud-radar?label=latest&style=for-the-badge
370
370
  [pypi-url]: https://pypi.org/project/cloud-radar/
371
371
  [test-shield]: https://img.shields.io/github/actions/workflow/status/DontShaveTheYak/cloud-radar/test.yml?label=Tests&style=for-the-badge
@@ -1,31 +1,36 @@
1
- [tool.poetry]
1
+ [project]
2
2
  name = "cloud-radar"
3
- version = "0.14.0a0"
3
+ version = "0.14.0a2"
4
4
  description = "Run functional tests on cloudformation stacks."
5
5
  readme = "README.md"
6
- authors = ["Levi Blaney <shadycuz@gmail.com>"]
6
+ authors = [
7
+ { name = "Levi Blaney", email = "shadycuz+dev@gmail.com" },
8
+ ]
7
9
  license = "Apache-2.0"
8
- repository = "https://github.com/DontShaveTheYak/cloud-radar"
9
10
  keywords = ["aws", "cloudformation", "cloud-radar", "testing", "taskcat", "cloud", "radar"]
11
+ requires-python = ">=3.9,<4.0"
12
+ dynamic = [ "classifiers" ]
13
+ dependencies = [
14
+ "taskcat >=0.9.41, <1.0.0",
15
+ "cfn-flip >=1.3.0, <2.0.0",
16
+ "botocore >=1.35.36, <2.0.0",
17
+ ]
18
+ [project.urls]
19
+ Repository = "https://github.com/DontShaveTheYak/cloud-radar"
20
+ Issues = "https://github.com/DontShaveTheYak/cloud-radar/issues"
21
+ Changelog = "https://github.com/DontShaveTheYak/cloud-radar/releases"
22
+
23
+
24
+ [tool.poetry]
25
+ requires-poetry = ">=2.0"
10
26
  classifiers = [
11
27
  "Development Status :: 2 - Pre-Alpha",
12
- "License :: OSI Approved :: Apache Software License",
13
28
  "Operating System :: OS Independent",
14
- "Programming Language :: Python :: 3",
15
- "Programming Language :: Python :: 3.9",
16
- "Programming Language :: Python :: 3.10",
17
- "Programming Language :: Python :: 3.11",
18
- "Programming Language :: Python :: 3.12",
19
- "Programming Language :: Python :: 3.13",
20
29
  "Topic :: Software Development :: Libraries",
21
30
  "Topic :: Software Development :: Testing"
22
31
  ]
23
32
 
24
- [tool.poetry.dependencies]
25
- python = ">=3.9,<3.14"
26
- taskcat = "^0.9.41"
27
- cfn-flip = "^1.3.0"
28
- botocore = {version = ">=1.35.36", python = ">=3.13"}
33
+
29
34
 
30
35
  [tool.poetry.group.dev.dependencies]
31
36
  pytest = "^8.0.0"
@@ -41,8 +46,11 @@ flake8-bugbear = "^24.0.0"
41
46
  mypy = "^1.0.0"
42
47
  types-requests = "^2.28.11"
43
48
  types-PyYAML = "^6.0.12"
44
- cfn-lint = "1.22.3"
45
- setuptools = {version = "75.4.0", python = ">=3.12"}
49
+ cfn-lint = "1.24.0"
50
+ setuptools = {version = "75.8.0", python = ">=3.12"}
51
+
52
+ [tool.poetry.requires-plugins]
53
+ poetry-plugin-export = ">=1.8"
46
54
 
47
55
  [tool.coverage.paths]
48
56
  source = ["src", "*/site-packages"]
@@ -2,6 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  import json
4
4
  import re
5
+ import uuid
5
6
  from pathlib import Path
6
7
  from typing import Any, Callable, Dict, Generator, List, Optional, Tuple, Union
7
8
 
@@ -26,8 +27,8 @@ class Template:
26
27
  NoValue: str = "" # Not yet implemented
27
28
  Partition: str = "aws" # Other regions not implemented
28
29
  Region: str = "us-east-1"
29
- StackId: str = "" # Not yet implemented
30
- StackName: str = "" # Not yet implemented
30
+ StackId: str = "" # If left blank this will be generated
31
+ StackName: str = "my-cloud-radar-stack"
31
32
  URLSuffix: str = "amazonaws.com" # Other regions not implemented
32
33
 
33
34
  def __init__(
@@ -310,6 +311,19 @@ class Template:
310
311
 
311
312
  return template
312
313
 
314
+ # If the StackId variable is not set, generate a value for it
315
+ def _get_populated_stack_id(self) -> str:
316
+ if not Template.StackId:
317
+ # Not explicitly set, generate a value
318
+ unique_uuid = uuid.uuid4()
319
+
320
+ return (
321
+ f"arn:{Template.Partition}:cloudformation:{self.Region}:"
322
+ f"{Template.AccountId}:stack/{Template.StackName}/{unique_uuid}"
323
+ )
324
+
325
+ return Template.StackId
326
+
313
327
  def create_stack(
314
328
  self,
315
329
  params: Optional[Dict[str, str]] = None,
@@ -318,6 +332,7 @@ class Template:
318
332
  ):
319
333
  if region:
320
334
  self.Region = region
335
+ self.StackId = self._get_populated_stack_id()
321
336
 
322
337
  self.render(params, parameters_file=parameters_file)
323
338