Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feature/logging
Browse files Browse the repository at this point in the history
  • Loading branch information
lkk7 committed Apr 14, 2024
2 parents 8a327cf + da96063 commit 2e70358
Show file tree
Hide file tree
Showing 27 changed files with 867 additions and 532 deletions.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Documentation: https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "monthly"

- package-ecosystem: github-actions
directory: /
schedule:
interval: "monthly"
86 changes: 86 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: CI

on:
push:
branches: ["master"]
paths-ignore:
- "**/README.md"
- "LICENSE"
- "ChangeLog"
pull_request:
branches: ["*"]
paths-ignore:
- "**/README.md"
- "LICENSE"
- "ChangeLog"
workflow_dispatch:

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

permissions:
contents: read

jobs:
tests:
name: "${{ matrix.system.os }}, Py${{ matrix.python-version }}"
runs-on: "${{ matrix.system.os }}-latest"
continue-on-error: ${{ matrix.system.can-fail }}

strategy:
matrix:
system:
- {os: ubuntu, can-fail: false}
- {os: windows, can-fail: true}
- {os: macos, can-fail: true}
python-version:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
- "3.7"

steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
fetch-depth: 0
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: "${{ matrix.python-version }}"
cache: "pip"
- name: "Set up TEST_ERROR_DIR"
shell: bash
run: |
mkdir test_errors
if [ "${{ runner.os }}" = "Windows" ]; then
echo "TEST_ERROR_DIR=$(cygpath -w $(realpath ./test_errors))" >> "$GITHUB_ENV"
else
echo "TEST_ERROR_DIR=$(pwd -P)/test_errors" >> "$GITHUB_ENV"
fi
- name: "Install graphviz (Linux)"
if: runner.os == 'linux'
run: sudo apt install graphviz
- name: "Install graphviz (Windows)"
if: runner.os == 'windows'
run: choco install graphviz --ignore-http-cache
- name: "Install graphviz (macOS)"
if: runner.os == 'macos'
run: brew install graphviz
- name: "Install Python dependencies"
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
- name: "Setup tests"
run: tox -vv --notest
- name: "Run tests"
run: tox --skip-pkg-install
- name: "Prepare error artifacts"
if: ${{ failure() }}
run: cp test/compare_images.sh "${{ env.TEST_ERROR_DIR }}"
- name: "Publish error artifacts"
if: ${{ failure() }}
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: test-errors-${{ runner.os }}-${{ matrix.python-version }}
path: ${{ env.TEST_ERROR_DIR }}
if-no-files-found: ignore
62 changes: 62 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: "CodeQL"

on:
push:
branches: ["master"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["master"]
schedule:
- cron: "0 1 2 * *"

permissions:
contents: read

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ["python"]
# CodeQL supports [ $supported-codeql-languages ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10
with:
category: "/language:${{matrix.language}}"
31 changes: 31 additions & 0 deletions .github/workflows/label-conflicts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Label merge conflicts"
on:
# So that PRs touching the same files as the push are updated
push:
# So that the `dirtyLabel` is removed if conflicts are resolve
# We recommend `pull_request_target` so that github secrets are available.
# In `pull_request` we wouldn't be able to change labels of fork PRs
pull_request_target:
# GitHub documents "synchronize" as:
# A pull request's head branch was updated. For example, the head branch
# was updated from the base branch or new commits were pushed to the
# head branch.
types: [synchronize]

permissions:
contents: read

jobs:
conflicts:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: check if PRs are mergeable
uses: eps1lon/actions-label-merge-conflict@e62d7a53ff8be8b97684bffb6cfbbf3fc1115e2e # v3.0.0
with:
dirtyLabel: "conflicts"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
commentOnDirty: "This pull request has conflicts, please resolve those so that the changes can be evaluated."
commentOnClean: "All conflicts have been resolved, thanks!"

65 changes: 65 additions & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Scorecard supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '24 15 * * 0'
push:
branches: [ "master" ]

# Declare default permissions as read only.
permissions: read-all

jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
steps:
- name: "Checkout code"
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
with:
results_file: results.sarif
results_format: sarif
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecard on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
# repo_token: ${{ secrets.SCORECARD_TOKEN }}

# Public repositories:
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories:
# - `publish_results` will always be set to `false`, regardless
# of the value entered here.
publish_results: true

# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10
with:
sarif_file: results.sarif
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ coverage.xml
*.cover
.hypothesis/
.pytest_cache/
test.svg

# Translations
*.mo
Expand Down Expand Up @@ -109,3 +110,6 @@ venv.bak/
.mypy_cache/
.dmypy.json
dmypy.json

# OS-generated files
.DS_Store
48 changes: 0 additions & 48 deletions .travis.yml

This file was deleted.

20 changes: 16 additions & 4 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,25 @@ Pydot versions since 1.4.2 adhere to [PEP 440-style semantic versioning]
(https://www.python.org/dev/peps/pep-0440/#semantic-versioning).


2.0.0 (unreleased)
2.0.1 (unreleased)
------------------

- Nothing changed yet.


2.0.0 (2023-12-30)
------------------

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

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

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


1.4.2 (2021-02-15)
Expand Down
11 changes: 7 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
include README.md
include LICENSE
include ChangeLog
include requirements.txt
include test/*_unittest.py
include test/graphs/*.dot
include test/my_tests/*.dot
include *.txt
prune .github
exclude .git*
graft test
prune test/from-past-to-future
global-exclude test.svg

Loading

0 comments on commit 2e70358

Please sign in to comment.