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:
46
46
key : ${{ runner.os }}-datasets-${{ steps.ephy_testing_data.outputs.dataset_hash }}
47
47
restore-keys : ${{ runner.os }}-datasets-
48
48
49
- - uses : conda-incubator/setup-miniconda@v2.2.0
49
+ - uses : conda-incubator/setup-miniconda@v3
50
50
with :
51
51
activate-environment : neo-test-env
52
- python-version : ${{ matrix.python-version }}
52
+ python-version : " ${{ matrix.python-version }}"
53
53
54
54
- name : Get current dependencies hash
55
55
id : dependencies
81
81
git config --global user.email "neo_ci@fake_mail.com"
82
82
git config --global user.name "neo CI"
83
83
84
+ - name : Python version
85
+ run : |
86
+ which python
87
+ python --version
88
+
84
89
- name : Install neo including dependencies
85
90
# installation with dependencies is only required if no cache was found
86
91
# restore-key hits should result in `cache-hit` == 'false'
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ test = [
62
62
" coverage" ,
63
63
" coveralls" ,
64
64
" pillow" ,
65
- " sonpy" ,
65
+ " sonpy;python_version<'3.10' " ,
66
66
" pynwb" ,
67
67
" probeinterface" ,
68
68
" zugbruecke>=0.2" ,
@@ -84,7 +84,8 @@ docs = [
84
84
85
85
dev = [
86
86
" build" ,
87
- " twine"
87
+ " twine" ,
88
+ " black"
88
89
]
89
90
90
91
igorproio = [" igor2" ]
@@ -125,3 +126,7 @@ all = [
125
126
" zugbruecke>=0.2; sys_platform!='win32'" ,
126
127
]
127
128
# 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