package-dev-tools 0.8.7__tar.gz → 0.8.8__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 (51) hide show
  1. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/PKG-INFO +1 -1
  2. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/pyproject.toml +1 -1
  3. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/utils/git.py +14 -25
  4. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools.egg-info/PKG-INFO +1 -1
  5. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/LICENSE +0 -0
  6. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/README.md +0 -0
  7. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/bin/pre-commit/bump-version +0 -0
  8. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/bin/pre-commit/check-version +0 -0
  9. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/setup.cfg +0 -0
  10. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/__init__.py +0 -0
  11. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/actions/__init__.py +0 -0
  12. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/actions/instantiate_new_project/__init__.py +0 -0
  13. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/actions/instantiate_new_project/cleanup_readme.py +0 -0
  14. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/actions/instantiate_new_project/cleanup_workflows.py +0 -0
  15. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/actions/instantiate_new_project/instantiate_new_project.py +0 -0
  16. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/actions/instantiate_new_project/substitute_template_name/__init__.py +0 -0
  17. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/actions/instantiate_new_project/substitute_template_name/project.py +0 -0
  18. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/actions/instantiate_new_project/substitute_template_name/substitute_template_name.py +0 -0
  19. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/actions/template_sync/__init__.py +0 -0
  20. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/actions/template_sync/git.py +0 -0
  21. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/actions/template_sync/merge.py +0 -0
  22. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/actions/template_sync/sync.py +0 -0
  23. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/actions/template_sync/trigger.py +0 -0
  24. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/cli/__init__.py +0 -0
  25. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/cli/check_coverage.py +0 -0
  26. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/cli/check_shields.py +0 -0
  27. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/cli/cleanup_readme.py +0 -0
  28. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/cli/export_pre_commit_config.py +0 -0
  29. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/cli/extract_info.py +0 -0
  30. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/cli/instantiate_new_project.py +0 -0
  31. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/cli/substitute_template_name.py +0 -0
  32. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/cli/sync_template.py +0 -0
  33. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/cli/trigger_template_sync.py +0 -0
  34. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/models/__init__.py +0 -0
  35. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/models/path.py +0 -0
  36. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/pre_commit/__init__.py +0 -0
  37. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/pre_commit/check_coverage.py +0 -0
  38. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/pre_commit/check_import.py +0 -0
  39. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/pre_commit/check_shields.py +0 -0
  40. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/pre_commit/expand_docstrings.py +0 -0
  41. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/pre_commit/export_config.py +0 -0
  42. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/py.typed +0 -0
  43. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/utils/__init__.py +0 -0
  44. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/utils/badge.py +0 -0
  45. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/utils/package.py +0 -0
  46. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools/utils/python_versions.py +0 -0
  47. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools.egg-info/SOURCES.txt +0 -0
  48. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools.egg-info/dependency_links.txt +0 -0
  49. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools.egg-info/entry_points.txt +0 -0
  50. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools.egg-info/requires.txt +0 -0
  51. {package_dev_tools-0.8.7 → package_dev_tools-0.8.8}/src/package_dev_tools.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: package-dev-tools
3
- Version: 0.8.7
3
+ Version: 0.8.8
4
4
  Summary: CI/CD tools for Python packages
5
5
  Author-email: Quinten Roets <qdr2104@columbia.edu>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "package-dev-tools"
3
- version = "0.8.7"
3
+ version = "0.8.8"
4
4
  description = "CI/CD tools for Python packages"
5
5
  authors = [{name = "Quinten Roets", email = "qdr2104@columbia.edu"}]
6
6
  license = "MIT"
@@ -1,29 +1,17 @@
1
1
  import os
2
2
  import shlex
3
3
  import shutil
4
- import subprocess
5
4
  from collections.abc import Iterator
6
5
  from dataclasses import dataclass, field
7
6
  from functools import cache
8
7
  from typing import Any
9
8
 
10
- from cli.commands.run import CommandItem
11
- from cli.commands.runner import Runner
9
+ import cli
10
+ from cli.commands.commands import CommandItem
12
11
 
13
12
  from package_dev_tools.models import Path
14
13
 
15
14
 
16
- @cache
17
- def resolve_git_binary() -> str:
18
- paths = (
19
- path
20
- for p in os.get_exec_path()
21
- if (path := shutil.which("git", path=str(p)))
22
- and not path.startswith(str(Path.home()))
23
- )
24
- return shlex.quote(next(paths, shutil.which("git") or "git"))
25
-
26
-
27
15
  @dataclass
28
16
  class GitInterface:
29
17
  path: Path = field(default_factory=Path.cwd)
@@ -48,20 +36,21 @@ class GitInterface:
48
36
  return (Path(relative_path) for relative_path in output.splitlines())
49
37
 
50
38
  def capture_output(self, *args: CommandItem, **kwargs: Any) -> str:
51
- return self.create_runner(*args, **kwargs).capture_output()
52
-
53
- def run(
54
- self,
55
- *args: CommandItem,
56
- check: bool = True,
57
- ) -> subprocess.CompletedProcess[str]: # pragma: nocover
58
- return self.create_runner(*args, check=check).run()
59
-
60
- def create_runner(self, *args: CommandItem, **kwargs: Any) -> Runner[str]:
61
39
  git_args = f"{resolve_git_binary()} {args[0]}", *args[1:]
62
- return Runner[str](git_args, kwargs={"cwd": self.path, **kwargs})
40
+ return cli.capture_output(*git_args, cwd=self.path, **kwargs)
63
41
 
64
42
  def configure(self) -> None:
65
43
  git_configuration = {"name": self.git_name, "email": self.git_email}
66
44
  for attribute, value in git_configuration.items():
67
45
  self.capture_output(f"config user.{attribute} {value}")
46
+
47
+
48
+ @cache
49
+ def resolve_git_binary() -> str:
50
+ paths = (
51
+ path
52
+ for p in os.get_exec_path()
53
+ if (path := shutil.which("git", path=str(p)))
54
+ and not path.startswith(str(Path.home()))
55
+ )
56
+ return shlex.quote(next(paths, shutil.which("git") or "git"))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: package-dev-tools
3
- Version: 0.8.7
3
+ Version: 0.8.8
4
4
  Summary: CI/CD tools for Python packages
5
5
  Author-email: Quinten Roets <qdr2104@columbia.edu>
6
6
  License-Expression: MIT