path-sync 0.7.7__tar.gz → 0.7.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 (31) hide show
  1. {path_sync-0.7.7 → path_sync-0.7.8}/PKG-INFO +8 -3
  2. {path_sync-0.7.7 → path_sync-0.7.8}/README.md +7 -2
  3. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/__init__.py +1 -1
  4. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/_internal/cmd_validate.py +9 -2
  5. {path_sync-0.7.7 → path_sync-0.7.8}/pyproject.toml +2 -1
  6. {path_sync-0.7.7 → path_sync-0.7.8}/.gitignore +0 -0
  7. {path_sync-0.7.7 → path_sync-0.7.8}/LICENSE +0 -0
  8. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/__main__.py +0 -0
  9. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/_internal/__init__.py +0 -0
  10. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/_internal/auto_merge.py +0 -0
  11. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/_internal/cmd_boot.py +0 -0
  12. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/_internal/cmd_copy.py +0 -0
  13. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/_internal/cmd_dep_update.py +0 -0
  14. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/_internal/cmd_options.py +0 -0
  15. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/_internal/file_utils.py +0 -0
  16. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/_internal/git_ops.py +0 -0
  17. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/_internal/header.py +0 -0
  18. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/_internal/log_capture.py +0 -0
  19. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/_internal/models.py +0 -0
  20. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/_internal/models_dep.py +0 -0
  21. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/_internal/prompt_utils.py +0 -0
  22. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/_internal/repo_utils.py +0 -0
  23. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/_internal/typer_app.py +0 -0
  24. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/_internal/validation.py +0 -0
  25. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/_internal/verify.py +0 -0
  26. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/_internal/yaml_utils.py +0 -0
  27. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/config.py +0 -0
  28. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/copy.py +0 -0
  29. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/dep_update.py +0 -0
  30. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/sections.py +0 -0
  31. {path_sync-0.7.7 → path_sync-0.7.8}/path_sync/validate_no_changes.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: path-sync
3
- Version: 0.7.7
3
+ Version: 0.7.8
4
4
  Summary: Sync files from a source repo to multiple destination repos
5
5
  Author-email: EspenAlbert <espen.albert1@gmail.com>
6
6
  License-Expression: MIT
@@ -98,8 +98,10 @@ By default, prompts before each git operation. See [Usage Scenarios](#usage-scen
98
98
  uvx path-sync validate-no-changes -b main
99
99
  ```
100
100
 
101
+ In CI, when the workflow runs on `pull_request`, the comparison branch is the PR base. On `push` or locally, pass `-b` with the branch to compare against (e.g. `-b SDLC` for a branch based on SDLC).
102
+
101
103
  Options:
102
- - `-b, --branch` - Default branch to compare against (default: main)
104
+ - `-b, --branch` - Branch to compare against (default: main). When `GITHUB_BASE_REF` is set (e.g. in GitHub Actions), it overrides the default so CI can use the PR base without passing `-b`. If you set `GITHUB_BASE_REF`, use a non-empty branch name.
103
105
  - `--skip-sections` - Comma-separated `path:section_id` pairs to skip (e.g., `justfile:coverage`)
104
106
 
105
107
  ## Usage Scenarios
@@ -376,7 +378,10 @@ jobs:
376
378
  with:
377
379
  fetch-depth: 0
378
380
  - uses: astral-sh/setup-uv@v5
379
- - run: uvx path-sync validate-no-changes -b main
381
+ - name: Validate no changes to synced files
382
+ env:
383
+ GITHUB_BASE_REF: ${{ github.base_ref || 'main' }}
384
+ run: uvx path-sync validate-no-changes
380
385
  ```
381
386
 
382
387
  **Validation skips automatically when:**
@@ -80,8 +80,10 @@ By default, prompts before each git operation. See [Usage Scenarios](#usage-scen
80
80
  uvx path-sync validate-no-changes -b main
81
81
  ```
82
82
 
83
+ In CI, when the workflow runs on `pull_request`, the comparison branch is the PR base. On `push` or locally, pass `-b` with the branch to compare against (e.g. `-b SDLC` for a branch based on SDLC).
84
+
83
85
  Options:
84
- - `-b, --branch` - Default branch to compare against (default: main)
86
+ - `-b, --branch` - Branch to compare against (default: main). When `GITHUB_BASE_REF` is set (e.g. in GitHub Actions), it overrides the default so CI can use the PR base without passing `-b`. If you set `GITHUB_BASE_REF`, use a non-empty branch name.
85
87
  - `--skip-sections` - Comma-separated `path:section_id` pairs to skip (e.g., `justfile:coverage`)
86
88
 
87
89
  ## Usage Scenarios
@@ -358,7 +360,10 @@ jobs:
358
360
  with:
359
361
  fetch-depth: 0
360
362
  - uses: astral-sh/setup-uv@v5
361
- - run: uvx path-sync validate-no-changes -b main
363
+ - name: Validate no changes to synced files
364
+ env:
365
+ GITHUB_BASE_REF: ${{ github.base_ref || 'main' }}
366
+ run: uvx path-sync validate-no-changes
362
367
  ```
363
368
 
364
369
  **Validation skips automatically when:**
@@ -5,7 +5,7 @@ from path_sync import dep_update
5
5
  from path_sync import validate_no_changes
6
6
  from path_sync import config
7
7
 
8
- VERSION = "0.7.7"
8
+ VERSION = "0.7.8"
9
9
  __all__ = [
10
10
  "copy",
11
11
  "dep_update",
@@ -15,7 +15,13 @@ logger = logging.getLogger(__name__)
15
15
 
16
16
  @app.command("validate-no-changes")
17
17
  def validate_no_changes(
18
- branch: str = typer.Option("main", "-b", "--branch", help="Default branch to compare against"),
18
+ branch: str = typer.Option(
19
+ "main",
20
+ "-b",
21
+ "--branch",
22
+ help="Branch to compare against (default: main; uses GITHUB_BASE_REF when set and -b not passed)",
23
+ envvar="GITHUB_BASE_REF",
24
+ ),
19
25
  skip_sections_opt: str = typer.Option(
20
26
  "",
21
27
  "--skip-sections",
@@ -36,9 +42,10 @@ def validate_no_changes(
36
42
  logger.info(f"On sync branch {current_branch}, validation skipped")
37
43
  return
38
44
  if current_branch == branch:
39
- logger.info(f"On default branch {branch}, validation skipped")
45
+ logger.info(f"On base branch {branch}, validation skipped")
40
46
  return
41
47
 
48
+ logger.info(f"Validating changes against branch {branch}")
42
49
  skip_sections = parse_skip_sections(skip_sections_opt) if skip_sections_opt else None
43
50
  unauthorized = validate_no_unauthorized_changes(repo_root, branch, skip_sections)
44
51
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  [project]
4
4
  name = "path-sync"
5
- version = "0.7.7"
5
+ version = "0.7.8"
6
6
  description = "Sync files from a source repo to multiple destination repos"
7
7
  requires-python = ">=3.13"
8
8
  license = "MIT"
@@ -106,6 +106,7 @@ dev-test = [
106
106
  "pytest>=9.0",
107
107
  "pytest-asyncio>=0.24",
108
108
  "pytest-cov>=7.0",
109
+ "pytest-examples>=0.0.18",
109
110
  "pytest-regressions>=2.6",
110
111
  ]
111
112
  # === OK_EDIT: path-sync dev-test ===
File without changes
File without changes
File without changes
File without changes