Skip to content
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

[INFRA] set up github action to detect latin phrases #636

Merged
merged 6 commits into from
Oct 5, 2020

Conversation

Remi-Gau
Copy link
Collaborator

@Remi-Gau Remi-Gau commented Oct 2, 2020

This relates to the issue #635 .
fixes #635

TODO

  • import and adapt script
  • test script locally
  • credit the turing-way
  • test the github action

Adapting the code from the Turing way was actually easier than anticipated.

script

The way this is set up, this should look through the files in the src folder ignoring the files with extensions listed in get_all_files and look for lines that contain the expressions listed in read_and_check_files.

Comments lines are skipped.

Files added to the src folder in a PR are also checked

github action

It will trigger the script :

  • on a push to master
  • on a PR to the master branch and will only check files that were modified in src

for reviewers

My python is far from fluent so a cross check would be good. 🙏

Any suggestions on how to smartly test a github action? Should I merge into this onto my own master to give this a go.
This seems to be set up directly even in this PR. Never mind.

@Remi-Gau
Copy link
Collaborator Author

Remi-Gau commented Oct 2, 2020

FYI: you get plenty of errors when running the script locally but the github action passes because on a PR it will only look for files modified in src which is not the case in this PR.

@Remi-Gau Remi-Gau linked an issue Oct 2, 2020 that may be closed by this pull request
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
tools/no-bad-latin.py Outdated Show resolved Hide resolved
tools/pull_files.py Outdated Show resolved Hide resolved
.github/workflows/no-bad-latin.yml Outdated Show resolved Hide resolved
tools/pull_files.py Outdated Show resolved Hide resolved
Co-authored-by: Stefan Appelhoff <stefan.appelhoff@mailbox.org>
Copy link
Member

@sappelhoff sappelhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sappelhoff sappelhoff added this to the 1.4.1 milestone Oct 5, 2020
@effigies
Copy link
Collaborator

effigies commented Oct 5, 2020

Infrastructure, so merging.

@effigies effigies merged commit 7ecb5ac into bids-standard:master Oct 5, 2020
@Remi-Gau Remi-Gau deleted the remi-no_bad_latin branch October 6, 2020 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setup a no-bad-latin github action
3 participants