Skip to content

Add the Pattern class for specifying bit and hachure patterns to fill symbols and polygons #19166

Add the Pattern class for specifying bit and hachure patterns to fill symbols and polygons

Add the Pattern class for specifying bit and hachure patterns to fill symbols and polygons #19166

Workflow file for this run

# Code lint and style checks
#
# This workflow runs code style and lint checks to check if the codes have
# consistent code style and are high-quality.
#
# It is run on every commit to the main and pull request branches. It is also
# scheduled to run daily on the main branch.
#
name: Style Checks
on:
push:
branches: [ main ]
pull_request:
# Schedule daily tests
schedule:
- cron: '0 0 * * *'
permissions: {}
jobs:
style_check:
name: Style Checks
runs-on: ubuntu-latest
steps:
# Checkout current git repository
- name: Checkout
uses: actions/checkout@v5.0.0
with:
persist-credentials: false
# Setup Python
- name: Set up Python
uses: actions/setup-python@v6.0.0
with:
python-version: '3.13'
- name: Install packages
run: |
python -m pip install ruff prek
python -m pip list
- name: Formatting check (ruff + prek)
run: |
make check
prek run --all-files
- name: Ensure example scripts have at least one code block separator
run: |
git ls-files 'examples/**/*.py' | xargs grep --files-without-match '# %%' > output.txt
nfiles=$(wc --lines output.txt | awk '{print $1}')
if [[ $nfiles > 0 ]]; then
echo "Code block separator '# %%' is required in following example files:"
cat output.txt
rm output.txt
exit $nfiles
fi
- name: Ensure hyphens are not used in names of directories and Python files
run: |
git ls-files '*.py' | grep '-' > output.txt || true
git ls-tree -rd --name-only HEAD | grep '-' >> output.txt || true
nfiles=$(wc --lines output.txt | awk '{print $1}')
if [[ $nfiles > 0 ]]; then
echo "Following directories/files use hyphens in file names:"
cat output.txt
rm output.txt
exit $nfiles
fi