-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix defaults and update build process
- Loading branch information
1 parent
7df9bcc
commit 0af52ca
Showing
5 changed files
with
125 additions
and
50 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,48 @@ | ||
name: Run all tox jobs using Python3 | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
tests: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
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: Cache APT Packages | ||
uses: awalsh128/cache-apt-pkgs-action@latest | ||
with: | ||
packages: imagemagick | ||
version: 1.0 | ||
execute_install_scripts: true | ||
- name: Run tox | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
pip install tox-gh-actions | ||
tox | ||
- name: JUnit Report Action | ||
uses: mikepenz/action-junit-report@v4 | ||
if: always() # always run even if the previous step fails | ||
with: | ||
report_paths: 'reports/pytest-*.xml' | ||
- name: Upload test artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: tests-${{ matrix.python-version }} | ||
retention-days: 4 | ||
path: | | ||
.tox/py*/tmp | ||
reports |
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,13 +1,45 @@ | ||
[project] | ||
name = 'diff-pdf-visually' | ||
description = 'Quickly check whether there is a visible difference between two PDFs, using ImageMagick and pdftocairo.' | ||
authors = [{name = 'Bram Geron', email = '[email protected]'}] | ||
license = {text = 'MIT/Apache-2.0'} | ||
name = "diff-pdf-visually" | ||
description = "Quickly check whether there is a visible difference between two PDFs, using ImageMagick and pdftocairo." | ||
readme = "README.rst" | ||
urls.Homepage = 'https://github.com/bgeron/diff-pdf-visually' | ||
urls.Source = 'https://github.com/bgeron/diff-pdf-visually' | ||
authors = [{name = "Bram Geron", email = "[email protected]"}] | ||
maintainers = [{name = "Bram Geron", email = "[email protected]"}] | ||
license = {text = "MIT/Apache-2.0"} | ||
classifiers = [ | ||
'Development Status :: 4 - Beta', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: MIT License', | ||
'License :: OSI Approved :: Apache Software License', | ||
'Natural Language :: English', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'Programming Language :: Python :: Implementation :: CPython', | ||
'Programming Language :: Python :: Implementation :: PyPy', | ||
] | ||
dependencies = [] | ||
requires-python = ">=3.6" | ||
dynamic = ["version"] | ||
|
||
[project.optional-dependencies] | ||
test = [ | ||
"coverage", | ||
"pytest", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/bgeron/diff-pdf-visually" | ||
Source = "https://github.com/bgeron/diff-pdf-visually" | ||
|
||
[project.scripts] | ||
diff-pdf-visually = "diff_pdf_visually.__main__:main" | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["diff_pdf_visually*"] | ||
|
||
[requires] | ||
python_version = ['3.6', '3.7', '3.8', '3.9', '3.10'] | ||
|
||
|
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 |
---|---|---|
|
@@ -18,39 +18,8 @@ | |
with open('README.rst', 'r', encoding='utf-8') as f: | ||
readme = f.read() | ||
|
||
REQUIRES = [] | ||
|
||
kwargs = { | ||
'name': 'diff-pdf-visually', | ||
'version': version, | ||
'description': '', | ||
'long_description': readme, | ||
'author': 'Bram Geron', | ||
'author_email': '[email protected]', | ||
'maintainer': 'Bram Geron', | ||
'maintainer_email': '[email protected]', | ||
'url': 'https://github.com/bgeron/diff-pdf-visually', | ||
'license': 'MIT/Apache-2.0', | ||
'classifiers': [ | ||
'Development Status :: 4 - Beta', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: MIT License', | ||
'License :: OSI Approved :: Apache Software License', | ||
'Natural Language :: English', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: Implementation :: CPython', | ||
'Programming Language :: Python :: Implementation :: PyPy', | ||
], | ||
'install_requires': REQUIRES, | ||
'tests_require': ['coverage', 'pytest'], | ||
'packages': find_packages(exclude=('tests', 'tests.*')), | ||
'entry_points': { | ||
'console_scripts': ['diff-pdf-visually=diff_pdf_visually.__main__:main'], | ||
}, | ||
} | ||
|
||
#################### BEGIN USER OVERRIDES #################### | ||
|
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,14 +1,30 @@ | ||
[tox] | ||
envlist = | ||
py310 | ||
py{39,310,311,312} | ||
|
||
[testenv] | ||
passenv = * | ||
extras = | ||
test | ||
deps = | ||
coverage | ||
pytest | ||
commands = | ||
python setup.py --quiet clean develop | ||
coverage run --parallel-mode -m pytest | ||
coverage run --parallel-mode -m pytest {posargs} | ||
coverage combine --append | ||
coverage report -m | ||
|
||
[testenv:check-packaging] | ||
skip_install = true | ||
deps = | ||
build | ||
twine | ||
commands = | ||
python -m build -o {envtmpdir}/dist | ||
twine check {envtmpdir}/dist/* | ||
|
||
[gh-actions] | ||
python = | ||
3.9: py39 | ||
3.10: py310, check-packaging | ||
3.11: py311 | ||
3.12: py312 |