Skip to content

Commit f1f54ea

Browse files
authored
Revise README.md, CONTRIBUTING.md, pyproject.toml. Set version to 0.3.6 (#42)
1 parent 5f56a9c commit f1f54ea

File tree

7 files changed

+36
-30
lines changed

7 files changed

+36
-30
lines changed

.pylintrc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ ignore=tests, data, venv
66
ignore-paths=^(.*/)?tests?(/.*)?$
77

88
[MESSAGES CONTROL]
9-
# Missing function or method docstring
10-
# Missing class docstring
119
# Similar lines in 2 files
1210
# Module 'cv2' has no 'rotate' member (no-member)
13-
disable=C0116,C0115,R0801,E1101
11+
disable=missing-function-docstring,
12+
missing-class-docstring,
13+
R0801,
14+
E1101

CONTRIBUTING.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,15 @@ should be run in **Terminal** window on **macOS**.
4343

4444
#### One-time `uv` Setup
4545

46-
Install the [`uv`](https://github.com/astral-sh/uv) tool one-time to prepare for
47-
**all** Python tools and packages installation. Install
46+
Install the Astral's [`uv`](https://github.com/astral-sh/uv) tool once to prepare for
47+
**all** Python tools and packages installation. Install the Astral's
4848
[`uv`](https://github.com/astral-sh/uv) by its standalone installers:
4949

5050
```
5151
# On macOS and Linux.
5252
curl -LsSf https://astral.sh/uv/install.sh | sh
5353
```
5454

55-
After `git clone ...` the repo to your local disk, go to the local project folder
56-
and run the [`uv`](https://github.com/astral-sh/uv) command:
57-
58-
```
59-
uv pip install -e '.[dev]'
60-
```
61-
6255
This will create a hidden virtualenv dir in the local project folder - `.venv` and
6356
install all dependencies defined in the `pyproject.toml` file in this virtualenv.
6457

@@ -73,6 +66,20 @@ Run the command to activate the development virtualenv:
7366
source .venv/bin/activate
7467
```
7568

69+
#### Install Development Dependencies
70+
71+
Run the command to install all dependencies:
72+
73+
```
74+
uv pip install -e '.[dev]'
75+
```
76+
77+
Optionally, you can create the `requirements.txt` file by command:
78+
79+
```
80+
uv pip compile pyproject.toml -o requirements.txt
81+
```
82+
7683
#### Activate `pre-commit`
7784

7885
The [`pre-commit`](https://pre-commit.com/#installation) tool is installed as part

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Makefile to clean, lint and test with code coverage
2-
# Copyright © 2025 John Liu
2+
# Copyright © 2025 - Present John Liu
33

44
PYTHON_FILES = batch_img
55

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ folder / directory. Tested working on **macOS** and **Windows**.
88

99
### Installation
1010

11+
The `Remove background (make background transparent)` feature depends on `onnxruntime`
12+
library. It's yet to support `Python 3.14`.
13+
1114
#### Requirements
1215

1316
```
@@ -16,7 +19,7 @@ python: >=3.12, <3.14
1619

1720
#### One-time Setup
1821

19-
Install the Astral's [`uv`](https://github.com/astral-sh/uv) tool one-time to
22+
Install the Astral's [`uv`](https://github.com/astral-sh/uv) tool once to
2023
prepare for **all** Python tools and packages installation. Install the Astral's
2124
[`uv`](https://github.com/astral-sh/uv) by its standalone installers:
2225

@@ -63,7 +66,7 @@ uv pip install --upgrade batch_img
6366

6467
```
6568
✗ batch_img --version
66-
0.3.5
69+
0.3.6
6770
6871
6972
✗ batch_img auto ~/Documents
@@ -76,7 +79,8 @@ Auto processed 8/8 files
7679
### Contribution
7780

7881
Contributions are welcome!
79-
Please see the details in [Contribution Guidelines](https://github.com/john-liu2/batch_img/blob/main/CONTRIBUTING.md)
82+
Please see the details
83+
in [Contribution Guidelines](https://github.com/john-liu2/batch_img/blob/main/CONTRIBUTING.md)
8084

8185
### Help
8286

batch_img/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""const.py - define constants
2-
Copyright © 2025 John Liu
2+
Copyright © 2025 - Present John Liu
33
"""
44

55
from dataclasses import dataclass

pyproject.toml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ requires = ["setuptools>=80.0"]
44

55
[project]
66
name = "batch_img"
7-
version = "0.3.5"
7+
version = "0.3.6"
88
description = "Batch process (resize, rotate, remove background, remove GPS, add border, set transparency, auto do all) image files (HEIC, JPG, PNG)"
99
readme = "README.md"
1010
authors = [{ name = "John Liu", email = "rim2rim@gmail.com" }]
@@ -33,7 +33,7 @@ dependencies = [
3333
"piexif",
3434
"pillow",
3535
"pillow-heif",
36-
"rembg",
36+
"rembg", # `remove background` depends on onnxruntime
3737
"tqdm",
3838
]
3939
[project.scripts]
@@ -46,11 +46,9 @@ Homepage = "https://github.com/john-liu2/batch_img"
4646
[tool.setuptools.packages.find]
4747
include = ["*"]
4848

49-
# Dev config
5049
[project.optional-dependencies]
51-
# uv pip compile pyproject.toml -o requirements.txt
52-
# uv pip install -e '.[dev]'
5350
dev = [
51+
"build", # for python -m build
5452
"pytest-cov", # also install pytest
5553
"black>=25.1.0",
5654
"ruff",
@@ -73,11 +71,7 @@ lint.select = [
7371
]
7472
lint.ignore = [
7573
"RET504",
76-
"PLR0913",
77-
"PLR0917",
78-
"PLR0904",
7974
"PLR2004", # Magic value used in comparison, consider replacing `3` with a constant variable
80-
"E266", # Too many leading `#` before block comment
8175
]
8276
lint.fixable = ["E", "F", "I", "UP"]
8377
preview = true

tests/test_common.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Test common.py
22
pytest -sv tests/test_common.py
3-
Copyright © 2025 John Liu
3+
Copyright © 2025 - Present John Liu
44
"""
55

66
import json
@@ -20,7 +20,7 @@
2020
_dir = dirname(__file__)
2121

2222

23-
@pytest.fixture(params=[(PKG_NAME, "0.3.5"), ("", "0.3.5")])
23+
@pytest.fixture(params=[(PKG_NAME, "0.3.6"), ("", "0.3.6")])
2424
def ver_data(request):
2525
return request.param
2626

@@ -36,7 +36,7 @@ def test_get_version(ver_data):
3636
(
3737
"0.9.9",
3838
PKG_NAME,
39-
f"🔔 Update available: 0.3.5 → 0.9.9\nRun '{PKG_NAME} --update'",
39+
f"🔔 Update available: 0.3.6 → 0.9.9\nRun '{PKG_NAME} --update'",
4040
),
4141
]
4242
)
@@ -54,7 +54,7 @@ def test_check_latest_version(mock_get_latest_pypi, data_check_latest_version):
5454

5555
@pytest.fixture(
5656
params=[
57-
(PKG_NAME, 0, "0.3.4"),
57+
(PKG_NAME, 0, "0.3.6"),
5858
("bad_bogus", 1, UNKNOWN),
5959
]
6060
)

0 commit comments

Comments
 (0)