-
Notifications
You must be signed in to change notification settings - Fork 677
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'poetry' into test-improvements
- Loading branch information
Showing
28 changed files
with
240 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.py] | ||
indent_size = 4 | ||
max_line_length = 88 | ||
|
||
[*.{rst,md}] | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Ruff format the entire project | ||
5d60da17455607e9c8b7e7fef9940d20027894f2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Code Quality Checks | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
linting: | ||
name: Code Quality Checks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Dependencies | ||
run: pip install ruff | ||
|
||
- name: Code Linting | ||
if: always() | ||
run: ruff check qrcode | ||
|
||
- name: Code Formatting | ||
if: always() | ||
run: ruff format --check qrcode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Testsuite Run | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install --disable-pip-version-check tox tox-gh-actions | ||
- name: Test with tox | ||
run: tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
*.pyc | ||
.tox | ||
dist/ | ||
.coverage | ||
.coverage.* | ||
htmlcov/ | ||
build/ | ||
qrcode.egg-info/ | ||
.pytest_cache/ | ||
.idea/ | ||
.pytest_cache/ | ||
.tox | ||
build/ | ||
cov.xml | ||
dist/ | ||
htmlcov/ | ||
poetry.lock | ||
qrcode.egg-info/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,69 @@ | ||
[build-system] | ||
requires = ["setuptools >= 48"] | ||
build-backend = "setuptools.build_meta" | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry] | ||
name = "qrcode" | ||
version = "8.0.dev0" | ||
packages = [{include = "qrcode"}] | ||
description = "QR Code image generator" | ||
authors = ["Lincoln Loop <info@lincolnloop.com>"] | ||
license = "BSD" | ||
readme = ["README.rst", "CHANGES.rst"] | ||
homepage = "https://github.com/lincolnloop/python-qrcode" | ||
keywords = ["qr", "denso-wave", "IEC18004"] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"License :: OSI Approved :: BSD License", | ||
"Operating System :: OS Independent", | ||
"Intended Audience :: Developers", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Topic :: Multimedia :: Graphics", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
] | ||
|
||
# There is no support for data files yet. | ||
# https://github.com/python-poetry/poetry/issues/9519 | ||
# | ||
# data_files = [ | ||
# { destination = "share/man/man1", from = [ "doc/qr.1" ] }, | ||
# ] | ||
|
||
[tool.poetry.scripts] | ||
qr = 'qrcode.console_scripts:main' | ||
|
||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
colorama = {version = "*", platform = "win32"} | ||
pypng = {version = "*", optional = true} | ||
pillow = {version = ">=9.1.0", optional = true} | ||
|
||
[tool.poetry.extras] | ||
pil = ["pillow"] | ||
png = ["pypng"] | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
pytest = {version = "*"} | ||
pytest-cov = {version = "*"} | ||
tox = {version = "*"} | ||
ruff = {version = "*"} | ||
docutils = "^0.21.2" | ||
zest-releaser = {extras = ["recommended"], version = "^9.2.0"} | ||
|
||
[tool.zest-releaser] | ||
less-zeros = "yes" | ||
version-levels = 2 | ||
tag-format = "v{version}" | ||
tag-message = "Version {version}" | ||
tag-signing = "yes" | ||
date-format =" %%-d %%B %%Y" | ||
prereleaser.middle = [ | ||
"qrcode.release.update_manpage" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Try to import png library. | ||
PngWriter = None | ||
|
||
try: | ||
from png import Writer as PngWriter # type: ignore # noqa: F401 | ||
except ImportError: # pragma: no cover | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.