Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions CI, modernize packaging #302

Merged
merged 11 commits into from
Dec 16, 2023
45 changes: 45 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI

on:
push:
branches: ["master"]
pull_request:
branches: ["*"]
workflow_dispatch:

concurrency:
group: CI-${{ github.ref }}
cancel-in-progress: true

jobs:
tests:
name: "Test with Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"

strategy:
matrix:
python-version:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
- "3.7"

steps:
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
- uses: "actions/setup-python@v5"
with:
python-version: "${{ matrix.python-version }}"
cache: "pip"
- name: "Install dependencies"
run: |
sudo apt install graphviz
python -m pip install --upgrade pip setuptools wheel
python -m pip install tox tox-gh
- name: "Setup tests"
run: tox -vv --notest
- name: "Run tests"
run: tox --skip-pkg-install
48 changes: 0 additions & 48 deletions .travis.yml

This file was deleted.

58 changes: 0 additions & 58 deletions appveyor.yml

This file was deleted.

59 changes: 58 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,60 @@
[build-system]
requires = ["setuptools"]

[project]
name = 'pydot'
description = "Python interface to Graphviz's Dot"
readme = "README.md"
license = {file = "LICENSE"}
requires-python = ">= 3.7"
dependencies = [
'pyparsing>=2.1.4,<3'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lkk Yeah, you just need to drop the ,<3 here, in #296.

]
authors = [
{name = "Ero Carrera", email = "ero.carrera@gmail.com"},
{name = "Peter Nowee", email = "peter@peternowee.com"},
]
maintainers = [
{name = "Peter Nowee", email = "peter@peternowee.com"},
]
keywords = ["graphviz", "dot", "graphs", "visualization"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dynamic = [
'version',
]

[project.urls]
Homepage = "https://github.com/pydot/pydot"
Changelog = "https://github.com/pydot/pydot/blob/master/ChangeLog"
"Bug Tracker" = "https://github.com/pydot/pydot/issues"

[project.optional-dependencies]
dev = [
'chardet',
'black',
]
tests = [
'chardet',
'black',
'tox',
]
release = ['zest.releaser[recommended]']

[tool.black]
line-length = 79
target-version = ['py35']
target-version = ['py37']
31 changes: 31 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,34 @@ release=no
push-changes=no
create-wheel=yes
tag-format=v{version}

[tox:tox]
min_version = 4.6.3
env_list =
py312
py311
py310
py39
py38
py37
black

[testenv]
deps = chardet
package = wheel
wheel_build_env = .pkg
commands = python test/pydot_unittest.py

[testenv:black]
deps = black
commands = black --check --diff src/

# For tox-gh
[gh]
python =
3.12 = py312, black
3.11 = py311
3.10 = py310
3.9 = py39
3.8 = py38
3.7 = py37
38 changes: 0 additions & 38 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,44 +34,6 @@ def get_version():
version=get_version(),
package_dir={"": "src"},
packages=["pydot"],
description="Python interface to Graphviz's Dot",
author="Ero Carrera",
author_email="ero.carrera@gmail.com",
maintainer="Peter Nowee",
maintainer_email="peter@peternowee.com",
url="https://github.com/pydot/pydot",
project_urls={
"Changelog": "https://github.com/pydot/pydot/blob/master/ChangeLog",
"Bug Tracker": "https://github.com/pydot/pydot/issues",
},
license="MIT",
keywords="graphviz dot graphs visualization",
platforms=["any"],
python_requires=">=3.5",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Software Development :: Libraries :: Python Modules",
],
long_description=get_long_description(),
long_description_content_type="text/markdown",
install_requires=["pyparsing>=2.1.4"],
extras_require={
"dev": [
"chardet",
"black==21.5b2; python_version > '3.5'",
],
},
tests_require=["chardet"],
)