Skip to content

Commit 8b4b750

Browse files
Merge pull request #44 from MilagrosMarin/main
Fix codespell and black formatting
2 parents 008dccf + e21c53c commit 8b4b750

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2273
-1651
lines changed

.codespellrc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[codespell]
2-
skip = .git,*.pdf,*.svg
3-
ignore-regex = ^\s*"image/\S+": ".*
2+
skip=.git,*.pdf,*.svg,*.ipynb
3+
ignore-regex=^\s*"image/\S+": ".*
4+
45
#
5-
# ignore-words-list =
6+
ignore-words-list=shepard,nevers,nin,DaSy,Fo,Alle,ND

.github/workflows/codespell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
name: Codespell
32

43
on:
@@ -18,5 +17,6 @@ jobs:
1817
steps:
1918
- name: Checkout
2019
uses: actions/checkout@v3
20+
2121
- name: Codespell
2222
uses: codespell-project/actions-codespell@v2

completed_tutorials/01-DataJoint Basics.ipynb

Lines changed: 51 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@
249249
}
250250
],
251251
"source": [
252-
"schema = dj.schema('tutorial')"
252+
"schema = dj.schema(\"tutorial\")"
253253
]
254254
},
255255
{
@@ -421,7 +421,7 @@
421421
"metadata": {},
422422
"outputs": [],
423423
"source": [
424-
"Mouse.insert1((0, '2017-03-01', 'M'))"
424+
"Mouse.insert1((0, \"2017-03-01\", \"M\"))"
425425
]
426426
},
427427
{
@@ -533,11 +533,7 @@
533533
"metadata": {},
534534
"outputs": [],
535535
"source": [
536-
"data = {\n",
537-
" 'mouse_id': 100,\n",
538-
" 'dob': '2017-05-12',\n",
539-
" 'sex': 'F'\n",
540-
"}"
536+
"data = {\"mouse_id\": 100, \"dob\": \"2017-05-12\", \"sex\": \"F\"}"
541537
]
542538
},
543539
{
@@ -661,11 +657,7 @@
661657
"metadata": {},
662658
"outputs": [],
663659
"source": [
664-
"data = [\n",
665-
" (1, '2016-11-19', 'M'),\n",
666-
" (2, '2016-11-20', 'unknown'),\n",
667-
" (5, '2016-12-25', 'F')\n",
668-
"]"
660+
"data = [(1, \"2016-11-19\", \"M\"), (2, \"2016-11-20\", \"unknown\"), (5, \"2016-12-25\", \"F\")]"
669661
]
670662
},
671663
{
@@ -691,8 +683,8 @@
691683
"outputs": [],
692684
"source": [
693685
"data = [\n",
694-
" {'mouse_id': 10, 'dob': '2017-01-01', 'sex': 'F'},\n",
695-
" {'mouse_id': 11, 'dob': '2017-01-03', 'sex': 'F'},\n",
686+
" {\"mouse_id\": 10, \"dob\": \"2017-01-01\", \"sex\": \"F\"},\n",
687+
" {\"mouse_id\": 11, \"dob\": \"2017-01-03\", \"sex\": \"F\"},\n",
696688
"]\n",
697689
"\n",
698690
"# insert them all\n",
@@ -848,10 +840,12 @@
848840
],
849841
"source": [
850842
"Mouse.insert1(\n",
851-
"{'mouse_id': 0,\n",
852-
" 'dob': '2018-01-01',\n",
853-
" 'sex': 'M',\n",
854-
"})"
843+
" {\n",
844+
" \"mouse_id\": 0,\n",
845+
" \"dob\": \"2018-01-01\",\n",
846+
" \"sex\": \"M\",\n",
847+
" }\n",
848+
")"
855849
]
856850
},
857851
{
@@ -868,11 +862,11 @@
868862
"outputs": [],
869863
"source": [
870864
"data = [\n",
871-
" {'mouse_id': 12, 'dob': '2017-03-21', 'sex': 'F'},\n",
872-
" {'mouse_id': 18, 'dob': '2017-05-01', 'sex': 'F'},\n",
873-
" {'mouse_id': 19, 'dob': '2018-07-21', 'sex': 'M'},\n",
874-
" {'mouse_id': 22, 'dob': '2019-12-15', 'sex': 'F'},\n",
875-
" {'mouse_id': 34, 'dob': '2018-09-22', 'sex': 'M'}\n",
865+
" {\"mouse_id\": 12, \"dob\": \"2017-03-21\", \"sex\": \"F\"},\n",
866+
" {\"mouse_id\": 18, \"dob\": \"2017-05-01\", \"sex\": \"F\"},\n",
867+
" {\"mouse_id\": 19, \"dob\": \"2018-07-21\", \"sex\": \"M\"},\n",
868+
" {\"mouse_id\": 22, \"dob\": \"2019-12-15\", \"sex\": \"F\"},\n",
869+
" {\"mouse_id\": 34, \"dob\": \"2018-09-22\", \"sex\": \"M\"},\n",
876870
"]\n",
877871
"\n",
878872
"# insert them all\n",
@@ -1014,7 +1008,7 @@
10141008
"metadata": {},
10151009
"outputs": [],
10161010
"source": [
1017-
"# ENTER YOUR CODE - Insert more mice\n"
1011+
"# ENTER YOUR CODE - Insert more mice"
10181012
]
10191013
},
10201014
{
@@ -1135,10 +1129,10 @@
11351129
"outputs": [],
11361130
"source": [
11371131
"data = {\n",
1138-
" 'mouse_id': 0,\n",
1139-
" 'session_date': '2017-05-15',\n",
1140-
" 'experiment_setup': 0,\n",
1141-
" 'experimenter': 'Edgar Y. Walker'\n",
1132+
" \"mouse_id\": 0,\n",
1133+
" \"session_date\": \"2017-05-15\",\n",
1134+
" \"experiment_setup\": 0,\n",
1135+
" \"experimenter\": \"Edgar Y. Walker\",\n",
11421136
"}\n",
11431137
"\n",
11441138
"Session.insert1(data)"
@@ -1362,10 +1356,10 @@
13621356
],
13631357
"source": [
13641358
"data = {\n",
1365-
" 'mouse_id': 0,\n",
1366-
" 'session_date': '2018-01-15',\n",
1367-
" 'experiment_setup': 100,\n",
1368-
" 'experimenter': 'Jacob Reimer'\n",
1359+
" \"mouse_id\": 0,\n",
1360+
" \"session_date\": \"2018-01-15\",\n",
1361+
" \"experiment_setup\": 100,\n",
1362+
" \"experimenter\": \"Jacob Reimer\",\n",
13691363
"}\n",
13701364
"\n",
13711365
"Session.insert1(data)\n",
@@ -1387,10 +1381,10 @@
13871381
"outputs": [],
13881382
"source": [
13891383
"data = {\n",
1390-
" 'mouse_id': 18,\n",
1391-
" 'session_date': '2018-01-15',\n",
1392-
" 'experiment_setup': 101,\n",
1393-
" 'experimenter': 'Jacob Reimer'\n",
1384+
" \"mouse_id\": 18,\n",
1385+
" \"session_date\": \"2018-01-15\",\n",
1386+
" \"experiment_setup\": 101,\n",
1387+
" \"experimenter\": \"Jacob Reimer\",\n",
13941388
"}\n",
13951389
"\n",
13961390
"# insert them all\n",
@@ -1525,10 +1519,10 @@
15251519
"outputs": [],
15261520
"source": [
15271521
"bad_data = {\n",
1528-
" 'mouse_id': 9999, # this mouse doesn't exist!\n",
1529-
" 'session_date': '2017-05-15',\n",
1530-
" 'experiment_setup': 0,\n",
1531-
" 'experimenter': 'Edgar Y. Walker'\n",
1522+
" \"mouse_id\": 9999, # this mouse doesn't exist!\n",
1523+
" \"session_date\": \"2017-05-15\",\n",
1524+
" \"experiment_setup\": 0,\n",
1525+
" \"experimenter\": \"Edgar Y. Walker\",\n",
15321526
"}"
15331527
]
15341528
},
@@ -1709,7 +1703,7 @@
17091703
}
17101704
],
17111705
"source": [
1712-
"Mouse & 'mouse_id = 0'"
1706+
"Mouse & \"mouse_id = 0\""
17131707
]
17141708
},
17151709
{
@@ -2886,7 +2880,7 @@
28862880
}
28872881
],
28882882
"source": [
2889-
"female_mice & 'mouse_id > 10'"
2883+
"female_mice & \"mouse_id > 10\""
28902884
]
28912885
},
28922886
{
@@ -3006,7 +3000,7 @@
30063000
}
30073001
],
30083002
"source": [
3009-
"Mouse & Session "
3003+
"Mouse & Session"
30103004
]
30113005
},
30123006
{
@@ -3999,7 +3993,7 @@
39993993
}
40003994
],
40013995
"source": [
4002-
"Mouse.proj('sex')"
3996+
"Mouse.proj(\"sex\")"
40033997
]
40043998
},
40053999
{
@@ -4129,7 +4123,7 @@
41294123
}
41304124
],
41314125
"source": [
4132-
"Mouse.proj(date_of_birth='dob')"
4126+
"Mouse.proj(date_of_birth=\"dob\")"
41334127
]
41344128
},
41354129
{
@@ -4239,7 +4233,7 @@
42394233
}
42404234
],
42414235
"source": [
4242-
"(Mouse * Session).proj(age='datediff(session_date, dob)')"
4236+
"(Mouse * Session).proj(age=\"datediff(session_date, dob)\")"
42434237
]
42444238
},
42454239
{
@@ -4379,7 +4373,7 @@
43794373
}
43804374
],
43814375
"source": [
4382-
"(Mouse * Session).proj(..., age='datediff(session_date, dob)')"
4376+
"(Mouse * Session).proj(..., age=\"datediff(session_date, dob)\")"
43834377
]
43844378
},
43854379
{
@@ -4690,7 +4684,7 @@
46904684
}
46914685
],
46924686
"source": [
4693-
"(Mouse & 'sex = \"M\"').fetch(format='frame')"
4687+
"(Mouse & 'sex = \"M\"').fetch(format=\"frame\")"
46944688
]
46954689
},
46964690
{
@@ -4717,7 +4711,7 @@
47174711
}
47184712
],
47194713
"source": [
4720-
"(Mouse & 'sex = \"M\"').fetch('KEY')"
4714+
"(Mouse & 'sex = \"M\"').fetch(\"KEY\")"
47214715
]
47224716
},
47234717
{
@@ -4733,7 +4727,7 @@
47334727
"metadata": {},
47344728
"outputs": [],
47354729
"source": [
4736-
"sex, dob = Mouse.fetch('sex', 'dob')"
4730+
"sex, dob = Mouse.fetch(\"sex\", \"dob\")"
47374731
]
47384732
},
47394733
{
@@ -4818,7 +4812,7 @@
48184812
}
48194813
],
48204814
"source": [
4821-
"info = Mouse.fetch('sex', 'dob', as_dict=True)\n",
4815+
"info = Mouse.fetch(\"sex\", \"dob\", as_dict=True)\n",
48224816
"info"
48234817
]
48244818
},
@@ -4853,7 +4847,9 @@
48534847
}
48544848
],
48554849
"source": [
4856-
"mouse_0 = (Mouse & {'mouse_id': 0}).fetch1() # \"fetch1()\" because we know there's only one\n",
4850+
"mouse_0 = (\n",
4851+
" Mouse & {\"mouse_id\": 0}\n",
4852+
").fetch1() # \"fetch1()\" because we know there's only one\n",
48574853
"mouse_0"
48584854
]
48594855
},
@@ -4881,7 +4877,7 @@
48814877
}
48824878
],
48834879
"source": [
4884-
"(Mouse & {'mouse_id': 0}).fetch1('KEY')"
4880+
"(Mouse & {\"mouse_id\": 0}).fetch1(\"KEY\")"
48854881
]
48864882
},
48874883
{
@@ -4897,7 +4893,7 @@
48974893
"metadata": {},
48984894
"outputs": [],
48994895
"source": [
4900-
"sex, dob = (Mouse & {'mouse_id': 0}).fetch1('sex', 'dob')"
4896+
"sex, dob = (Mouse & {\"mouse_id\": 0}).fetch1(\"sex\", \"dob\")"
49014897
]
49024898
},
49034899
{
@@ -4978,7 +4974,7 @@
49784974
}
49794975
],
49804976
"source": [
4981-
"(Mouse & 'mouse_id = 100').delete()"
4977+
"(Mouse & \"mouse_id = 100\").delete()"
49824978
]
49834979
},
49844980
{

0 commit comments

Comments
 (0)