fotolab 0.16.13__tar.gz → 0.16.14__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 (41) hide show
  1. {fotolab-0.16.13 → fotolab-0.16.14}/.pre-commit-config.yaml +1 -1
  2. {fotolab-0.16.13 → fotolab-0.16.14}/CHANGELOG.md +7 -0
  3. {fotolab-0.16.13 → fotolab-0.16.14}/PKG-INFO +1 -1
  4. {fotolab-0.16.13 → fotolab-0.16.14}/Pipfile.lock +3 -3
  5. {fotolab-0.16.13 → fotolab-0.16.14}/fotolab/__init__.py +1 -1
  6. {fotolab-0.16.13 → fotolab-0.16.14}/noxfile.py +48 -0
  7. {fotolab-0.16.13 → fotolab-0.16.14}/.coveragerc +0 -0
  8. {fotolab-0.16.13 → fotolab-0.16.14}/.gitignore +0 -0
  9. {fotolab-0.16.13 → fotolab-0.16.14}/.python-version +0 -0
  10. {fotolab-0.16.13 → fotolab-0.16.14}/CONTRIBUTING.md +0 -0
  11. {fotolab-0.16.13 → fotolab-0.16.14}/LICENSE.md +0 -0
  12. {fotolab-0.16.13 → fotolab-0.16.14}/Pipfile +0 -0
  13. {fotolab-0.16.13 → fotolab-0.16.14}/README.md +0 -0
  14. {fotolab-0.16.13 → fotolab-0.16.14}/docs/Makefile +0 -0
  15. {fotolab-0.16.13 → fotolab-0.16.14}/docs/make.bat +0 -0
  16. {fotolab-0.16.13 → fotolab-0.16.14}/docs/source/CHANGELOG.md +0 -0
  17. {fotolab-0.16.13 → fotolab-0.16.14}/docs/source/CONTRIBUTING.md +0 -0
  18. {fotolab-0.16.13 → fotolab-0.16.14}/docs/source/LICENSE.md +0 -0
  19. {fotolab-0.16.13 → fotolab-0.16.14}/docs/source/README.md +0 -0
  20. {fotolab-0.16.13 → fotolab-0.16.14}/docs/source/_static/logo.jpg +0 -0
  21. {fotolab-0.16.13 → fotolab-0.16.14}/docs/source/conf.py +0 -0
  22. {fotolab-0.16.13 → fotolab-0.16.14}/docs/source/index.rst +0 -0
  23. {fotolab-0.16.13 → fotolab-0.16.14}/fotolab/__main__.py +0 -0
  24. {fotolab-0.16.13 → fotolab-0.16.14}/fotolab/animate.py +0 -0
  25. {fotolab-0.16.13 → fotolab-0.16.14}/fotolab/auto.py +0 -0
  26. {fotolab-0.16.13 → fotolab-0.16.14}/fotolab/border.py +0 -0
  27. {fotolab-0.16.13 → fotolab-0.16.14}/fotolab/cli.py +0 -0
  28. {fotolab-0.16.13 → fotolab-0.16.14}/fotolab/contrast.py +0 -0
  29. {fotolab-0.16.13 → fotolab-0.16.14}/fotolab/env.py +0 -0
  30. {fotolab-0.16.13 → fotolab-0.16.14}/fotolab/info.py +0 -0
  31. {fotolab-0.16.13 → fotolab-0.16.14}/fotolab/montage.py +0 -0
  32. {fotolab-0.16.13 → fotolab-0.16.14}/fotolab/resize.py +0 -0
  33. {fotolab-0.16.13 → fotolab-0.16.14}/fotolab/rotate.py +0 -0
  34. {fotolab-0.16.13 → fotolab-0.16.14}/fotolab/sharpen.py +0 -0
  35. {fotolab-0.16.13 → fotolab-0.16.14}/fotolab/watermark.py +0 -0
  36. {fotolab-0.16.13 → fotolab-0.16.14}/pyproject.toml +0 -0
  37. {fotolab-0.16.13 → fotolab-0.16.14}/tests/__init__.py +0 -0
  38. {fotolab-0.16.13 → fotolab-0.16.14}/tests/conftest.py +0 -0
  39. {fotolab-0.16.13 → fotolab-0.16.14}/tests/test_env.py +0 -0
  40. {fotolab-0.16.13 → fotolab-0.16.14}/tests/test_help_flag.py +0 -0
  41. {fotolab-0.16.13 → fotolab-0.16.14}/tests/test_quiet_flag.py +0 -0
@@ -15,7 +15,7 @@ repos:
15
15
  - id: trailing-whitespace
16
16
 
17
17
  - repo: https://github.com/abravalheri/validate-pyproject
18
- rev: v0.18
18
+ rev: v0.19
19
19
  hooks:
20
20
  - id: validate-pyproject
21
21
  name: validate-pyproject
@@ -7,6 +7,13 @@ and this project adheres to [0-based versioning](https://0ver.org/).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## v0.16.14 (2024-08-18)
11
+
12
+ - Add `release` session in `nox` to bump release
13
+ - Bump deps and `pre-commit` hooks
14
+ - Run `lint` session in `nox` using latest Python
15
+ - Trunate updated readme during write
16
+
10
17
  ## v0.16.13 (2024-08-11)
11
18
 
12
19
  - Bump deps and `pre-commit` hooks
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fotolab
3
- Version: 0.16.13
3
+ Version: 0.16.14
4
4
  Summary: A console program that manipulate images.
5
5
  Keywords: photography,photo
6
6
  Author-email: Kian-Meng Ang <kianmeng@cpan.org>
@@ -978,11 +978,11 @@
978
978
  },
979
979
  "zipp": {
980
980
  "hashes": [
981
- "sha256:bf1dcf6450f873a13e952a29504887c89e6de7506209e5b1bcc3460135d4de19",
982
- "sha256:f091755f667055f2d02b32c53771a7a6c8b47e1fdbc4b72a8b9072b3eef8015c"
981
+ "sha256:0145e43d89664cfe1a2e533adc75adafed82fe2da404b4bbb6b026c0157bdb31",
982
+ "sha256:58da6168be89f0be59beb194da1250516fdaa062ccebd30127ac65d30045e10d"
983
983
  ],
984
984
  "markers": "python_version >= '3.8'",
985
- "version": "==3.19.2"
985
+ "version": "==3.20.0"
986
986
  }
987
987
  }
988
988
  }
@@ -21,7 +21,7 @@ import subprocess
21
21
  import sys
22
22
  from pathlib import Path
23
23
 
24
- __version__ = "0.16.13"
24
+ __version__ = "0.16.14"
25
25
 
26
26
  log = logging.getLogger(__name__)
27
27
 
@@ -15,7 +15,11 @@
15
15
 
16
16
  """Nox configuration."""
17
17
 
18
+ import ast
19
+ import datetime
20
+
18
21
  import nox
22
+ from packaging.version import Version
19
23
 
20
24
 
21
25
  @nox.session()
@@ -27,6 +31,7 @@ def deps(session: nox.Session) -> None:
27
31
 
28
32
 
29
33
  @nox.session()
34
+ @nox.session(python="3.12")
30
35
  def lint(session: nox.Session) -> None:
31
36
  """Run pre-commit linter."""
32
37
  session.install("pre-commit")
@@ -79,6 +84,49 @@ def readme(session: nox.Session) -> None:
79
84
 
80
85
  f.seek(0)
81
86
  f.write(readme_md)
87
+ f.truncate()
88
+
89
+
90
+ @nox.session(python="3.12", reuse_venv=True)
91
+ def release(_session: nox.Session) -> None:
92
+ """Bump release."""
93
+ with open("fotolab/__init__.py", "r", encoding="utf8") as f:
94
+ tree = ast.parse(f.read())
95
+ current_version = None
96
+ for node in ast.walk(tree):
97
+ if isinstance(node, ast.Assign) and len(node.targets) == 1:
98
+ target, value = node.targets[0], node.value
99
+ if target.id == "__version__" and isinstance(value, ast.Str):
100
+ current_version = value.s
101
+ break
102
+
103
+ if current_version is None:
104
+ raise ValueError("Missing __version__ variable in __init__.py")
105
+
106
+ before_version = Version(current_version)
107
+ after_version = (
108
+ f"{before_version.major}."
109
+ f"{before_version.minor}."
110
+ f"{before_version.micro + 1}"
111
+ )
112
+
113
+ with open("fotolab/__init__.py", "r+", encoding="utf8") as f:
114
+ content = f.read()
115
+ content = content.replace(str(before_version), after_version)
116
+ f.seek(0)
117
+ f.write(content)
118
+ f.truncate()
119
+
120
+ with open("CHANGELOG.md", "r+", encoding="utf8") as f:
121
+ date = datetime.date.today().strftime("%Y-%m-%d")
122
+ before_header = "## [Unreleased]\n\n"
123
+ after_header = f"## [Unreleased]\n\n## v{after_version} ({date})\n\n"
124
+
125
+ content = f.read()
126
+ content = content.replace(before_header, after_header)
127
+ f.seek(0)
128
+ f.write(content)
129
+ f.truncate()
82
130
 
83
131
 
84
132
  def _pipenv_install(session: nox.Session) -> None:
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