haraka 0.2.17__py3-none-any.whl → 0.2.19__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.
File without changes
haraka/post_gen/runner.py CHANGED
@@ -3,9 +3,9 @@ from haraka.art.ascii.assets import *
3
3
  from .config import PostGenConfig
4
4
  from haraka.utils import divider, Logger
5
5
  from haraka.post_gen.service.command import CommandRunner
6
- from haraka.post_gen.service.files import FileOps
7
- from haraka.post_gen.service.purge import ResourcePurger
8
- from haraka.post_gen.service.gitops import GitOps
6
+ from haraka.post_gen.service.fileOps.files import FileOps
7
+ from haraka.post_gen.service.fileOps.purge import ResourcePurger
8
+ from haraka.post_gen.service.git.gitops import GitOps
9
9
 
10
10
 
11
11
  def main(cfg: PostGenConfig) -> None:
File without changes
@@ -47,14 +47,12 @@ class FileOps:
47
47
  self.logger.warn(f"Could not remove directory {self._relpath(path)}: {e}")
48
48
 
49
49
  def print_tree(self, path: Path, prefix: str = "") -> None:
50
- self.logger.debug(f"Printing directory tree starting at: {self._relpath(path)}")
51
50
 
52
51
  if not path.exists():
53
52
  self.logger.debug(f"Path {self._relpath(path)} does not exist")
54
53
  self.logger.warn(f"Path does not exist: {path}")
55
54
  return
56
55
  entries = sorted(path.iterdir(), key=lambda p: (p.is_file(), p.name.lower()))
57
- self.logger.debug(f"Found {len(entries)} entries in directory {self._relpath(path)}")
58
56
  for i, entry in enumerate(entries):
59
57
  branch = "└── " if i == len(entries) - 1 else "├── "
60
58
  print(prefix + branch + entry.name)
@@ -21,14 +21,12 @@ Requires: pip install pathspec PyYAML
21
21
  from __future__ import annotations
22
22
 
23
23
  from pathlib import Path
24
- from typing import Iterable
25
24
 
26
- import yaml
27
25
  from pathspec import PathSpec
28
26
 
29
- from .files import FileOps
27
+ from haraka.post_gen.service.fileOps.files import FileOps
30
28
  from haraka.utils import Logger, divider
31
- from ..config import config
29
+ from haraka.post_gen.config import config
32
30
 
33
31
  _MANIFEST_DIR = Path(__file__).resolve().parent.parent.parent / "manifests"
34
32
 
@@ -89,7 +87,11 @@ class ResourcePurger:
89
87
 
90
88
  if spec.match_file(rel):
91
89
  self._log.debug(f"Path matches keep patterns: {rel}")
92
- self._log.debug(f"Keeping: {rel}")
90
+ self._log.debug(f"Keeping file: {rel}")
91
+ continue
92
+ elif path.is_dir() and spec.match_file(f"{rel}/"):
93
+ self._log.debug(f"Path matches keep patterns: {rel}")
94
+ self._log.debug(f"Keeping directory: {rel}")
93
95
  continue
94
96
 
95
97
  if path.is_dir():
File without changes
@@ -1,7 +1,7 @@
1
1
  import shutil
2
2
  import sys
3
3
  from pathlib import Path
4
- from .command import CommandRunner
4
+ from haraka.post_gen.service.command import CommandRunner
5
5
  import subprocess
6
6
  from haraka.utils import Logger
7
7
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: haraka
3
- Version: 0.2.17
3
+ Version: 0.2.19
4
4
  Summary: Reusable post-generation helper for Cookiecutter micro-service templates
5
5
  Author-email: Will Burks <will@example.com>
6
6
  License: MIT
@@ -8,15 +8,18 @@ haraka/art/ascii/frame/border.py,sha256=n7qaLxzzBmf8ewatbe5gN97DO4afZM67bBjpU1Oq
8
8
  haraka/art/ascii/frame/framer.py,sha256=s_-lsb-hGhlH_73q5iTtk8KHW0MSeSHSAvNFVmL1c9A,3951
9
9
  haraka/art/ascii/frame/width_utils.py,sha256=in4AV3gTBBXUX6N01j67Icu9vsHFomybBN8rpL3sQ5s,810
10
10
  haraka/post_gen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- haraka/post_gen/runner.py,sha256=OLdB3ugDkBzeGBoVZ8RgxOHEy4aNT4icD10a1WwnyOo,3248
11
+ haraka/post_gen/runner.py,sha256=MRb5y30FbGTImYEV7ZomwBdHFNz3ycFr7e16TMN3gb0,3268
12
12
  haraka/post_gen/config/__init__.py,sha256=-_XkJ_Dni28yJCMfIceQSiH1wa_hHsZMoBTyvR9Ikbc,62
13
13
  haraka/post_gen/config/config.py,sha256=nmsQ19ONWE76GFQtah_PUO1HygE-ZCCOfK03M-t-kMs,1310
14
+ haraka/post_gen/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
+ haraka/post_gen/resources/assets.py,sha256=-oz3vlBaVOjeCOO2QHRvOmfyurR1KgihqXqbTtxDNG4,461
14
16
  haraka/post_gen/service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- haraka/post_gen/service/assets.py,sha256=-oz3vlBaVOjeCOO2QHRvOmfyurR1KgihqXqbTtxDNG4,461
16
17
  haraka/post_gen/service/command.py,sha256=yvEzW9rMSXWeQ_2DXuQNtGH6sRuZnK6viMud-amFQXw,2348
17
- haraka/post_gen/service/files.py,sha256=7AKGNqW19BkQfYgds2FDjtIsWLSNPaoqEqqZKUsK68k,3203
18
- haraka/post_gen/service/gitops.py,sha256=UHJFEGrz88NTB0-WKge_AiKO_yLFci6A7AM5kBIy0VQ,4029
19
- haraka/post_gen/service/purge.py,sha256=eDH5DLwaViu3jsqtPXeJWxS_Fs7RIEq6RKD8A8ny2vE,3536
18
+ haraka/post_gen/service/fileOps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
+ haraka/post_gen/service/fileOps/files.py,sha256=Jm_0bhvVnNqSPGKQ2RnMpx8JLV74M-IXMmwly9fpmVw,3020
20
+ haraka/post_gen/service/fileOps/purge.py,sha256=6MOUrwXojr2qQxebT_tczVlquVE-D0jlP67toR6oIIs,3765
21
+ haraka/post_gen/service/git/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
+ haraka/post_gen/service/git/gitops.py,sha256=clWny1m9qB4yr8asba8JwqBjewlMVsJUmIOCLtAL8RI,4052
20
23
  haraka/utils/__init__.py,sha256=3Cp4u0dyAGcmqes-tIr95KFsNsJx5Ji5Yzkto9546Hs,168
21
24
  haraka/utils/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
25
  haraka/utils/common/utils.py,sha256=kMnMXe_hcxGkD0MKGmR1lIwsRND7BaFPRbGN4PwonfM,360
@@ -26,7 +29,7 @@ haraka/utils/manifests/go-grpc-gateway-buf.yml,sha256=47DEQpj8HBSa-_TImW-5JCeuQe
26
29
  haraka/utils/manifests/go-grpc-protoc.yml,sha256=aR-Tv6iIcBzni3jbTg10wvceydBdk07fM7y3QcK1B8k,948
27
30
  haraka/utils/manifests/java-springboot.yml,sha256=WzcaStDgzyWmBhV2TUiYEkxHhYwydN9ww2yjZYyhSmw,929
28
31
  haraka/utils/manifests/python-fastapi.yml,sha256=FKHV0G53I0hoqAVmvoB18rVxw7PiVB_yjSwd_urXgn0,860
29
- haraka-0.2.17.dist-info/METADATA,sha256=fpze37OyA_UIRC5cZcjQfo7vi-07ljcqBVr4-Egb2ig,579
30
- haraka-0.2.17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
31
- haraka-0.2.17.dist-info/top_level.txt,sha256=1khpwypLKWoklVd_CgFiwAfcctVSXRoRPc3BI9lyIXo,7
32
- haraka-0.2.17.dist-info/RECORD,,
32
+ haraka-0.2.19.dist-info/METADATA,sha256=9uxOPhqqwdRdQuROHuHdlLT3oW012AhllHQyokBkPbQ,579
33
+ haraka-0.2.19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
34
+ haraka-0.2.19.dist-info/top_level.txt,sha256=1khpwypLKWoklVd_CgFiwAfcctVSXRoRPc3BI9lyIXo,7
35
+ haraka-0.2.19.dist-info/RECORD,,
File without changes