Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/format-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
- name: Commit to the PR branch if any changes
run: |
make format
find . -type f -not -path '*/\.git/*' -exec grep -Iq . {} \; -exec dos2unix {} \;
find . -type f -not -path '*/\.git/*' -exec grep -Iq . {} \; -exec chmod 644 {} \;
git ls-files -z | xargs -0 dos2unix --quiet
git ls-files -z | xargs -0 chmod 644
if [[ $(git ls-files -m) ]]; then
git config --global user.name 'actions-bot'
git config --global user.email '[email protected]'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/style_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ jobs:

- name: Ensure files use UNIX line breaks and have 644 permission
run: |
find . -type f -not -path '*/\.git/*' -exec grep -Iq . {} \; -exec dos2unix --quiet {} \;
find . -type f -not -path '*/\.git/*' -exec grep -Iq . {} \; -exec chmod 644 {} \;
git ls-files -z | xargs -0 dos2unix --quiet
git ls-files -z | xargs -0 chmod 644
if [[ $(git ls-files -m) ]]; then git --no-pager diff HEAD; exit 1; fi

- name: Ensure example scripts have at least one code block separator
run: |
grep --files-without-match '# %%' $(find 'examples' -name '*.py') > output.txt
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:"
Expand Down