Add function for interactive template matching plot #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: black-action | |
on: [push] # only run on push to repo. | |
jobs: | |
one: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
linter_name: | |
name: runner / black | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' # remove auto_black | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Check files using the black formatter | |
uses: rickstaa/action-black@v1 | |
id: action_black | |
with: | |
black_args: "." | |
- name: Create Pull Request | |
if: steps.action_black.outputs.is_formatted == 'true' | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
title: "Format Python code with psf/black push" | |
commit-message: ":art: Format Python code with psf/black" | |
body: | | |
There appears to be some python code in ${{ github.sha }} that is not formatted according | |
to the [psf/black](https://github.com/psf/black) specification. This pull request | |
formats the code in question and is inline with the | |
[pyxem developers guide](https://pyxem.readthedocs.io/en/latest/contributing.html#code-style) | |
base: ${{ github.head_ref }} # Creates pull request onto pull request or commit branch | |
branch: actions/black |