Skip to content

Commit

Permalink
liners
Browse files Browse the repository at this point in the history
black config

ignore formatting git blame
  • Loading branch information
RMeli committed Oct 15, 2024
1 parent 599c8db commit 571431a
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 387 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# black
feca12100a2d2251fa2b4e4ad9598d9d6e00ba38
62 changes: 0 additions & 62 deletions .github/workflows/darkerbot.yaml

This file was deleted.

71 changes: 10 additions & 61 deletions .github/workflows/linters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ defaults:
shell: bash -l {0}

jobs:
darker_lint:
black:
if: "github.repository == 'MDAnalysis/mdanalysis'"
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
pull-requests: write
defaults:
run:
shell: bash
Expand All @@ -35,66 +33,17 @@ jobs:
with:
python-version: "3.10"

- name: darker-main-code
id: darker-main-code
uses: akaihola/[email protected]
continue-on-error: true
- uses: psf/black@stable
with:
version: "~=1.6.1"
options: "--check --diff --color"
src: "./package/MDAnalysis"
revision: "HEAD^"
lint: "flake8"

- name: darker-test-code
id: darker-test-code
uses: akaihola/[email protected]
continue-on-error: true
options: "--check --verbose"
src: "./package"
version: "~= 24.0"

- uses: psf/black@stable
with:
version: "~=1.6.1"
options: "--check --diff --color"
src: "./testsuite/MDAnalysisTests"
revision: "HEAD^"
lint: "flake8"

- name: get-pr-info
uses: actions/github-script@v7
with:
script:
const prNumber = context.payload.number;
core.exportVariable('PULL_NUMBER', prNumber);

- name: save-status
env:
MAIN: ${{ steps.darker-main-code.outcome }}
TEST: ${{ steps.darker-test-code.outcome }}
shell: python
run: |
import os
import json
from pathlib import Path
Path('./darker_results/').mkdir(exist_ok=True)
d = {
'main_stat': os.environ['MAIN'],
'test_stat': os.environ['TEST'],
'PR_NUM': os.environ['PULL_NUMBER'],
'RUN_ID': os.environ['GITHUB_RUN_ID'],
}
with open('darker_results/status.json', 'w') as f:
json.dump(d, f)
- name: check-json
run: cat darker_results/status.json

- name: upload-status
uses: actions/upload-artifact@v4
with:
name: darkerlint
path: darker_results/
retention-days: 1
options: "--check --verbose"
src: "./testsuite"
version: "~= 24.0"


pylint_check:
Expand Down
238 changes: 0 additions & 238 deletions maintainer/ci/darker-outcomes.py

This file was deleted.

Loading

0 comments on commit 571431a

Please sign in to comment.