github-rest-api 0.38.0__tar.gz → 0.38.2__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 (43) hide show
  1. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/PKG-INFO +1 -1
  2. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/container/build_container_images.py +10 -2
  3. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/pyproject.toml +1 -1
  4. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/uv.lock +1 -1
  5. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/.gemini/system.md +0 -0
  6. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/.github/workflows/create_pr_to_main.yml +0 -0
  7. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/.github/workflows/lint.yml +0 -0
  8. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/.github/workflows/release.yml +0 -0
  9. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/.github/workflows/remove_branch.yml +0 -0
  10. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/.github/workflows/test.yml +0 -0
  11. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/.gitignore +0 -0
  12. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/.gitpod.yml +0 -0
  13. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/GEMINI.md +0 -0
  14. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/README.md +0 -0
  15. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/__init__.py +0 -0
  16. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/__init__.py +0 -0
  17. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/cargo/__init__.py +0 -0
  18. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/cargo/benchmark.py +0 -0
  19. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/cargo/profiling.py +0 -0
  20. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/cargo/utils.py +0 -0
  21. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/container/__init__.py +0 -0
  22. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/container/config_container.py +0 -0
  23. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/container/update_version_containerfile.py +0 -0
  24. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/github/__init__.py +0 -0
  25. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/github/add_github_repo.py +0 -0
  26. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/github/create_pull_request.py +0 -0
  27. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/github/release_on_github.py +0 -0
  28. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/github/remove_branch.py +0 -0
  29. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/github/workflows/create_pr_dev_to_main.yml +0 -0
  30. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/github/workflows/create_pr_to_dev.yml +0 -0
  31. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/github/workflows/create_pr_to_main.yml +0 -0
  32. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/github/workflows/python/lint.yml +0 -0
  33. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/github/workflows/python/test.yml +0 -0
  34. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/github/workflows/remove_branch.yml +0 -0
  35. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/actions/utils.py +0 -0
  36. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/github.py +0 -0
  37. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/github_rest_api/utils.py +0 -0
  38. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/memory/MEMORY.md +0 -0
  39. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/memory/feedback_test_runner.md +0 -0
  40. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/tests/__init__.py +0 -0
  41. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/tests/test_build_container_images.py +0 -0
  42. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/tests/test_github.py +0 -0
  43. {github_rest_api-0.38.0 → github_rest_api-0.38.2}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-rest-api
3
- Version: 0.38.0
3
+ Version: 0.38.2
4
4
  Summary: Simple wrapper of GitHub REST APIs.
5
5
  Author-email: Ben Du <longendu@yahoo.com>
6
6
  Classifier: Programming Language :: Python :: 3 :: Only
@@ -132,6 +132,12 @@ def _build_image(
132
132
  _push_image(f"{image}:{tag}", tool=tool)
133
133
 
134
134
 
135
+ def _validate_paths_exist(paths: Sequence[str], label: str) -> None:
136
+ missing = [p for p in paths if not Path(p).exists()]
137
+ if missing:
138
+ sys.exit(f"\nError: the following {label} do not exist:\n{'\n'.join(missing)}")
139
+
140
+
135
141
  def build_images(
136
142
  commit1: str,
137
143
  commit2: str,
@@ -140,6 +146,8 @@ def build_images(
140
146
  tool: str = "podman",
141
147
  registry: str = "quay.io/legendu",
142
148
  ):
149
+ _validate_paths_exist(image_dirs, "image dirs")
150
+ _validate_paths_exist(paths_monitoring, "monitored paths")
143
151
  if not has_relevant_changes(commit1, commit2, image_dirs, paths_monitoring):
144
152
  print(
145
153
  f"Skip building {tool} images as there are no relevant changes between {
@@ -209,11 +217,11 @@ def parse_args():
209
217
  help="Explicit list of image directories to build.",
210
218
  )
211
219
  group.add_argument(
212
- "-f",
220
+ "-y",
213
221
  "--yaml-image-dirs",
214
222
  dest="yaml_image_dirs",
215
223
  default=None,
216
- metavar="FILE",
224
+ metavar="YAML_FILE",
217
225
  help="Path to a YAML file containing a list of image dirs to build.",
218
226
  )
219
227
  parser.add_argument(
@@ -4,7 +4,7 @@ requires = [ "hatchling" ]
4
4
 
5
5
  [project]
6
6
  name = "github-rest-api"
7
- version = "0.38.0"
7
+ version = "0.38.2"
8
8
  description = "Simple wrapper of GitHub REST APIs."
9
9
  readme = "README.md"
10
10
  authors = [ { name = "Ben Du", email = "longendu@yahoo.com" } ]
@@ -166,7 +166,7 @@ wheels = [
166
166
 
167
167
  [[package]]
168
168
  name = "github-rest-api"
169
- version = "0.38.0"
169
+ version = "0.38.2"
170
170
  source = { editable = "." }
171
171
  dependencies = [
172
172
  { name = "dulwich" },