atlas-init 0.4.2__py3-none-any.whl → 0.4.3__py3-none-any.whl

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.
atlas_init/__init__.py CHANGED
@@ -1,12 +1,9 @@
1
1
  from pathlib import Path
2
2
 
3
- VERSION = "0.4.2"
3
+ VERSION = "0.4.3"
4
4
 
5
5
 
6
6
  def running_in_repo() -> bool:
7
- py_directory = Path(__file__).parent.parent
8
- if py_directory.name != "py":
9
- return False
10
- git_directory = py_directory.parent / ".git"
11
- git_config = git_directory / "config"
12
- return git_directory.exists() and git_config.exists() and "atlas-init" in git_config.read_text()
7
+ maybe_git_directory = Path(__file__).parent.parent / ".git"
8
+ git_config = maybe_git_directory / "config"
9
+ return git_config.exists() and "atlas-init" in git_config.read_text()
@@ -137,7 +137,7 @@ def group_commands_for_mode(
137
137
  ) -> dict[str, str]:
138
138
  commands_to_run: dict[str, str] = {}
139
139
  if mode == GoTestMode.package:
140
- name_regex = f'^({"|".join(names)})$' if names else "^TestAcc*"
140
+ name_regex = f"^({'|'.join(names)})$" if names else "^TestAcc*"
141
141
  for pkg_url in group.package_url_tests(repo_path):
142
142
  command = f"go test {pkg_url} -v -run {name_regex} -timeout {timeout_minutes}m"
143
143
  if not group.sequential_tests:
@@ -225,7 +225,7 @@ def match_request(
225
225
  step_number=step_number,
226
226
  )
227
227
  remaining_responses = [resp for i, resp in enumerate(responses_list) if i not in used_responses]
228
- err_msg = f"Could not match request {request.path} ({ref}) with any response\n\n{request}\n\n\nThere are #{len(remaining_responses)} responses left that doesn't match\n{'-'*80}\n{'\n'.join(r.text for r in remaining_responses)}"
228
+ err_msg = f"Could not match request {request.path} ({ref}) with any response\n\n{request}\n\n\nThere are #{len(remaining_responses)} responses left that doesn't match\n{'-' * 80}\n{'\n'.join(r.text for r in remaining_responses)}"
229
229
  raise ValueError(err_msg)
230
230
 
231
231
 
@@ -260,9 +260,9 @@ def parse_raw_req_responses(
260
260
  in_response = False
261
261
  assert not in_request, "Request not closed"
262
262
  assert not in_response, "Response not closed"
263
- assert (
264
- request_count == response_count
265
- ), f"Mismatch in request and response count: {request_count} != {response_count}"
263
+ assert request_count == response_count, (
264
+ f"Mismatch in request and response count: {request_count} != {response_count}"
265
+ )
266
266
  parsed_requests = {}
267
267
  for ref, request_lines in requests.items():
268
268
  parsed_requests[ref] = parse_request(request_lines)
@@ -65,9 +65,9 @@ def update_examples(event_in: UpdateExamples) -> UpdateExamplesOutput:
65
65
  if event_in.skip_tf_fmt:
66
66
  logger.info("skipping terraform fmt")
67
67
  else:
68
- assert run_binary_command_is_ok(
69
- "terraform", "fmt -recursive", cwd=event_in.examples_base_dir, logger=logger
70
- ), "terraform fmt failed"
68
+ assert run_binary_command_is_ok("terraform", "fmt -recursive", cwd=event_in.examples_base_dir, logger=logger), (
69
+ "terraform fmt failed"
70
+ )
71
71
  return UpdateExamplesOutput(
72
72
  before_var_descriptions=flatten_descriptions(existing_var_descriptions),
73
73
  before_output_descriptions=flatten_descriptions(existing_output_descriptions),
@@ -149,7 +149,7 @@ def is_cache_up_to_date(cache_path: Path, cache_ttl: int) -> bool:
149
149
  if cache_path.exists():
150
150
  modified_ts = file_utils.file_modified_time(cache_path)
151
151
  if modified_ts > time.time() - cache_ttl:
152
- logger.info(f"using cached admin api: {cache_path} downloaded {time.time()-modified_ts:.0f}s ago")
152
+ logger.info(f"using cached admin api: {cache_path} downloaded {time.time() - modified_ts:.0f}s ago")
153
153
  return True
154
154
  return False
155
155
 
@@ -466,8 +466,8 @@ def generate_go_attribute_schema_lines(
466
466
  attr_name = attr.tf_name
467
467
  lines = [indent(line_indent, f'"{attr_name}": {attribute_header(attr)}{{')]
468
468
  if desc := attr.description or attr.is_nested and (desc := schema.ref_resource(attr.schema_ref).description):
469
- lines.append(indent(line_indent + 1, f'Description: "{desc.replace('\n', '\\n')}",'))
470
- lines.append(indent(line_indent + 1, f'MarkdownDescription: "{desc.replace('\n', '\\n')}",'))
469
+ lines.append(indent(line_indent + 1, f'Description: "{desc.replace("\n", "\\n")}",'))
470
+ lines.append(indent(line_indent + 1, f'MarkdownDescription: "{desc.replace("\n", "\\n")}",'))
471
471
  if attr.is_required:
472
472
  lines.append(indent(line_indent + 1, "Required: true,"))
473
473
  if attr.is_optional:
@@ -32,9 +32,9 @@ def api_spec_text_changes(schema: SchemaV2, api_spec_parsed: OpenapiSchema) -> O
32
32
  if name.startswith(prefix):
33
33
  schema_to_update.pop(name)
34
34
  name_no_prefix = name.removeprefix(prefix)
35
- assert (
36
- name_no_prefix not in schema_to_update
37
- ), f"removed {prefix} from {name} in schema but {name_no_prefix} already exists"
35
+ assert name_no_prefix not in schema_to_update, (
36
+ f"removed {prefix} from {name} in schema but {name_no_prefix} already exists"
37
+ )
38
38
  schema_to_update[name_no_prefix] = value
39
39
  openapi_yaml = dump(api_spec_parsed, "yaml")
40
40
  for prefix in openapi_changes.schema_prefix_removal:
@@ -12,7 +12,7 @@ from atlas_init import running_in_repo
12
12
  logger = logging.getLogger(__name__)
13
13
  """WARNING these variables should only be used through the AtlasInitSettings, not directly"""
14
14
  if running_in_repo():
15
- ROOT_PATH = Path(__file__).parent.parent.parent.parent # atlas_init REPO_PATH
15
+ ROOT_PATH = Path(__file__).parent.parent.parent # atlas_init REPO_PATH
16
16
  DEFAULT_PROFILES_PATH = ROOT_PATH / "profiles"
17
17
  else:
18
18
  ROOT_PATH = Path(__file__).parent.parent # site package install directory
@@ -1,15 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: atlas-init
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Project-URL: Documentation, https://github.com/EspenAlbert/atlas-init#readme
5
5
  Project-URL: Issues, https://github.com/EspenAlbert/atlas-init/issues
6
6
  Project-URL: Source, https://github.com/EspenAlbert/atlas-init
7
7
  Author-email: EspenAlbert <albertespen@gmail.com>
8
8
  License-Expression: MIT
9
+ License-File: LICENSE
9
10
  Classifier: Development Status :: 4 - Beta
10
11
  Classifier: Programming Language :: Python
11
- Classifier: Programming Language :: Python :: 3.12
12
- Requires-Python: >=3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Requires-Python: >=3.13
13
14
  Requires-Dist: appdirs==1.4.4
14
15
  Requires-Dist: boto3==1.35.92
15
16
  Requires-Dist: gitpython==3.1.42
@@ -119,7 +120,7 @@ atlas_init # should show how to use the cli
119
120
  ```
120
121
 
121
122
  ### CI Installation Tests (`pip install` local wheel)
122
- - [atlasci_local_install](atlasci_local_install.sh)
123
+ - `uv sync`
123
124
  - creates a local `.venv` builds the wheel from this repo and installs it
124
125
  - use `export ATLAS_INIT_PROFILES_PATH=/somewhere/to/store/your/env-vars/and/tf/state`
125
126
 
@@ -1,4 +1,4 @@
1
- atlas_init/__init__.py,sha256=mdnD1EIENrrNoygcsXJXBVXaCItR3hi-Eys2B7KqVoM,372
1
+ atlas_init/__init__.py,sha256=q9-9-IGh80IqihCuSfv3KrmdFUcLFaPb8r2Qzir2oXA,263
2
2
  atlas_init/__main__.py,sha256=dY1dWWvwxRZMmnOFla6RSfti-hMeLeKdoXP7SVYqMUc,52
3
3
  atlas_init/atlas_init.yaml,sha256=Q_gFMbTa8OKxS8GbjszyrMA05nap8HI_Oe-cgQZNEPk,2351
4
4
  atlas_init/cli.py,sha256=znbyirZl_tChG4SoGQPEM5iSsJiSVslCdExSja1qvUo,9262
@@ -14,7 +14,7 @@ atlas_init/cli_cfn/contract.py,sha256=6gRCvKRh6bn6BiQ3wyai_XNUwbWSqSRlg5GFvSdEcR
14
14
  atlas_init/cli_cfn/example.py,sha256=_JuFyNEb7QvD4T8jQyAPI3TgnHW0wz0kVuncB5UkbEA,8530
15
15
  atlas_init/cli_cfn/files.py,sha256=kwKDh__O__it2Shz3pHhnle4XUesRd4P929twxUODfI,2651
16
16
  atlas_init/cli_helper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- atlas_init/cli_helper/go.py,sha256=WN3p7GXQNDtDl1M3rJ1Qhv2mz89Jow0BWucHnwLfUQs,9725
17
+ atlas_init/cli_helper/go.py,sha256=Jid_aUzheyzAuZjcOZZXrXbjbazIQKgnrzioPcb1vh8,9725
18
18
  atlas_init/cli_helper/run.py,sha256=va1eFP-hRvM76lVzvqH8eqGnyfcbzgR0zCMbL9Neb58,3660
19
19
  atlas_init/cli_helper/run_manager.py,sha256=USNRHSm1zuu4H9NRamnxQ2D4gKzrHLk8dZe0G95Be14,9022
20
20
  atlas_init/cli_helper/sdk.py,sha256=exh58-VZwxtosaxM269C62EEy1VnpJPOVziPDPkGsmE,2983
@@ -26,23 +26,23 @@ atlas_init/cli_root/trigger.py,sha256=In3oS-z8gYYsPxQjHsGmqB1AsUtHPDTxwva5arsajv
26
26
  atlas_init/cli_tf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  atlas_init/cli_tf/app.py,sha256=6dFc9NMaM25vC4BMa8HCDDks9dD74nwauD70GnWBmZU,11600
28
28
  atlas_init/cli_tf/changelog.py,sha256=biWYKf1pZvXZ-jEgcZ5q9sY7nTGrL2PuI0h9mCILf_g,3181
29
- atlas_init/cli_tf/debug_logs.py,sha256=P78XnlvBj0rBSceLF3nIuHPIRBnKKw1Ya2gY2zkbTsU,10046
29
+ atlas_init/cli_tf/debug_logs.py,sha256=50J3wgfbdcMLPJ5_7qLkUuEXeZwFvjqyusXKgrcKMls,10048
30
30
  atlas_init/cli_tf/debug_logs_test_data.py,sha256=s85x78pFweVyqL2BchkLuvuG9hm-bwl8zcSO-IQqm6c,9736
31
31
  atlas_init/cli_tf/debug_logs_test_data_package_config.py,sha256=BOAgln1pWne_ZhP6a0SM2ddn2csr0sgGkYf2kMS_V9o,1666
32
- atlas_init/cli_tf/example_update.py,sha256=xCXm6n0fSfPCnv9GyXBfPz7ljFe8Y4WPFZaXf_qDa68,5254
32
+ atlas_init/cli_tf/example_update.py,sha256=YctAKZUb932x4VHBI_5T_0jOIbMDYdJaSOVVjJRUMEM,5256
33
33
  atlas_init/cli_tf/example_update_test.py,sha256=EI_6ZsOaGt7iX2JvJ3rvv3B2zKRRjI-d3P8R-tvgFc8,2859
34
34
  atlas_init/cli_tf/github_logs.py,sha256=jJs74npytc7f_nxmUG_CgWpBrKCuF5nZtpwsSii-3XY,8365
35
35
  atlas_init/cli_tf/go_test_run.py,sha256=BrEX-U7wGd4pV_PZycttbbBgG2ac0vOLeJwm65zFTmo,7420
36
36
  atlas_init/cli_tf/go_test_summary.py,sha256=4hPjT5gKRixXWO6NtTRkavDXPIZmC0TJ-7GhN2h33H0,5590
37
37
  atlas_init/cli_tf/log_clean.py,sha256=lVbw6fDstr9HanGVEv6zBcfs_4aR2TcPHCIx1poU5sY,926
38
- atlas_init/cli_tf/mock_tf_log.py,sha256=-ZOtQmy9w7k7HvrywMqlgohZ6Kerojk-P_xtiTaZ4sc,7555
38
+ atlas_init/cli_tf/mock_tf_log.py,sha256=LTUL5vJlEIdkwVuvc78gZkEjTmsn-hWBlM8tXIYmZB4,7557
39
39
  atlas_init/cli_tf/schema.py,sha256=iwvb4wD2Wba0MMu7ooTNAIi1jHbpLiXGPOT51_o_YW8,12431
40
40
  atlas_init/cli_tf/schema_go_parser.py,sha256=PiRfFFVnkhltxcGFfOCgH53wwzIEynw2BXmSfaINLL8,8294
41
41
  atlas_init/cli_tf/schema_inspection.py,sha256=ujLvGfg3baByND4nRD0drZoI45STxo3VfYvim-PfVOc,1764
42
42
  atlas_init/cli_tf/schema_table.py,sha256=sxH-WUvBOHPI-HH2-2Y_MwKN-_POlQX3599h6YbfY1U,5261
43
43
  atlas_init/cli_tf/schema_table_models.py,sha256=9gS3gYris0MjEWsY_gbLWcZwJokCUJS1TcVXnq7w5SA,5003
44
- atlas_init/cli_tf/schema_v2.py,sha256=NtVW3lPKxHtCMBEwo9zThARpy9oQRbsKd0NrhymAyyE,21960
45
- atlas_init/cli_tf/schema_v2_api_parsing.py,sha256=8XtwHNU84VPMATD3CbE-TLeVlgxqZggxY5QQ5YjhX4w,12888
44
+ atlas_init/cli_tf/schema_v2.py,sha256=IKVsyY2wg3SufXi5LPdC6a9FmI4N_8CPZbrnKcwZJcw,21960
45
+ atlas_init/cli_tf/schema_v2_api_parsing.py,sha256=ktZ1-XzOmvtzlz4ztgbOQ60y_5kF_NQDMmqvR9aOoVg,12888
46
46
  atlas_init/cli_tf/schema_v2_sdk.py,sha256=AsAERT18FC97Gdb8r-qFInr4pSA15IGMUvCn-065XGE,12630
47
47
  atlas_init/cli_tf/schema_v3.py,sha256=LUeI2kniUDfd-5iP1TCLXb-Js92VYSXB6FCVLDYAIak,5788
48
48
  atlas_init/cli_tf/schema_v3_sdk.py,sha256=5RWbhqKT8jEGgJrQaaT7xTRToviIzZZOxuJO5MNLYwo,9929
@@ -68,7 +68,7 @@ atlas_init/settings/config.py,sha256=Cb483vmKOnNUK6m5KlhDiGeDJcZoJ1vHREdiddYONuQ
68
68
  atlas_init/settings/env_vars.py,sha256=1M4EKveUbrHaEuSyWyZ_bdK7MUTHhBu8-tFGSimqCCI,10659
69
69
  atlas_init/settings/env_vars_generated.py,sha256=c3dMShnSvqLsiJTIMoHCpC9Tvk35b5lra40Ske9l4gE,980
70
70
  atlas_init/settings/interactive.py,sha256=Xy1Z5WMAOSaJ-vQI_4xjAbSR92rWQgnffwVoDT27L68,340
71
- atlas_init/settings/path.py,sha256=KkXysu6-0AuSjsvYGknYGJX1hL2j1RD-Fpf8KsVYpkE,2618
71
+ atlas_init/settings/path.py,sha256=MUKw6vrcOBXQUc15ItC9go8qkCDs3ZkmhqUveuolgeI,2611
72
72
  atlas_init/settings/rich_utils.py,sha256=mjYCZ7Sx-OTsjv7AZ4qyjXqvq3TOaczLfDjOQK_dKWk,2012
73
73
  atlas_init/tf/.terraform.lock.hcl,sha256=71G7Kov2C4M0qOIyeIL90Vw8j8nkJktNUT3uPwUOu5w,6876
74
74
  atlas_init/tf/always.tf,sha256=ij6QKI8Lg0140bFZwOyiYK5c-2p5e7AGZ1qKbYyv6Os,1359
@@ -102,7 +102,8 @@ atlas_init/tf/modules/vpc_peering/vpc_peering.tf,sha256=hJ3KJdGbLpOQednUpVuiJ0Cq
102
102
  atlas_init/tf/modules/vpc_privatelink/atlas-privatelink.tf,sha256=FloaaX1MNDvoMZxBnEopeLKyfIlq6kaX2dmx8WWlXNU,1298
103
103
  atlas_init/tf/modules/vpc_privatelink/variables.tf,sha256=gktHCDYD4rz6CEpLg5aiXcFbugw4L5S2Fqc52QYdJyc,255
104
104
  atlas_init/tf/modules/vpc_privatelink/versions.tf,sha256=G0u5V_Hvvrkux_tqfOY05pA-GzSp_qILpfx1dZaTGDc,237
105
- atlas_init-0.4.2.dist-info/METADATA,sha256=jPqN8mPKb77ojXt7dDWWFk54KhwGxb2hhYWQh7Mv3nc,5741
106
- atlas_init-0.4.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
107
- atlas_init-0.4.2.dist-info/entry_points.txt,sha256=oSNFIEAS9nUZyyZ8Fc-0F0U5j-NErygy01LpJVSHapQ,57
108
- atlas_init-0.4.2.dist-info/RECORD,,
105
+ atlas_init-0.4.3.dist-info/METADATA,sha256=IhxAuso_9KCXetBtCOX3wlDTKwJLTxX7mpZrtM5TcJE,5723
106
+ atlas_init-0.4.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
107
+ atlas_init-0.4.3.dist-info/entry_points.txt,sha256=oSNFIEAS9nUZyyZ8Fc-0F0U5j-NErygy01LpJVSHapQ,57
108
+ atlas_init-0.4.3.dist-info/licenses/LICENSE,sha256=aKnucPyXnK1A-aXn4vac71zRpcB5BXjDyl4PDyi_hZg,1069
109
+ atlas_init-0.4.3.dist-info/RECORD,,
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Espen Albert
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.