File tree Expand file tree Collapse file tree 3 files changed +43
-4
lines changed
Expand file tree Collapse file tree 3 files changed +43
-4
lines changed Original file line number Diff line number Diff line change 1+ name : Black formatting
2+
3+ on :
4+ workflow_dispatch :
5+ schedule :
6+ - cron : " 0 12 * * 0" # Weekly at noon UTC on Sundays
7+
8+ jobs :
9+ lint :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout repository
13+ uses : actions/checkout@v4
14+
15+ - name : Check and apply black formatting
16+ id : black-check
17+ uses : psf/black@stable
18+ with :
19+ options : " --check --verbose"
20+ continue-on-error : true
21+
22+ - name : Create PR
23+ uses : peter-evans/create-pull-request@v5
24+ if : ${{ steps.black-check.outcome == 'failure' }}
25+ with :
26+ commit-message : black formatting
27+ title : Black formatting
28+ body : Reformatting code with black style
29+ branch : black-formatting
Original file line number Diff line number Diff line change @@ -46,10 +46,10 @@ jobs:
4646 key : ${{ runner.os }}-datasets-${{ steps.ephy_testing_data.outputs.dataset_hash }}
4747 restore-keys : ${{ runner.os }}-datasets-
4848
49- - uses : conda-incubator/setup-miniconda@v2.2.0
49+ - uses : conda-incubator/setup-miniconda@v3
5050 with :
5151 activate-environment : neo-test-env
52- python-version : ${{ matrix.python-version }}
52+ python-version : " ${{ matrix.python-version }}"
5353
5454 - name : Get current dependencies hash
5555 id : dependencies
8181 git config --global user.email "neo_ci@fake_mail.com"
8282 git config --global user.name "neo CI"
8383
84+ - name : Python version
85+ run : |
86+ which python
87+ python --version
88+
8489 - name : Install neo including dependencies
8590 # installation with dependencies is only required if no cache was found
8691 # restore-key hits should result in `cache-hit` == 'false'
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ test = [
6262 " coverage" ,
6363 " coveralls" ,
6464 " pillow" ,
65- " sonpy" ,
65+ " sonpy;python_version<'3.10' " ,
6666 " pynwb" ,
6767 " probeinterface" ,
6868 " zugbruecke>=0.2" ,
@@ -84,7 +84,8 @@ docs = [
8484
8585dev = [
8686 " build" ,
87- " twine"
87+ " twine" ,
88+ " black"
8889]
8990
9091igorproio = [" igor2" ]
@@ -125,3 +126,7 @@ all = [
125126 " zugbruecke>=0.2; sys_platform!='win32'" ,
126127]
127128# we do not include 'stfio' in 'all' as it is not pip installable
129+
130+
131+ [tool .black ]
132+ line-length = 120
You can’t perform that action at this time.
0 commit comments