PyPatchMatch 2.2.0rc1__tar.gz → 2.2.0rc2__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. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/CLAUDE.md +4 -2
  2. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/PKG-INFO +5 -5
  3. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/README.md +3 -3
  4. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/patchmatch/_version.py +3 -3
  5. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/pyproject.toml +4 -2
  6. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/scripts/evaluate_inpainting.py +3 -3
  7. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/CMakeLists.txt +0 -0
  8. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/LICENSE +0 -0
  9. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/SECURITY.md +0 -0
  10. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/examples/images/camera_aged.png +0 -0
  11. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/examples/images/camera_damaged.png +0 -0
  12. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/examples/images/camera_damaged_mask.png +0 -0
  13. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/examples/images/chelsea.png +0 -0
  14. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/examples/images/forest_pruned.bmp +0 -0
  15. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/patchmatch/__init__.py +0 -0
  16. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/patchmatch/_lib.py +0 -0
  17. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/patchmatch/csrc/inpaint.cpp +0 -0
  18. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/patchmatch/csrc/inpaint.h +0 -0
  19. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/patchmatch/csrc/masked_image.cpp +0 -0
  20. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/patchmatch/csrc/masked_image.h +0 -0
  21. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/patchmatch/csrc/nnf.cpp +0 -0
  22. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/patchmatch/csrc/nnf.h +0 -0
  23. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/patchmatch/csrc/pyinterface.cpp +0 -0
  24. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/patchmatch/csrc/pyinterface.h +0 -0
  25. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/patchmatch/patch_match.py +0 -0
  26. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/patchmatch/py.typed +0 -0
  27. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/scripts/build_opencv.py +0 -0
  28. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/scripts/render_readme_example.py +0 -0
  29. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/tests/conftest.py +0 -0
  30. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/tests/test_e2e.py +0 -0
  31. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/tests/test_patch_match.py +0 -0
  32. {pypatchmatch-2.2.0rc1 → pypatchmatch-2.2.0rc2}/tests/test_properties.py +0 -0
@@ -102,8 +102,10 @@ CMake installs the shared library into the package directory.
102
102
  members, `k` constants. Commit a reformat separately and add its hash to
103
103
  `.git-blame-ignore-revs`.
104
104
  - The package ships `py.typed`; public functions are fully annotated. mypy checks
105
- `patchmatch` and `tests` in strict mode (`[tool.mypy]`); the tests have to use the
106
- API correctly but need no annotations of their own. A deliberately wrong argument
105
+ `examples`, `patchmatch`, `scripts` and `tests` in strict mode (`[tool.mypy]`); the
106
+ tests have to use the API correctly but need no annotations of their own. Only the
107
+ examples annotate their locals and pass arguments by keyword, for readers who copy
108
+ them. A deliberately wrong argument
107
109
  goes through a test parameter instead of a `# type: ignore`.
108
110
  - Backwards compatibility: `from patchmatch import patch_match` and
109
111
  `patch_match.CShapeT`/`CMatT` keep working (tested).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyPatchMatch
3
- Version: 2.2.0rc1
3
+ Version: 2.2.0rc2
4
4
  Summary: This library implements the PatchMatch based inpainting algorithm.
5
5
  Keywords: inpainting,patchmatch,image-processing,opencv
6
6
  Author-Email: The InvokeAI Project <lincoln.stein@gmail.com>, Jiayuan Mao <maojiayuan@gmail.com>, Kyle Schouviller <kyle0654@hotmail.com>, Matthias Wild <mauwii@outlook.de>, Younesse ANDAM <younesse.andam@gmail.com>
@@ -51,7 +51,7 @@ with some bug fixes, and updates. This repository continues
51
51
  the forks [lkwq007/PyPatchMatch](https://github.com/lkwq007/PyPatchMatch) and
52
52
  [invoke-ai/PyPatchMatch](https://github.com/invoke-ai/PyPatchMatch).
53
53
 
54
- ![Birdhouses removed from a photo by patchmatch.inpaint](https://raw.githubusercontent.com/mauwii/PyPatchMatch/v2.2.0rc1/examples/images/readme_example.jpg)
54
+ ![Birdhouses removed from a photo by patchmatch.inpaint](https://raw.githubusercontent.com/mauwii/PyPatchMatch/v2.2.0rc2/examples/images/readme_example.jpg)
55
55
 
56
56
  From left to right: the photo, the input of
57
57
  [examples/py_example.py](https://github.com/mauwii/PyPatchMatch/blob/main/examples/py_example.py)
@@ -64,9 +64,9 @@ pip install PyPatchMatch
64
64
  ```
65
65
 
66
66
  Wheels for Linux (glibc, x86_64 and aarch64), macOS 11+ (arm64 and x86_64) and Windows
67
- (x64) ship the compiled library with a statically linked OpenCV, so no compiler or
68
- OpenCV installation is needed. On other platforms, e.g. Alpine Linux or Windows on ARM,
69
- pip builds from the source distribution, which requires a C++17 compiler, CMake and the
67
+ (x64 and ARM64) ship the compiled library with a statically linked OpenCV, so no
68
+ compiler or OpenCV installation is needed. On other platforms, e.g. Alpine Linux, pip
69
+ builds from the source distribution, which requires a C++17 compiler, CMake and the
70
70
  OpenCV development files (e.g. `apt install libopencv-dev` or `brew install opencv`).
71
71
 
72
72
  If that build fails, PyPatchMatch is installed without the native library instead of
@@ -34,9 +34,9 @@ pip install PyPatchMatch
34
34
  ```
35
35
 
36
36
  Wheels for Linux (glibc, x86_64 and aarch64), macOS 11+ (arm64 and x86_64) and Windows
37
- (x64) ship the compiled library with a statically linked OpenCV, so no compiler or
38
- OpenCV installation is needed. On other platforms, e.g. Alpine Linux or Windows on ARM,
39
- pip builds from the source distribution, which requires a C++17 compiler, CMake and the
37
+ (x64 and ARM64) ship the compiled library with a statically linked OpenCV, so no
38
+ compiler or OpenCV installation is needed. On other platforms, e.g. Alpine Linux, pip
39
+ builds from the source distribution, which requires a C++17 compiler, CMake and the
40
40
  OpenCV development files (e.g. `apt install libopencv-dev` or `brew install opencv`).
41
41
 
42
42
  If that build fails, PyPatchMatch is installed without the native library instead of
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '2.2.0rc1'
22
- __version_tuple__ = version_tuple = (2, 2, 0, 'rc1')
21
+ __version__ = version = '2.2.0rc2'
22
+ __version_tuple__ = version_tuple = (2, 2, 0, 'rc2')
23
23
 
24
- __commit_id__ = commit_id = 'ge40b76e89'
24
+ __commit_id__ = commit_id = 'gd6affc5f5'
@@ -120,6 +120,8 @@ environment = { OpenCV_ROOT = "/tmp/opencv", MACOSX_DEPLOYMENT_TARGET = "11.0" }
120
120
  environment = { OpenCV_ROOT = "C:/opencv" }
121
121
 
122
122
  [tool.uv]
123
+ # the cooldown of dependabot.yml for uv lock --upgrade
124
+ exclude-newer = "7 days"
123
125
  # Rebuild the package whenever the native sources or the git version change.
124
126
  cache-keys = [
125
127
  { file = "CMakeLists.txt" },
@@ -131,7 +133,6 @@ cache-keys = [
131
133
  [tool.ruff]
132
134
  extend-exclude = ["patchmatch/csrc"]
133
135
  line-length = 88
134
- target-version = "py311"
135
136
 
136
137
  [tool.ruff.lint]
137
138
  select = ["B", "C4", "E", "F", "I", "RUF", "SIM", "UP", "W"]
@@ -144,7 +145,7 @@ patch = ["subprocess"]
144
145
  fail_under = 95
145
146
 
146
147
  [tool.mypy]
147
- files = ["patchmatch", "tests"]
148
+ files = ["examples", "patchmatch", "scripts", "tests"]
148
149
  strict = true
149
150
 
150
151
  [[tool.mypy.overrides]]
@@ -163,6 +164,7 @@ warn_return_any = false
163
164
  addopts = ["--cov-branch", "--cov-report=term:skip-covered", "--cov=patchmatch"]
164
165
  # shows which test hangs before the job timeout kills the run
165
166
  faulthandler_timeout = 300
167
+ filterwarnings = ["error"]
166
168
  markers = ["e2e: end-to-end tests of the user workflows (deselect with -m 'not e2e')"]
167
169
  minversion = "9.0"
168
170
  python_files = ["test_*.py"]
@@ -109,12 +109,12 @@ def load(path: Path) -> np.ndarray:
109
109
 
110
110
 
111
111
  def white(image: np.ndarray) -> np.ndarray:
112
- return (image == 255).all(axis=2)
112
+ return np.all(image == 255, axis=2)
113
113
 
114
114
 
115
115
  def ellipse(shape: tuple[int, ...], cy: int, cx: int, ry: int, rx: int) -> np.ndarray:
116
116
  yy, xx = np.mgrid[: shape[0], : shape[1]]
117
- return ((yy - cy) / ry) ** 2 + ((xx - cx) / rx) ** 2 < 1
117
+ return np.asarray(((yy - cy) / ry) ** 2 + ((xx - cx) / rx) ** 2 < 1)
118
118
 
119
119
 
120
120
  def cut(
@@ -472,7 +472,7 @@ def section(case: Case, results: list[Result], labels: list[str]) -> str:
472
472
  shown = case.image.copy()
473
473
  if case.global_mask is not None:
474
474
  shown[case.global_mask] //= 2
475
- versions = [("holes", shown, None)]
475
+ versions: list[tuple[str, np.ndarray, Result | None]] = [("holes", shown, None)]
476
476
  versions += [(label, r.fill, r) for label, r in zip(labels, results, strict=True)]
477
477
  if case.truth is not None:
478
478
  versions.append(("original", case.truth, None))
File without changes