pixel-sizes 0.2.0__tar.gz → 0.2.2__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 (30) hide show
  1. {pixel_sizes-0.2.0 → pixel_sizes-0.2.2}/.github/workflows/pypi-publish.yml +8 -16
  2. {pixel_sizes-0.2.0 → pixel_sizes-0.2.2}/.github/workflows/python-test.yml +10 -19
  3. {pixel_sizes-0.2.0 → pixel_sizes-0.2.2}/.gitignore +5 -7
  4. {pixel_sizes-0.2.0 → pixel_sizes-0.2.2}/LICENSE +1 -1
  5. pixel_sizes-0.2.2/PKG-INFO +47 -0
  6. {pixel_sizes-0.2.0 → pixel_sizes-0.2.2}/pixel_sizes/__init__.py +4 -1
  7. {pixel_sizes-0.2.0 → pixel_sizes-0.2.2}/pixel_sizes/_version.py +2 -2
  8. pixel_sizes-0.2.2/pixel_sizes.egg-info/PKG-INFO +47 -0
  9. {pixel_sizes-0.2.0 → pixel_sizes-0.2.2}/pixel_sizes.egg-info/SOURCES.txt +1 -2
  10. pixel_sizes-0.2.2/pyproject.toml +71 -0
  11. pixel_sizes-0.2.2/setup.cfg +4 -0
  12. pixel_sizes-0.2.2/uv.lock +403 -0
  13. pixel_sizes-0.2.0/PKG-INFO +0 -38
  14. pixel_sizes-0.2.0/pixel_sizes.egg-info/PKG-INFO +0 -38
  15. pixel_sizes-0.2.0/poetry.lock +0 -519
  16. pixel_sizes-0.2.0/pyproject.toml +0 -53
  17. pixel_sizes-0.2.0/setup.cfg +0 -37
  18. {pixel_sizes-0.2.0 → pixel_sizes-0.2.2}/.coveragerc +0 -0
  19. {pixel_sizes-0.2.0 → pixel_sizes-0.2.2}/.editorconfig +0 -0
  20. {pixel_sizes-0.2.0 → pixel_sizes-0.2.2}/.github/renovate.json5 +0 -0
  21. {pixel_sizes-0.2.0 → pixel_sizes-0.2.2}/.github/workflows/gitignore-in.yml +0 -0
  22. {pixel_sizes-0.2.0 → pixel_sizes-0.2.2}/.github/workflows/happy.yml +0 -0
  23. {pixel_sizes-0.2.0 → pixel_sizes-0.2.2}/.github/workflows/spellcheck.yml +0 -0
  24. {pixel_sizes-0.2.0 → pixel_sizes-0.2.2}/.gitignore.in +0 -0
  25. {pixel_sizes-0.2.0 → pixel_sizes-0.2.2}/README.md +0 -0
  26. {pixel_sizes-0.2.0 → pixel_sizes-0.2.2}/pixel_sizes/py.typed +0 -0
  27. {pixel_sizes-0.2.0 → pixel_sizes-0.2.2}/pixel_sizes.egg-info/dependency_links.txt +0 -0
  28. {pixel_sizes-0.2.0 → pixel_sizes-0.2.2}/pixel_sizes.egg-info/top_level.txt +0 -0
  29. {pixel_sizes-0.2.0 → pixel_sizes-0.2.2}/tests/__init__.py +0 -0
  30. {pixel_sizes-0.2.0 → pixel_sizes-0.2.2}/tests/test_basis.py +0 -0
@@ -8,7 +8,7 @@ on:
8
8
  types: [prereleased, released]
9
9
 
10
10
  env:
11
- python_version: 3.12
11
+ python_version: 3.13
12
12
 
13
13
  jobs:
14
14
  deploy:
@@ -22,24 +22,16 @@ jobs:
22
22
  with:
23
23
  python-version: ${{ env.python_version }}
24
24
 
25
- - name: Set up poetry
26
- uses: abatilo/actions-poetry@v3
25
+ - name: Set up uv
26
+ uses: astral-sh/setup-uv@v5
27
27
 
28
- - name: Cache
29
- uses: actions/cache@v4
30
- with:
31
- path: ~/.cache/pypoetry/virtualenvs
32
- key: ${{ runner.os }}-build-${{ env.python_version }}-${{ hashFiles('**/poetry.lock') }}
33
- restore-keys: |
34
- ${{ runner.os }}-build-${{ env.python_version }}-${{ hashFiles('**/poetry.lock') }}
35
- ${{ runner.os }}-build-${{ env.python_version }}-
36
- ${{ runner.os }}-
37
-
38
- - run: poetry install
28
+ - name: Install dependencies
29
+ run: |
30
+ uv python pin ${{ env.python_version }}
31
+ uv sync
39
32
 
40
33
  - name: Build
41
- # I use poetry just as a package manager, so this is not `poetry build`
42
- run: poetry run poe build
34
+ run: uv build
43
35
 
44
36
  - name: Publish distribution to Test PyPI
45
37
  uses: pypa/gh-action-pypi-publish@release/v1
@@ -14,7 +14,7 @@ jobs:
14
14
  strategy:
15
15
  fail-fast: false
16
16
  matrix:
17
- python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
17
+ python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
18
18
 
19
19
  steps:
20
20
  - name: Checkout
@@ -26,41 +26,32 @@ jobs:
26
26
  with:
27
27
  python-version: "${{ matrix.python }}"
28
28
 
29
- - name: Set up poetry
30
- uses: abatilo/actions-poetry@v3
29
+ - name: Set up uv
30
+ uses: astral-sh/setup-uv@v5
31
31
 
32
- - name: Cache
33
- uses: actions/cache@v4
34
- with:
35
- path: ~/.cache/pypoetry/virtualenvs
36
- key: ${{ runner.os }}-build-${{ matrix.python }}-${{ hashFiles('**/poetry.lock') }}
37
- restore-keys: |
38
- ${{ runner.os }}-build-${{ matrix.python }}-${{ hashFiles('**/poetry.lock') }}
39
- ${{ runner.os }}-build-${{ matrix.python }}-
40
- ${{ runner.os }}-
41
32
  - name: Install dependencies
42
- run: poetry install
33
+ run: uv sync
43
34
 
44
35
  - name: Lint
45
- run: poetry run poe check
36
+ run: uv run poe check
46
37
 
47
38
  - name: Check Python version
48
39
  run: |
49
- actual_version=$(poetry run python --version)
40
+ actual_version=$(uv run python --version)
50
41
  expected_version="Python ${{ matrix.python }}"
51
42
  if [ "$actual_version" == *"$expected_version"* ]; then
52
43
  echo "Expected $expected_version, but got $actual_version"
53
44
  exit 1
54
45
  fi
55
46
  - name: Test
56
- run: poetry run poe test
47
+ run: uv run poe test
57
48
 
58
49
  - name: Coverage
59
- run: poetry run poe coverage-xml
50
+ run: uv run poe coverage-xml
60
51
 
61
52
  - name: Upload coverage report to Codecov
62
- if: matrix.python == '3.12'
63
- uses: codecov/codecov-action@v4
53
+ if: matrix.python == '3.13'
54
+ uses: codecov/codecov-action@v5
64
55
  with:
65
56
  token: ${{ secrets.CODECOV_TOKEN }}
66
57
  files: ./coverage.xml
@@ -5,7 +5,7 @@
5
5
  # -----------------------------------------------------------------------------
6
6
  # gibo dump Linux
7
7
  ### Generated by gibo (https://github.com/simonwhitaker/gibo)
8
- ### https://raw.github.com/github/gitignore/33243d9491911332228307c915ff95707791a91f/Global/Linux.gitignore
8
+ ### https://raw.github.com/github/gitignore/4488915eec0b3a45b5c63ead28f286819c0917de/Global/Linux.gitignore
9
9
 
10
10
  *~
11
11
 
@@ -23,7 +23,7 @@
23
23
  # -----------------------------------------------------------------------------
24
24
  # gibo dump Windows
25
25
  ### Generated by gibo (https://github.com/simonwhitaker/gibo)
26
- ### https://raw.github.com/github/gitignore/33243d9491911332228307c915ff95707791a91f/Global/Windows.gitignore
26
+ ### https://raw.github.com/github/gitignore/4488915eec0b3a45b5c63ead28f286819c0917de/Global/Windows.gitignore
27
27
 
28
28
  # Windows thumbnail cache files
29
29
  Thumbs.db
@@ -52,7 +52,7 @@ $RECYCLE.BIN/
52
52
  # -----------------------------------------------------------------------------
53
53
  # gibo dump macOS
54
54
  ### Generated by gibo (https://github.com/simonwhitaker/gibo)
55
- ### https://raw.github.com/github/gitignore/33243d9491911332228307c915ff95707791a91f/Global/macOS.gitignore
55
+ ### https://raw.github.com/github/gitignore/4488915eec0b3a45b5c63ead28f286819c0917de/Global/macOS.gitignore
56
56
 
57
57
  # General
58
58
  .DS_Store
@@ -83,7 +83,7 @@ Temporary Items
83
83
  # -----------------------------------------------------------------------------
84
84
  # gibo dump Python
85
85
  ### Generated by gibo (https://github.com/simonwhitaker/gibo)
86
- ### https://raw.github.com/github/gitignore/33243d9491911332228307c915ff95707791a91f/Python.gitignore
86
+ ### https://raw.github.com/github/gitignore/4488915eec0b3a45b5c63ead28f286819c0917de/Python.gitignore
87
87
 
88
88
  # Byte-compiled / optimized / DLL files
89
89
  __pycache__/
@@ -193,10 +193,8 @@ ipython_config.py
193
193
  #pdm.lock
194
194
  # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
195
195
  # in version control.
196
- # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
196
+ # https://pdm.fming.dev/#use-with-ide
197
197
  .pdm.toml
198
- .pdm-python
199
- .pdm-build/
200
198
 
201
199
  # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
202
200
  __pypackages__/
@@ -1,4 +1,4 @@
1
- Copyright 2022 Kitsu Yui
1
+ Copyright 2022-2025 Kitsu Yui
2
2
 
3
3
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4
4
 
@@ -0,0 +1,47 @@
1
+ Metadata-Version: 2.2
2
+ Name: pixel_sizes
3
+ Version: 0.2.2
4
+ Summary: Pixel sizes
5
+ Author-email: Yui KITSU <kitsuyui+github@kitsuyui.com>
6
+ License: Copyright 2022-2025 Kitsu Yui
7
+
8
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
9
+
10
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
13
+
14
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17
+
18
+ Project-URL: Homepage, https://github.com/kitsuyui/python-pixel-sizes
19
+ Classifier: License :: OSI Approved :: BSD License
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Intended Audience :: Developers
26
+ Classifier: Topic :: Software Development :: Libraries
27
+ Requires-Python: >=3.9
28
+ Description-Content-Type: text/markdown
29
+ License-File: LICENSE
30
+
31
+ # python-pixel-sizes
32
+
33
+ [![codecov](https://codecov.io/gh/kitsuyui/python-pixel-sizes/graph/badge.svg?token=830WMASKHU)](https://codecov.io/gh/kitsuyui/python-pixel-sizes)
34
+
35
+ ## Usage
36
+
37
+ ```python
38
+ from pixel_sizes import SIZES
39
+
40
+ SIZES['8k'].width # 7680
41
+ SIZES['8k'].height # 4320
42
+ SIZES['8k'].aspect_ratio() # 16/9 == 1.7777777777777777
43
+ ```
44
+
45
+ # LICENSE
46
+
47
+ The 3-Clause BSD License. See also LICENSE file.
@@ -1,5 +1,8 @@
1
1
  from dataclasses import dataclass
2
2
 
3
+ # https://packaging-guide.openastronomy.org/en/latest/advanced/versioning.html
4
+ from ._version import __version__
5
+
3
6
 
4
7
  @dataclass(frozen=True)
5
8
  class Size:
@@ -26,4 +29,4 @@ SIZES = {
26
29
  }
27
30
 
28
31
 
29
- __all__ = ["Size", "SIZES"]
32
+ __all__ = ["Size", "SIZES", "__version__"]
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.2.0'
16
- __version_tuple__ = version_tuple = (0, 2, 0)
15
+ __version__ = version = '0.2.2'
16
+ __version_tuple__ = version_tuple = (0, 2, 2)
@@ -0,0 +1,47 @@
1
+ Metadata-Version: 2.2
2
+ Name: pixel_sizes
3
+ Version: 0.2.2
4
+ Summary: Pixel sizes
5
+ Author-email: Yui KITSU <kitsuyui+github@kitsuyui.com>
6
+ License: Copyright 2022-2025 Kitsu Yui
7
+
8
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
9
+
10
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
13
+
14
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17
+
18
+ Project-URL: Homepage, https://github.com/kitsuyui/python-pixel-sizes
19
+ Classifier: License :: OSI Approved :: BSD License
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Intended Audience :: Developers
26
+ Classifier: Topic :: Software Development :: Libraries
27
+ Requires-Python: >=3.9
28
+ Description-Content-Type: text/markdown
29
+ License-File: LICENSE
30
+
31
+ # python-pixel-sizes
32
+
33
+ [![codecov](https://codecov.io/gh/kitsuyui/python-pixel-sizes/graph/badge.svg?token=830WMASKHU)](https://codecov.io/gh/kitsuyui/python-pixel-sizes)
34
+
35
+ ## Usage
36
+
37
+ ```python
38
+ from pixel_sizes import SIZES
39
+
40
+ SIZES['8k'].width # 7680
41
+ SIZES['8k'].height # 4320
42
+ SIZES['8k'].aspect_ratio() # 16/9 == 1.7777777777777777
43
+ ```
44
+
45
+ # LICENSE
46
+
47
+ The 3-Clause BSD License. See also LICENSE file.
@@ -4,9 +4,8 @@
4
4
  .gitignore.in
5
5
  LICENSE
6
6
  README.md
7
- poetry.lock
8
7
  pyproject.toml
9
- setup.cfg
8
+ uv.lock
10
9
  .github/renovate.json5
11
10
  .github/workflows/gitignore-in.yml
12
11
  .github/workflows/happy.yml
@@ -0,0 +1,71 @@
1
+ [project]
2
+ name = "pixel_sizes"
3
+ dynamic = ["version"]
4
+ requires-python = ">=3.9"
5
+ dependencies = []
6
+ description = "Pixel sizes"
7
+ readme = {file = "README.md", content-type = "text/markdown"}
8
+ license = { file = "LICENSE" }
9
+ authors = [
10
+ {name = "Yui KITSU", email = "kitsuyui+github@kitsuyui.com"}
11
+ ]
12
+ classifiers = [
13
+ "License :: OSI Approved :: BSD License",
14
+ "Programming Language :: Python :: 3.9",
15
+ "Programming Language :: Python :: 3.10",
16
+ "Programming Language :: Python :: 3.11",
17
+ "Programming Language :: Python :: 3.12",
18
+ "Programming Language :: Python :: 3.13",
19
+ "Intended Audience :: Developers",
20
+ "Topic :: Software Development :: Libraries",
21
+ ]
22
+ [project.urls]
23
+ Homepage = "https://github.com/kitsuyui/python-pixel-sizes"
24
+
25
+ [tool.setuptools]
26
+ package-data = { "pixel_sizes" = ["py.typed"], "*" = ["README.md, LICENSE"] }
27
+ package-dir = { "pixel_sizes" = "pixel_sizes" }
28
+
29
+ [tool.setuptools_scm]
30
+ write_to = "pixel_sizes/_version.py"
31
+ version_scheme = "only-version"
32
+ local_scheme = "no-local-version"
33
+
34
+ [tool.uv]
35
+ dev-dependencies = [
36
+ "pytest",
37
+ "pytest-cov",
38
+ "poethepoet",
39
+ "setuptools-scm",
40
+ "ruff",
41
+ "mypy",
42
+ ]
43
+
44
+ [build-system]
45
+ requires = [
46
+ "setuptools", "setuptools_scm"
47
+ ]
48
+ build-backend = "setuptools.build_meta"
49
+
50
+ [tool.poe.tasks]
51
+ test = "pytest"
52
+ coverage-xml = "pytest --cov=pixel_sizes --doctest-modules --cov-report=xml"
53
+ format = "ruff format pixel_sizes"
54
+ check = [
55
+ { cmd = "ruff check pixel_sizes tests" },
56
+ { cmd = "mypy pixel_sizes tests" }
57
+ ]
58
+ build = [
59
+ { cmd = "python -m build"}
60
+ ]
61
+
62
+ [tool.mypy]
63
+ # https://mypy.readthedocs.io/en/latest/config_file.html
64
+ strict = true
65
+ ignore_missing_imports = false
66
+
67
+ [tool.ruff]
68
+ line-length = 79
69
+
70
+ [tool.flake8]
71
+ ignore = "E203"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+