drawlib 0.1.33.dev1__tar.gz → 0.1.34__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.

Potentially problematic release.


This version of drawlib might be problematic. Click here for more details.

Files changed (64) hide show
  1. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/PKG-INFO +1 -1
  2. drawlib-0.1.34/drawlib/__init__.py +87 -0
  3. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/__init__.py +2 -2
  4. drawlib-0.1.34/pyproject.toml +98 -0
  5. drawlib-0.1.33.dev1/drawlib/__init__.py +0 -21
  6. drawlib-0.1.33.dev1/pyproject.toml +0 -46
  7. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/LICENSE.txt +0 -0
  8. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/__main__.py +0 -0
  9. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/apis.py +0 -0
  10. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/assets/__init__.py +0 -0
  11. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/assets/v0_1/__init__.py +0 -0
  12. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/assets/v0_1/fonticons/__init__.py +0 -0
  13. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/assets/v0_1/fonts/__init__.py +0 -0
  14. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/__main__.py +0 -0
  15. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/apis.py +0 -0
  16. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/__init__.py +0 -0
  17. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/command.py +0 -0
  18. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/core/__init__.py +0 -0
  19. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/core/colors.py +0 -0
  20. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/core/dimage.py +0 -0
  21. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/core/fonts.py +0 -0
  22. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/core/model.py +0 -0
  23. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/core/model_system_default.py +0 -0
  24. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/core/theme.py +0 -0
  25. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/core/theme_officials.py +0 -0
  26. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/core/theme_style_caches.py +0 -0
  27. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/core/util.py +0 -0
  28. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/core_canvas/__init__.py +0 -0
  29. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/core_canvas/base.py +0 -0
  30. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/core_canvas/canvas.py +0 -0
  31. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/core_canvas/image.py +0 -0
  32. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/core_canvas/line.py +0 -0
  33. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/core_canvas/original_arrow.py +0 -0
  34. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/core_canvas/original_polygon.py +0 -0
  35. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/core_canvas/patches.py +0 -0
  36. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/core_canvas/text.py +0 -0
  37. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/download.py +0 -0
  38. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/dutil/__init__.py +0 -0
  39. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/dutil/dutil_canvas.py +0 -0
  40. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/dutil/dutil_color.py +0 -0
  41. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/dutil/dutil_script.py +0 -0
  42. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/dutil/settings.py +0 -0
  43. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/icons/__init__.py +0 -0
  44. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/icons/phosphor.py +0 -0
  45. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/icons/util.py +0 -0
  46. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/logging.py +0 -0
  47. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/smartarts/__init__.py +0 -0
  48. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/smartarts/bubblespeech.py +0 -0
  49. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/smartarts/dsart.py +0 -0
  50. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/smartarts/sourcecode.py +0 -0
  51. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/util.py +0 -0
  52. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/validators/__init__.py +0 -0
  53. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/validators/args.py +0 -0
  54. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/validators/color.py +0 -0
  55. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/validators/coordinate.py +0 -0
  56. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/validators/icon.py +0 -0
  57. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/validators/image.py +0 -0
  58. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/validators/line.py +0 -0
  59. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/validators/shape.py +0 -0
  60. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/validators/smartarts.py +0 -0
  61. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/validators/style.py +0 -0
  62. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/validators/text.py +0 -0
  63. {drawlib-0.1.33.dev1 → drawlib-0.1.34}/drawlib/v0_1/private/validators/types.py +0 -0
  64. /drawlib-0.1.33.dev1/README.md → /drawlib-0.1.34/pypi.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: drawlib
3
- Version: 0.1.33.dev1
3
+ Version: 0.1.34
4
4
  Summary: Python drawing library. Illustration as Code.
5
5
  Home-page: https://www.drawlib.com
6
6
  Author: Yuichi Ito
@@ -0,0 +1,87 @@
1
+ # Copyright (c) 2024 Yuichi Ito (yuichi@yuichi.com)
2
+ #
3
+ # This software is licensed under the Apache License, Version 2.0.
4
+ # For more information, please visit: https://github.com/yuichi110/drawlib
5
+ #
6
+ # This software is provided "as is", without warranty of any kind,
7
+ # express or implied, including but not limited to the warranties of
8
+ # merchantability, fitness for a particular purpose and noninfringement.
9
+
10
+ """Root package."""
11
+
12
+ import re
13
+ import sys
14
+ from typing import Final, List
15
+
16
+ # please update here when you release new version
17
+ LIB_VERSION = "0.1.34"
18
+
19
+ # please list active main committers (1+ commits per month)
20
+ AUTHORS: Final[List[str]] = [
21
+ "Yuichi Ito <yuichi@yuichi.com>",
22
+ ]
23
+
24
+ # please change accordingly
25
+ LIB_NAME: Final[str] = "drawlib"
26
+ DESCRIPTION: Final[str] = "Python drawing library. Illustration as Code."
27
+ HOMEPAGE: Final[str] = "https://www.drawlib.com"
28
+ REPOSITORY: Final[str] = "https://github.com/yuichi110/drawlib"
29
+ README: Final[str] = "pypi.md"
30
+
31
+ __version__: Final[str] = LIB_VERSION
32
+
33
+
34
+ def _check_version_syntax() -> None: # noqa: C901
35
+ parts = tuple(int(part) if part.isdigit() else part for part in LIB_VERSION.split("."))
36
+
37
+ if not isinstance(parts[0], int):
38
+ raise ValueError(f"Major version must be int. But {LIB_VERSION}")
39
+
40
+ if not isinstance(parts[1], int):
41
+ raise ValueError(f"Minor version must be int. But {LIB_VERSION}")
42
+
43
+ if not isinstance(parts[0], int):
44
+ raise ValueError(f"Patch version must be int. But {LIB_VERSION}")
45
+
46
+ if len(parts) == 3:
47
+ return
48
+
49
+ if len(parts) != 4:
50
+ raise ValueError(
51
+ f'Version syntax is "major.minor.patch" or "major.minor.patch.pre-release". But {LIB_VERSION}',
52
+ )
53
+
54
+ pre_version = parts[3]
55
+ if not isinstance(pre_version, str):
56
+ raise ValueError(f"Pre-release version can't be int. But {LIB_VERSION}")
57
+
58
+ def get_dev_value(text: str) -> int:
59
+ matches = re.findall(r"dev(\d+)", text)
60
+ values = [int(match) for match in matches]
61
+ if not values:
62
+ return -1
63
+ return values[0]
64
+
65
+ def get_rc_value(text: str) -> int:
66
+ matches = re.findall(r"rc(\d+)", text)
67
+ values = [int(match) for match in matches]
68
+ if not values:
69
+ return -1
70
+ return values[0]
71
+
72
+ if get_dev_value(pre_version) >= 1:
73
+ return
74
+
75
+ if get_rc_value(pre_version) >= 1:
76
+ return
77
+
78
+ raise ValueError(f"Pre-release version must be dev<n> or rc<n>. But {LIB_VERSION}")
79
+
80
+
81
+ try:
82
+ _check_version_syntax()
83
+ except ValueError as e:
84
+ print(f"But. Version syntax has problem. {str(e)}")
85
+ print("Please check drawlib.__init__.py")
86
+ print("Abort.")
87
+ sys.exit(1)
@@ -15,7 +15,7 @@ import drawlib
15
15
 
16
16
  # this API package is latest now. So, API version is same to software's one.
17
17
  # When you create newer API, please set string value instead.
18
- VERSION: Final[str] = drawlib.VERSION
18
+ LIB_VERSION: Final[str] = drawlib.LIB_VERSION
19
19
 
20
20
  # might not be changed
21
- __version__: Final[str] = VERSION
21
+ __version__: Final[str] = LIB_VERSION
@@ -0,0 +1,98 @@
1
+ [build-system]
2
+ requires = [ "poetry-core",]
3
+ build-backend = "poetry.core.masonry.api"
4
+
5
+ # GENERATED CODE: START
6
+ # from drawlib.__init__.py
7
+
8
+ [tool.poetry]
9
+ name = "drawlib"
10
+ version = "0.1.34"
11
+ description = "Python drawing library. Illustration as Code."
12
+ homepage = "https://www.drawlib.com"
13
+ repository = "https://github.com/yuichi110/drawlib"
14
+ authors = [
15
+ "Yuichi Ito <yuichi@yuichi.com>",
16
+ ]
17
+ readme = "pypi.md"
18
+
19
+ # GENERATED CODE: END
20
+
21
+ [tool.poetry.scripts]
22
+ drawlib = "drawlib.__main__:main"
23
+
24
+ # minimum python version is 3.9 as of 2024 Jun due to lib dependency
25
+ [tool.poetry.dependencies]
26
+ python = "^3.9"
27
+ matplotlib = "^3.8.3"
28
+ pygments = "^2.17.2"
29
+
30
+ [tool.poetry.group.dev.dependencies]
31
+ types-pillow = "^10.2.0.20240311"
32
+ ruff = "^0.5.0"
33
+ pyright = "^1.1.369"
34
+ pytest = "^8.1.1"
35
+ pytest-cov = "^5.0.0"
36
+
37
+ [tool.ruff]
38
+ preview = true
39
+ fix = true
40
+ unsafe-fixes = false
41
+ line-length = 120
42
+
43
+ [tool.ruff.lint]
44
+ select = [
45
+ "C90", # mccabe
46
+ "F", # Pyflakes
47
+ "D", # pydocstyle
48
+ "E", # Pycodestyle Error
49
+ "I", # isort
50
+ "N", # pep8-naming (N)
51
+ "W", # Pycodestyle Warning
52
+ "ANN", # flake8-annotations (ANN)
53
+ "CPY", # flake8-copyright
54
+ "S", # flake8-bandit
55
+ "PL" # Pylint
56
+ ]
57
+
58
+ ignore = [
59
+ "D203", # 1 blank line required before class docstring
60
+ "D212", # Multi-line docstring summary should start at the first line
61
+ "D415", # First line should end with a period, question mark, or exclamation point
62
+ "F401", # imported but unused
63
+ "ANN101", # Missing type annotation for self in method
64
+ "PLC1901", # compare-to-empty-string
65
+ "PLR0904", # Too many public methods
66
+ "PLR0912", # Too many branches
67
+ "PLR0913", # Too many arguments in function definition
68
+ "PLR0914", # Too many local variables
69
+ "PLR0915", # Too many statements
70
+ "PLR0917", # Too many positional arguments
71
+ "PLR2004", # Magic value used in comparison
72
+ "PLW2901" # Outer variable overwritten by inner target
73
+ ]
74
+
75
+ [tool.ruff.lint.per-file-ignores]
76
+ "scripts/**.py" = [
77
+ "ANN", # flake8-annotations
78
+ "S101", # Use of assert detected
79
+ "S310" # Audit URL open for permitted schemes
80
+ ]
81
+ "tests/**.py" = [
82
+ "F403", # undefined-local-with-import-star
83
+ "F405", # undefined-local-with-import-star-usage
84
+ "D100", # undocumented-public-module
85
+ "D103", # undocumented-public-function
86
+ "D104", # undocumented-public-package
87
+ "ANN", # flake8-annotations
88
+ "S101" # Use of assert detected
89
+ ]
90
+ "test_build_target/**.py" = [
91
+ "F403", # undefined-local-with-import-star
92
+ "F405", # undefined-local-with-import-star-usage
93
+ "D100", # undocumented-public-module
94
+ "D103", # undocumented-public-function
95
+ ]
96
+
97
+ [tool.ruff.lint.pydocstyle]
98
+ convention = "google"
@@ -1,21 +0,0 @@
1
- # Copyright (c) 2024 Yuichi Ito (yuichi@yuichi.com)
2
- #
3
- # This software is licensed under the Apache License, Version 2.0.
4
- # For more information, please visit: https://github.com/yuichi110/drawlib
5
- #
6
- # This software is provided "as is", without warranty of any kind,
7
- # express or implied, including but not limited to the warranties of
8
- # merchantability, fitness for a particular purpose and noninfringement.
9
-
10
- """Root package."""
11
-
12
- from typing import Final
13
-
14
- # please update here when you release new version
15
- VERSION = "0.1.33.dev1"
16
-
17
- # might not be changed
18
- LIB_NAME: Final[str] = "drawlib"
19
- AUTHOR: Final[str] = "Yuichi Ito"
20
- CONTACT: Final[str] = "yuichi@yuichi.com"
21
- __version__: Final[str] = VERSION
@@ -1,46 +0,0 @@
1
- [build-system]
2
- requires = [ "poetry-core",]
3
- build-backend = "poetry.core.masonry.api"
4
-
5
- [tool.poetry]
6
- name = "drawlib"
7
- version = "0.1.33.dev1"
8
- description = "Python drawing library. Illustration as Code."
9
- homepage = "https://www.drawlib.com"
10
- repository = "https://github.com/yuichi110/drawlib"
11
- authors = [ "Yuichi Ito <yuichi@yuichi.com>",]
12
- readme = "README.md"
13
-
14
- [tool.ruff]
15
- preview = true
16
- fix = true
17
- unsafe-fixes = false
18
- line-length = 120
19
-
20
- [tool.poetry.scripts]
21
- drawlib = "drawlib.__main__:main"
22
-
23
- [tool.poetry.dependencies]
24
- python = "^3.9"
25
- matplotlib = "^3.8.3"
26
- pygments = "^2.17.2"
27
-
28
- [tool.ruff.lint]
29
- select = [ "C90", "F", "D", "E", "I", "N", "W", "ANN", "CPY", "S", "PL",]
30
- ignore = [ "D203", "D212", "D415", "F401", "ANN101", "PLC1901", "PLR0904", "PLR0912", "PLR0913", "PLR0914", "PLR0915", "PLR0917", "PLR2004", "PLW2901",]
31
-
32
- [tool.ruff.lint.per-file-ignores]
33
- "scripts/**.py" = [ "ANN", "S101", "S310",]
34
- "tests/**.py" = [ "F403", "F405", "D100", "D103", "D104", "ANN", "S101",]
35
- "test_build_target/**.py" = [ "F403", "F405", "D100", "D103",]
36
-
37
- [tool.ruff.lint.pydocstyle]
38
- convention = "google"
39
-
40
- [tool.poetry.group.dev.dependencies]
41
- types-pillow = "^10.2.0.20240311"
42
- ruff = "^0.5.0"
43
- pyright = "^1.1.369"
44
- pytest = "^8.1.1"
45
- pytest-cov = "^5.0.0"
46
- toml = "^0.10.2"
File without changes
File without changes