fotolab 0.26.3__tar.gz → 0.27.0__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.
- {fotolab-0.26.3 → fotolab-0.27.0}/.coveragerc +0 -1
- {fotolab-0.26.3 → fotolab-0.27.0}/CHANGELOG.md +9 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/PKG-INFO +1 -1
- {fotolab-0.26.3 → fotolab-0.27.0}/fotolab/__init__.py +1 -1
- {fotolab-0.26.3 → fotolab-0.27.0}/fotolab/cli.py +4 -1
- {fotolab-0.26.3 → fotolab-0.27.0}/fotolab/subcommands/montage.py +3 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/fotolab/subcommands/rotate.py +2 -6
- {fotolab-0.26.3 → fotolab-0.27.0}/noxfile.py +3 -1
- {fotolab-0.26.3 → fotolab-0.27.0}/.gitignore +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/.pre-commit-config.yaml +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/.python-version +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/CONTRIBUTING.md +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/LICENSE.md +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/Pipfile +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/Pipfile.lock +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/README.md +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/docs/Makefile +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/docs/make.bat +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/docs/source/CHANGELOG.md +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/docs/source/CONTRIBUTING.md +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/docs/source/LICENSE.md +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/docs/source/README.md +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/docs/source/_static/logo.jpg +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/docs/source/conf.py +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/docs/source/index.rst +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/fotolab/__main__.py +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/fotolab/subcommands/__init__.py +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/fotolab/subcommands/animate.py +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/fotolab/subcommands/auto.py +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/fotolab/subcommands/border.py +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/fotolab/subcommands/contrast.py +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/fotolab/subcommands/env.py +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/fotolab/subcommands/halftone.py +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/fotolab/subcommands/info.py +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/fotolab/subcommands/resize.py +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/fotolab/subcommands/sharpen.py +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/fotolab/subcommands/watermark.py +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/pyproject.toml +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/tests/__init__.py +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/tests/conftest.py +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/tests/test_env_subcommand.py +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/tests/test_help_flag.py +0 -0
- {fotolab-0.26.3 → fotolab-0.27.0}/tests/test_quiet_flag.py +0 -0
@@ -7,6 +7,15 @@ and this project adheres to [0-based versioning](https://0ver.org/).
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## v0.27.0 (2025-02-16)
|
11
|
+
|
12
|
+
- Explicitly name the attribute for the subcommand
|
13
|
+
- Refactor rotation calculation
|
14
|
+
- Set coverage to use parallel mode
|
15
|
+
- Use ast.Constant as ast.Str is deprecated for python 3.8+
|
16
|
+
- Use bicubic resampling when rotating image
|
17
|
+
- Validate that two images needed for montage subcommand
|
18
|
+
|
10
19
|
## v0.26.3 (2025-02-09)
|
11
20
|
|
12
21
|
- Bump `pre-commit` hooks
|
@@ -129,7 +129,10 @@ def build_parser() -> argparse.ArgumentParser:
|
|
129
129
|
version=f"%(prog)s {__version__}",
|
130
130
|
)
|
131
131
|
|
132
|
-
subparsers = parser.add_subparsers(
|
132
|
+
subparsers = parser.add_subparsers(
|
133
|
+
help="sub-command help",
|
134
|
+
dest="command",
|
135
|
+
)
|
133
136
|
fotolab.subcommands.build_subparser(subparsers)
|
134
137
|
|
135
138
|
return parser
|
@@ -57,6 +57,9 @@ def run(args: argparse.Namespace) -> None:
|
|
57
57
|
for image_filename in args.image_filenames:
|
58
58
|
images.append(Image.open(image_filename.name))
|
59
59
|
|
60
|
+
if len(images) < 2:
|
61
|
+
raise ValueError("At least two images is required for montage")
|
62
|
+
|
60
63
|
total_width = sum(img.width for img in images)
|
61
64
|
total_height = max(img.height for img in images)
|
62
65
|
|
@@ -67,14 +67,10 @@ def run(args: argparse.Namespace) -> None:
|
|
67
67
|
"""
|
68
68
|
log.debug(args)
|
69
69
|
|
70
|
-
rotation = args.rotation
|
71
|
-
if args.clockwise:
|
72
|
-
rotation = -rotation
|
73
|
-
|
70
|
+
rotation = -args.rotation if args.clockwise else args.rotation
|
74
71
|
for image_filename in args.image_filenames:
|
75
72
|
original_image = Image.open(image_filename)
|
76
73
|
rotated_image = original_image.rotate(
|
77
|
-
rotation,
|
78
|
-
expand=True,
|
74
|
+
rotation, expand=True, resample=Image.Resampling.BICUBIC
|
79
75
|
)
|
80
76
|
save_image(args, rotated_image, image_filename, "rotate")
|
@@ -133,7 +133,9 @@ def release(session: nox.Session) -> None:
|
|
133
133
|
for node in ast.walk(tree):
|
134
134
|
if isinstance(node, ast.Assign) and len(node.targets) == 1:
|
135
135
|
target, value = node.targets[0], node.value
|
136
|
-
if target.id == "__version__" and isinstance(
|
136
|
+
if target.id == "__version__" and isinstance(
|
137
|
+
value, ast.Constant
|
138
|
+
):
|
137
139
|
current_version = value.s
|
138
140
|
break
|
139
141
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|