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
Conversation
A Successful run of the GH Actions CI can be seen here:
https://github.com/ferdnyc/pydot/actions/runs/7231618322 (With all of the subsequent commits applied.) |
RE: The GH Actions permissions, when running workflows in my fork I noticed that the It'd be helpful if someone with repo admin rights could go into Settings > Actions > General and change the "Workflow permissions" configuration (bottom of the page) from "Read and write permissions" to "Read repository contents and packages permissions", if it's not already selected. Nothing the CI is doing requires repo-write permissions. The only reason that would need to change is if we decided to have Black automatically apply its own corrections. |
I'm not sure it's actually necessary to have But, it makes |
@ferdnyc Thanks for this great work, I see that tests pass and there will probably be no reviewers as of now. |
@lkk7 Nope, good to go from my perspective! Only outstanding item is whether we want macOS/Windows CI as well. |
(Even if we do, that can be a followup PR.) |
The original CI had some Windows workflow, and it was something conda-related. I don't know conda that much to know if it's still relevant. That can be looked at in the future changes. |
@lkk7 I suspect Conda was a means of getting |
Great, I'll look at my change and make sure it's OK. And update the pyparsing version |
license = {file = "LICENSE"} | ||
requires-python = ">= 3.7" | ||
dependencies = [ | ||
'pyparsing>=2.1.4,<3' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relevant discussions in: #296, #302 * Fix broken parsing (whitespace problems and multilingual identifiers) * Fix broken HTML parsing * Update pyparsing to `>=3.0.9` * Remove `parse_html` function * Set pyparsing version to >=3 (anything below will break) * Update the changelog, including the latest CI change * Update formatting according to `black`
This PR makes several changes to the repo, and might be more easily reviewed commit-by-commit, though there are a lot of them so perhaps it's best to just go file-by-file.
Packaging is modernized
setup.py
topyproject.toml
setup.py
featuretests_require
migrated to a new optional dependency set defined by thetests
extra (pydot[tests]
)pyproject.toml
:dev
extra, containingchardet
andblack
release
extra, which installs thezest.releaser
tool along with its[recommended]
addonsThe
pyparsing
dependency now requires a version<3
, due to the issues with pyparsing 3.0+. This allows pydot to install and run on all platforms. @lkk7's PR Fix multiple breaking issues from newpyparsing
versions #296 should be updated, if this is merged first, to then also remove that restriction.Testing is scaffolded
tox
is now the testing framework, with its configuration defined insetup.cfg
. (there's notox.ini
, another config file seemed unnecessary)tox
is configured with test environments for every Python version 3.7–3.12 inclusive (py37
topy312
)tox
configuration, with an additional environmentblack
defined to run the tool under Python 3.12test/pydot_unittest.py
discovers the path to its own directory is updated (see diff).GitHub Actions CI is enabled (building on the work started in Add tox and github actions #299)
ubuntu-latest
platform, but MacOS and/or Windows can be added if we wishAll of Black's changes to the source formatting are applied and checked in, so that the existing code passes its linting.
The Travis and AppVeyor configs are deleted. (They're in the gi t history if anyone ever needs them.)
...I think that's about it. Have at it! Any reviews/feedback welcome.