watchdiff-core 0.1.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 (32) hide show
  1. watchdiff_core-0.1.2/.github/workflows/ci.yml +41 -0
  2. watchdiff_core-0.1.2/.github/workflows/release-testpypi.yml +110 -0
  3. watchdiff_core-0.1.2/.github/workflows/release.yml +123 -0
  4. watchdiff_core-0.1.2/.gitignore +15 -0
  5. watchdiff_core-0.1.2/.python-version +1 -0
  6. watchdiff_core-0.1.2/LICENSE +674 -0
  7. watchdiff_core-0.1.2/PKG-INFO +291 -0
  8. watchdiff_core-0.1.2/README.md +263 -0
  9. watchdiff_core-0.1.2/main.py +217 -0
  10. watchdiff_core-0.1.2/pyproject.toml +50 -0
  11. watchdiff_core-0.1.2/tests/__init__.py +0 -0
  12. watchdiff_core-0.1.2/tests/test_watchdiff.py +163 -0
  13. watchdiff_core-0.1.2/uv.lock +369 -0
  14. watchdiff_core-0.1.2/watchdiff/__init__.py +3 -0
  15. watchdiff_core-0.1.2/watchdiff/cleaner/__init__.py +3 -0
  16. watchdiff_core-0.1.2/watchdiff/cleaner/cleaner.py +131 -0
  17. watchdiff_core-0.1.2/watchdiff/cli/__init__.py +0 -0
  18. watchdiff_core-0.1.2/watchdiff/cli/main.py +217 -0
  19. watchdiff_core-0.1.2/watchdiff/core.py +202 -0
  20. watchdiff_core-0.1.2/watchdiff/diff/__init__.py +3 -0
  21. watchdiff_core-0.1.2/watchdiff/diff/engine.py +131 -0
  22. watchdiff_core-0.1.2/watchdiff/fetcher/__init__.py +3 -0
  23. watchdiff_core-0.1.2/watchdiff/fetcher/fetcher.py +84 -0
  24. watchdiff_core-0.1.2/watchdiff/models.py +163 -0
  25. watchdiff_core-0.1.2/watchdiff/notifier/__init__.py +3 -0
  26. watchdiff_core-0.1.2/watchdiff/notifier/notifier.py +81 -0
  27. watchdiff_core-0.1.2/watchdiff/parser/__init__.py +3 -0
  28. watchdiff_core-0.1.2/watchdiff/parser/parser.py +75 -0
  29. watchdiff_core-0.1.2/watchdiff/scheduler/__init__.py +3 -0
  30. watchdiff_core-0.1.2/watchdiff/scheduler/scheduler.py +223 -0
  31. watchdiff_core-0.1.2/watchdiff/store/__init__.py +3 -0
  32. watchdiff_core-0.1.2/watchdiff/store/store.py +144 -0
@@ -0,0 +1,41 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ lint-and-test:
11
+ name: Lint & Test (Python ${{ matrix.python-version }})
12
+ runs-on: ubuntu-latest
13
+
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ python-version: ["3.14"]
18
+
19
+ steps:
20
+ - name: Checkout code
21
+ uses: actions/checkout@v4
22
+
23
+ - name: Set up Python ${{ matrix.python-version }}
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: ${{ matrix.python-version }}
27
+ allow-prereleases: true
28
+
29
+ - name: Install uv
30
+ uses: astral-sh/setup-uv@v5
31
+ with:
32
+ enable-cache: true
33
+
34
+ - name: Install dependencies
35
+ run: uv sync --all-extras
36
+
37
+ - name: Run ruff lint
38
+ run: uv run ruff check .
39
+
40
+ - name: Run tests
41
+ run: uv run pytest -v --tb=short
@@ -0,0 +1,110 @@
1
+ name: Release to TestPyPI
2
+
3
+ on:
4
+ # Manual trigger from GitHub Actions tab
5
+ workflow_dispatch:
6
+
7
+ # Pre-release tags: v0.1.1-rc1, v0.1.1-beta1, v0.1.1-alpha1
8
+ push:
9
+ tags:
10
+ - "v*.*.*-rc*"
11
+ - "v*.*.*-alpha*"
12
+ - "v*.*.*-beta*"
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ # -----------------------------------------------------------------------
19
+ # Step 1: validate before releasing
20
+ # -----------------------------------------------------------------------
21
+ validate:
22
+ name: Lint & Test
23
+ runs-on: ubuntu-latest
24
+
25
+ steps:
26
+ - name: Checkout code
27
+ uses: actions/checkout@v4
28
+
29
+ - name: Set up Python
30
+ uses: actions/setup-python@v5
31
+ with:
32
+ python-version: "3.14"
33
+ allow-prereleases: true
34
+
35
+ - name: Install uv
36
+ uses: astral-sh/setup-uv@v5
37
+ with:
38
+ enable-cache: true
39
+
40
+ - name: Install dependencies
41
+ run: uv sync --all-extras
42
+
43
+ - name: Run ruff lint
44
+ run: uv run ruff check .
45
+
46
+ - name: Run tests
47
+ run: uv run pytest -v --tb=short
48
+
49
+ # -----------------------------------------------------------------------
50
+ # Step 2: build the distribution
51
+ # -----------------------------------------------------------------------
52
+ build:
53
+ name: Build distribution
54
+ runs-on: ubuntu-latest
55
+ needs: validate
56
+
57
+ steps:
58
+ - name: Checkout code
59
+ uses: actions/checkout@v4
60
+
61
+ - name: Set up Python
62
+ uses: actions/setup-python@v5
63
+ with:
64
+ python-version: "3.14"
65
+ allow-prereleases: true
66
+
67
+ - name: Install uv
68
+ uses: astral-sh/setup-uv@v5
69
+ with:
70
+ enable-cache: true
71
+
72
+ - name: Build wheel and sdist
73
+ run: uv build
74
+
75
+ - name: Verify package with twine
76
+ run: uvx twine check dist/*
77
+
78
+ - name: Upload build artifacts
79
+ uses: actions/upload-artifact@v4
80
+ with:
81
+ name: dist
82
+ path: dist/
83
+ retention-days: 1
84
+
85
+ # -----------------------------------------------------------------------
86
+ # Step 3: publish to TestPyPI via OIDC Trusted Publisher
87
+ # -----------------------------------------------------------------------
88
+ publish:
89
+ name: Publish to TestPyPI
90
+ runs-on: ubuntu-latest
91
+ needs: build
92
+
93
+ environment:
94
+ name: testpypi
95
+ url: https://test.pypi.org/project/watchdiff-core/
96
+
97
+ permissions:
98
+ id-token: write # Required for OIDC authentication
99
+
100
+ steps:
101
+ - name: Download build artifacts
102
+ uses: actions/download-artifact@v4
103
+ with:
104
+ name: dist
105
+ path: dist/
106
+
107
+ - name: Publish to TestPyPI
108
+ uses: pypa/gh-action-pypi-publish@release/v1
109
+ with:
110
+ repository-url: https://upload.test.pypi.org/legacy/
@@ -0,0 +1,123 @@
1
+ name: Release to PyPI
2
+
3
+ on:
4
+ # Stable release tags only: v0.1.1, v1.0.0, etc.
5
+ # Pre-release tags (rc, beta, alpha) must use release-testpypi.yml instead.
6
+ push:
7
+ tags:
8
+ - "v*.*.*"
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ # -----------------------------------------------------------------------
15
+ # Step 1: guard - reject pre-release tags
16
+ # -----------------------------------------------------------------------
17
+ check-tag:
18
+ name: Verify stable tag
19
+ runs-on: ubuntu-latest
20
+
21
+ steps:
22
+ - name: Reject pre-release tags
23
+ run: |
24
+ TAG="${{ github.ref_name }}"
25
+ if [[ "$TAG" =~ -(rc|alpha|beta|a|b)[0-9]* ]]; then
26
+ echo "ERROR: '$TAG' is a pre-release tag."
27
+ echo "Use the 'Release to TestPyPI' workflow for pre-releases."
28
+ exit 1
29
+ fi
30
+ echo "Tag '$TAG' is a stable release. Proceeding."
31
+
32
+ # -----------------------------------------------------------------------
33
+ # Step 2: validate before releasing
34
+ # -----------------------------------------------------------------------
35
+ validate:
36
+ name: Lint & Test
37
+ runs-on: ubuntu-latest
38
+ needs: check-tag
39
+
40
+ steps:
41
+ - name: Checkout code
42
+ uses: actions/checkout@v4
43
+
44
+ - name: Set up Python
45
+ uses: actions/setup-python@v5
46
+ with:
47
+ python-version: "3.14"
48
+ allow-prereleases: true
49
+
50
+ - name: Install uv
51
+ uses: astral-sh/setup-uv@v5
52
+ with:
53
+ enable-cache: true
54
+
55
+ - name: Install dependencies
56
+ run: uv sync --all-extras
57
+
58
+ - name: Run ruff lint
59
+ run: uv run ruff check .
60
+
61
+ - name: Run tests
62
+ run: uv run pytest -v --tb=short
63
+
64
+ # -----------------------------------------------------------------------
65
+ # Step 3: build the distribution
66
+ # -----------------------------------------------------------------------
67
+ build:
68
+ name: Build distribution
69
+ runs-on: ubuntu-latest
70
+ needs: validate
71
+
72
+ steps:
73
+ - name: Checkout code
74
+ uses: actions/checkout@v4
75
+
76
+ - name: Set up Python
77
+ uses: actions/setup-python@v5
78
+ with:
79
+ python-version: "3.14"
80
+ allow-prereleases: true
81
+
82
+ - name: Install uv
83
+ uses: astral-sh/setup-uv@v5
84
+ with:
85
+ enable-cache: true
86
+
87
+ - name: Build wheel and sdist
88
+ run: uv build
89
+
90
+ - name: Verify package with twine
91
+ run: uvx twine check dist/*
92
+
93
+ - name: Upload build artifacts
94
+ uses: actions/upload-artifact@v4
95
+ with:
96
+ name: dist
97
+ path: dist/
98
+ retention-days: 1
99
+
100
+ # -----------------------------------------------------------------------
101
+ # Step 4: publish to PyPI via OIDC Trusted Publisher
102
+ # -----------------------------------------------------------------------
103
+ publish:
104
+ name: Publish to PyPI
105
+ runs-on: ubuntu-latest
106
+ needs: build
107
+
108
+ environment:
109
+ name: pypi
110
+ url: https://pypi.org/project/watchdiff-core/
111
+
112
+ permissions:
113
+ id-token: write # Required for OIDC authentication
114
+
115
+ steps:
116
+ - name: Download build artifacts
117
+ uses: actions/download-artifact@v4
118
+ with:
119
+ name: dist
120
+ path: dist/
121
+
122
+ - name: Publish to PyPI
123
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,15 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+
12
+ # other
13
+ .ruff_cache
14
+ .pytest_cache
15
+ .env
@@ -0,0 +1 @@
1
+ 3.14