Skip to content

Commit 2e70358

Browse files
committed
Merge remote-tracking branch 'origin/master' into feature/logging
2 parents 8a327cf + da96063 commit 2e70358

27 files changed

+867
-532
lines changed

.github/dependabot.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Documentation: https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
2+
version: 2
3+
updates:
4+
- package-ecosystem: "pip"
5+
directory: "/"
6+
schedule:
7+
interval: "monthly"
8+
9+
- package-ecosystem: github-actions
10+
directory: /
11+
schedule:
12+
interval: "monthly"

.github/workflows/CI.yml

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
paths-ignore:
7+
- "**/README.md"
8+
- "LICENSE"
9+
- "ChangeLog"
10+
pull_request:
11+
branches: ["*"]
12+
paths-ignore:
13+
- "**/README.md"
14+
- "LICENSE"
15+
- "ChangeLog"
16+
workflow_dispatch:
17+
18+
concurrency:
19+
group: CI-${{ github.ref }}
20+
cancel-in-progress: true
21+
22+
permissions:
23+
contents: read
24+
25+
jobs:
26+
tests:
27+
name: "${{ matrix.system.os }}, Py${{ matrix.python-version }}"
28+
runs-on: "${{ matrix.system.os }}-latest"
29+
continue-on-error: ${{ matrix.system.can-fail }}
30+
31+
strategy:
32+
matrix:
33+
system:
34+
- {os: ubuntu, can-fail: false}
35+
- {os: windows, can-fail: true}
36+
- {os: macos, can-fail: true}
37+
python-version:
38+
- "3.12"
39+
- "3.11"
40+
- "3.10"
41+
- "3.9"
42+
- "3.8"
43+
- "3.7"
44+
45+
steps:
46+
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
47+
with:
48+
fetch-depth: 0
49+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
50+
with:
51+
python-version: "${{ matrix.python-version }}"
52+
cache: "pip"
53+
- name: "Set up TEST_ERROR_DIR"
54+
shell: bash
55+
run: |
56+
mkdir test_errors
57+
if [ "${{ runner.os }}" = "Windows" ]; then
58+
echo "TEST_ERROR_DIR=$(cygpath -w $(realpath ./test_errors))" >> "$GITHUB_ENV"
59+
else
60+
echo "TEST_ERROR_DIR=$(pwd -P)/test_errors" >> "$GITHUB_ENV"
61+
fi
62+
- name: "Install graphviz (Linux)"
63+
if: runner.os == 'linux'
64+
run: sudo apt install graphviz
65+
- name: "Install graphviz (Windows)"
66+
if: runner.os == 'windows'
67+
run: choco install graphviz --ignore-http-cache
68+
- name: "Install graphviz (macOS)"
69+
if: runner.os == 'macos'
70+
run: brew install graphviz
71+
- name: "Install Python dependencies"
72+
run: python -m pip install pip==24.0.0 setuptools==68.0.0 wheel==0.42.0 tox==4.8.0 tox-gh==1.3.1
73+
- name: "Setup tests"
74+
run: tox -vv --notest
75+
- name: "Run tests"
76+
run: tox --skip-pkg-install
77+
- name: "Prepare error artifacts"
78+
if: ${{ failure() }}
79+
run: cp test/compare_images.sh "${{ env.TEST_ERROR_DIR }}"
80+
- name: "Publish error artifacts"
81+
if: ${{ failure() }}
82+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
83+
with:
84+
name: test-errors-${{ runner.os }}-${{ matrix.python-version }}
85+
path: ${{ env.TEST_ERROR_DIR }}
86+
if-no-files-found: ignore

.github/workflows/codeql.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: ["master"]
9+
schedule:
10+
- cron: "0 1 2 * *"
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
analyze:
17+
name: Analyze
18+
runs-on: ubuntu-latest
19+
permissions:
20+
actions: read
21+
contents: read
22+
security-events: write
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
language: ["python"]
28+
# CodeQL supports [ $supported-codeql-languages ]
29+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
30+
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
34+
35+
# Initializes the CodeQL tools for scanning.
36+
- name: Initialize CodeQL
37+
uses: github/codeql-action/init@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10
38+
with:
39+
languages: ${{ matrix.language }}
40+
# If you wish to specify custom queries, you can do so here or in a config file.
41+
# By default, queries listed here will override any specified in a config file.
42+
# Prefix the list here with "+" to use these queries and those in the config file.
43+
44+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
45+
# If this step fails, then you should remove it and run the build manually (see below)
46+
- name: Autobuild
47+
uses: github/codeql-action/autobuild@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10
48+
49+
# ℹ️ Command-line programs to run using the OS shell.
50+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
51+
52+
# If the Autobuild fails above, remove it and uncomment the following three lines.
53+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
54+
55+
# - run: |
56+
# echo "Run, Build Application using script"
57+
# ./location_of_script_within_repo/buildscript.sh
58+
59+
- name: Perform CodeQL Analysis
60+
uses: github/codeql-action/analyze@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10
61+
with:
62+
category: "/language:${{matrix.language}}"

.github/workflows/label-conflicts.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "Label merge conflicts"
2+
on:
3+
# So that PRs touching the same files as the push are updated
4+
push:
5+
# So that the `dirtyLabel` is removed if conflicts are resolve
6+
# We recommend `pull_request_target` so that github secrets are available.
7+
# In `pull_request` we wouldn't be able to change labels of fork PRs
8+
pull_request_target:
9+
# GitHub documents "synchronize" as:
10+
# A pull request's head branch was updated. For example, the head branch
11+
# was updated from the base branch or new commits were pushed to the
12+
# head branch.
13+
types: [synchronize]
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
conflicts:
20+
runs-on: ubuntu-latest
21+
permissions:
22+
pull-requests: write
23+
steps:
24+
- name: check if PRs are mergeable
25+
uses: eps1lon/actions-label-merge-conflict@e62d7a53ff8be8b97684bffb6cfbbf3fc1115e2e # v3.0.0
26+
with:
27+
dirtyLabel: "conflicts"
28+
repoToken: "${{ secrets.GITHUB_TOKEN }}"
29+
commentOnDirty: "This pull request has conflicts, please resolve those so that the changes can be evaluated."
30+
commentOnClean: "All conflicts have been resolved, thanks!"
31+

.github/workflows/scorecard.yml

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Scorecard supply-chain security
2+
on:
3+
# For Branch-Protection check. Only the default branch is supported. See
4+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
5+
branch_protection_rule:
6+
# To guarantee Maintained check is occasionally updated. See
7+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
8+
schedule:
9+
- cron: '24 15 * * 0'
10+
push:
11+
branches: [ "master" ]
12+
13+
# Declare default permissions as read only.
14+
permissions: read-all
15+
16+
jobs:
17+
analysis:
18+
name: Scorecard analysis
19+
runs-on: ubuntu-latest
20+
permissions:
21+
# Needed to upload the results to code-scanning dashboard.
22+
security-events: write
23+
# Needed to publish results and get a badge (see publish_results below).
24+
id-token: write
25+
steps:
26+
- name: "Checkout code"
27+
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
28+
with:
29+
persist-credentials: false
30+
31+
- name: "Run analysis"
32+
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
33+
with:
34+
results_file: results.sarif
35+
results_format: sarif
36+
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
37+
# - you want to enable the Branch-Protection check on a *public* repository, or
38+
# - you are installing Scorecard on a *private* repository
39+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
40+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
41+
42+
# Public repositories:
43+
# - Publish results to OpenSSF REST API for easy access by consumers
44+
# - Allows the repository to include the Scorecard badge.
45+
# - See https://github.com/ossf/scorecard-action#publishing-results.
46+
# For private repositories:
47+
# - `publish_results` will always be set to `false`, regardless
48+
# of the value entered here.
49+
publish_results: true
50+
51+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
52+
# format to the repository Actions tab.
53+
- name: "Upload artifact"
54+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
55+
with:
56+
name: SARIF file
57+
path: results.sarif
58+
retention-days: 5
59+
60+
# Upload the results to GitHub's code scanning dashboard (optional).
61+
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
62+
- name: "Upload to code-scanning"
63+
uses: github/codeql-action/upload-sarif@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10
64+
with:
65+
sarif_file: results.sarif

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ coverage.xml
4747
*.cover
4848
.hypothesis/
4949
.pytest_cache/
50+
test.svg
5051

5152
# Translations
5253
*.mo
@@ -109,3 +110,6 @@ venv.bak/
109110
.mypy_cache/
110111
.dmypy.json
111112
dmypy.json
113+
114+
# OS-generated files
115+
.DS_Store

.travis.yml

-48
This file was deleted.

ChangeLog

+16-4
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,25 @@ Pydot versions since 1.4.2 adhere to [PEP 440-style semantic versioning]
44
(https://www.python.org/dev/peps/pep-0440/#semantic-versioning).
55

66

7-
2.0.0 (unreleased)
7+
2.0.1 (unreleased)
8+
------------------
9+
10+
- Nothing changed yet.
11+
12+
13+
2.0.0 (2023-12-30)
814
------------------
915

1016
Added:
1117
- Add standard Python logging, using the logger name `pydot`. For
1218
details, see the new section on Troubleshooting in README.md.
1319

1420
Changed:
21+
- Broken parsing caused by `pyparsing` updates fixed. (#296)
22+
With this, the pydot project rises from the dead.
23+
- (Internal) CI revived by @ferdnyc. (#302)
24+
Modernized and clarified the development process.
25+
Testing is done against multiple Python versions.
1526
- Reorganized package/module structure. (#230)
1627
The `pydot` package is installed as a directory now instead of as
1728
two modules:
@@ -80,11 +91,12 @@ Deprecated:
8091
structure" above.
8192

8293
Removed:
83-
- Drop support for Python 2 and Python 3.4. (#229)
94+
- Drop support for Python 2 and Python < 3.7. (#229, #302, #296).
8495
**USER FEEDBACK REQUESTED**
85-
We are considering if pydot 2.0 should drop support for Python 3.5
96+
~~We are considering if pydot 2.0 should drop support for Python 3.5
8697
and 3.6 as well. If this would affect you, please leave a comment in
87-
https://github.com/pydot/pydot/issues/268.
98+
https://github.com/pydot/pydot/issues/268.~~
99+
EDIT: This was decided to be done, with a lot of time passed since this entry.
88100

89101

90102
1.4.2 (2021-02-15)

MANIFEST.in

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
include README.md
22
include LICENSE
33
include ChangeLog
4-
include requirements.txt
5-
include test/*_unittest.py
6-
include test/graphs/*.dot
7-
include test/my_tests/*.dot
4+
include *.txt
5+
prune .github
6+
exclude .git*
7+
graft test
8+
prune test/from-past-to-future
9+
global-exclude test.svg
10+

0 commit comments

Comments
 (0)