dsw-tdk 4.2.1__py2.py3-none-any.whl → 4.3.0__py2.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.
dsw/tdk/build_info.py CHANGED
@@ -9,9 +9,9 @@ BuildInfo = namedtuple(
9
9
  )
10
10
 
11
11
  BUILD_INFO = BuildInfo(
12
- version='v4.2.1~36f77cc',
13
- built_at='2024-01-08 13:03:48Z',
14
- sha='36f77cc7870b4a1f631d2efc5d32a453d8a1b2ee',
12
+ version='v4.3.0~4d1ca3f',
13
+ built_at='2024-02-06 04:49:54Z',
14
+ sha='4d1ca3fde2601aaaeb733072bdcc0f752307e19d',
15
15
  branch='HEAD',
16
- tag='v4.2.1',
16
+ tag='v4.3.0',
17
17
  )
dsw/tdk/cli.py CHANGED
@@ -438,8 +438,6 @@ def extract_package(ctx, template_package, output, force: bool):
438
438
  force=force,
439
439
  )
440
440
  except Exception as e:
441
- import traceback
442
- traceback.print_exc()
443
441
  ClickPrinter.failure('Failed to extract the package')
444
442
  ClickPrinter.error(f'> {e}')
445
443
  exit(1)
dsw/tdk/consts.py CHANGED
@@ -3,8 +3,8 @@ import pathspec # type: ignore
3
3
  import re
4
4
 
5
5
  APP = 'dsw-tdk'
6
- VERSION = '4.2.1'
7
- METAMODEL_VERSION = 12
6
+ VERSION = '4.3.0'
7
+ METAMODEL_VERSION = 13
8
8
 
9
9
  REGEX_SEMVER = re.compile(r'^[0-9]+\.[0-9]+\.[0-9]+$')
10
10
  REGEX_ORGANIZATION_ID = re.compile(r'^(?![.])(?!.*[.]$)[a-zA-Z0-9.]+$')
dsw/tdk/core.py CHANGED
@@ -23,6 +23,10 @@ from .validation import ValidationError, TemplateValidator
23
23
  ChangeItem = Tuple[watchfiles.Change, pathlib.Path]
24
24
 
25
25
 
26
+ def _change(item: ChangeItem, root: pathlib.Path) -> str:
27
+ return f'{item[0].name.upper()}[{item[1].relative_to(root).as_posix()}]'
28
+
29
+
26
30
  class TDKProcessingError(RuntimeError):
27
31
 
28
32
  def __init__(self, message: str, hint: str):
@@ -43,6 +47,7 @@ METAMODEL_VERSION_SUPPORT = {
43
47
  10: (3, 12, 0),
44
48
  11: (3, 20, 0),
45
49
  12: (4, 1, 0),
50
+ 13: (4, 3, 0),
46
51
  }
47
52
 
48
53
 
@@ -267,7 +272,7 @@ class TDKCore:
267
272
  if project_update and result is not None:
268
273
  self.safe_project.update_template_file(result)
269
274
  except Exception as e:
270
- self.logger.error(f'Failed to store remote {tfile.remote_type.value} {tfile.filename.as_posix()}: {e}')
275
+ self.logger.error(f'Failed to store remote {tfile.remote_type.value} {tfile.filename.as_posix()}: {str(e)}')
271
276
 
272
277
  async def store_remote_files(self):
273
278
  for tfile in self.safe_project.safe_template.files.values():
@@ -471,7 +476,7 @@ class ChangesProcessor:
471
476
  deleted = set()
472
477
  updated = set()
473
478
  for file_change in self.file_changes:
474
- self.tdk.logger.debug(f'Processing {file_change}')
479
+ self.tdk.logger.debug(f'Processing: {_change(file_change, self.tdk.safe_project.template_dir)}')
475
480
  change_type = file_change[0]
476
481
  filepath = file_change[1]
477
482
  if change_type == watchfiles.Change.deleted and filepath not in deleted:
@@ -514,6 +519,7 @@ class ChangesProcessor:
514
519
  if self.readme_change is not None or self.descriptor_change is not None:
515
520
  self.tdk.logger.debug('Updating template descriptor (metadata)')
516
521
  await self.tdk._update_descriptor()
522
+ self.tdk.safe_project.template = self.tdk.safe_template
517
523
 
518
524
  async def process_changes(self, changes: List[ChangeItem], force: bool):
519
525
  self._split_changes(changes)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dsw-tdk
3
- Version: 4.2.1
3
+ Version: 4.3.0
4
4
  Summary: Data Stewardship Wizard Template Development Toolkit
5
5
  Author-email: Marek Suchánek <marek.suchanek@ds-wizard.org>
6
6
  License: Apache License 2.0
@@ -1,10 +1,10 @@
1
1
  dsw/tdk/__init__.py,sha256=zJeTybb0SqiNdGLkANjRa36hku4axi17mZL2dM3tHto,288
2
2
  dsw/tdk/__main__.py,sha256=IkqeOatxravhcQCdk4l0BkbaMILkgVopB9phYCIR1uo,38
3
3
  dsw/tdk/api_client.py,sha256=N3-PoO__kPtqFmR2QY-OG-9OkjYZwuXg8JxcBgpI8vQ,14222
4
- dsw/tdk/build_info.py,sha256=mN4_ERH9OYQqXoej66O6YhqhbGY5W9YhJ-T1k444k20,379
5
- dsw/tdk/cli.py,sha256=v5TY0ctiOxw8T37pvhY3qPSdC6YqArsWwn88dfcj5yg,21731
6
- dsw/tdk/consts.py,sha256=vCHXiGP7ptMzwFhG5W5PBNjna-f6a3_jTFU_mVOFkUw,634
7
- dsw/tdk/core.py,sha256=Dp7zSUDzAdU05IxZ5OHUQchemWbmHRZo1VR6PwqRt5g,25655
4
+ dsw/tdk/build_info.py,sha256=EABvAnYQrkswIR2UF4ThXhq3CSTDWxUh1oxzOjzdu5s,379
5
+ dsw/tdk/cli.py,sha256=_DZRSAo04wajiWVTod6lPdh477Rdxf7zBomySPxiL1c,21676
6
+ dsw/tdk/consts.py,sha256=l8rvGnM19KGLallukR4TKOl1LbNBFKLQYkJCiT5unls,634
7
+ dsw/tdk/core.py,sha256=H-s96wweQQnfFM7TmQnqYpvHRWUgK_xXzsxsy06lnA0,25930
8
8
  dsw/tdk/model.py,sha256=B9_cCmg_Z2IHabMMychKFV4dh4SFPVEentuPcb5fzlY,17235
9
9
  dsw/tdk/utils.py,sha256=gW_-1qj7osHgKhTjjMGeVL2pxoBDQuq7VjRE6OmEMCw,5734
10
10
  dsw/tdk/validation.py,sha256=hr04MRVqwBIBeKoX6v53Ix1S-vjvIQYM5dwI0SnMRsc,7827
@@ -12,9 +12,9 @@ dsw/tdk/templates/LICENSE.j2,sha256=6WzK06169rxZ4V_boYgejcZkw-1Up_WoU18iI3Gbkfs,
12
12
  dsw/tdk/templates/README.md.j2,sha256=FzUABeMM8To0oT48Kytoox64uAZ8F7FSAAXgpyKzqdU,247
13
13
  dsw/tdk/templates/env.j2,sha256=7IJ6HAIY1bXKLake4c72DSEUcQtAquO5wlSgH8vg_8s,97
14
14
  dsw/tdk/templates/starter.j2,sha256=XjZy3T9i8aWFlq4clXL6Q4JNh455crGelR9AoHisTbw,296
15
- dsw_tdk-4.2.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
16
- dsw_tdk-4.2.1.dist-info/METADATA,sha256=MJ5D-tgXw-a1MzraLFHPC64gL06eLA_skc_YPaFOUzk,6020
17
- dsw_tdk-4.2.1.dist-info/WHEEL,sha256=-G_t0oGuE7UD0DrSpVZnq1hHMBV9DD2XkS5v7XpmTnk,110
18
- dsw_tdk-4.2.1.dist-info/entry_points.txt,sha256=lwD5ZzRCbTFSjP1-SkhYsaJe8sEXOWWgMAMUhw0v2Hk,41
19
- dsw_tdk-4.2.1.dist-info/top_level.txt,sha256=7SfbsHFoJ_vlAgG6C-xzETETwYO71dBrGnod8uMFnjw,4
20
- dsw_tdk-4.2.1.dist-info/RECORD,,
15
+ dsw_tdk-4.3.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
16
+ dsw_tdk-4.3.0.dist-info/METADATA,sha256=DErRPAY4KntoH_hG9IG5ysBAnQIl1foe42IGylhXXFQ,6020
17
+ dsw_tdk-4.3.0.dist-info/WHEEL,sha256=-G_t0oGuE7UD0DrSpVZnq1hHMBV9DD2XkS5v7XpmTnk,110
18
+ dsw_tdk-4.3.0.dist-info/entry_points.txt,sha256=lwD5ZzRCbTFSjP1-SkhYsaJe8sEXOWWgMAMUhw0v2Hk,41
19
+ dsw_tdk-4.3.0.dist-info/top_level.txt,sha256=7SfbsHFoJ_vlAgG6C-xzETETwYO71dBrGnod8uMFnjw,4
20
+ dsw_tdk-4.3.0.dist-info/RECORD,,