Skip to content

Commit de5471c

Browse files
authored
Add nbstripout to pre-commit (xarray-contrib#83)
1 parent 07e4ed3 commit de5471c

18 files changed

+784
-5248
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,9 @@ repos:
4141
rev: v2.6.2
4242
hooks:
4343
- id: prettier
44+
45+
- repo: https://github.com/kynan/nbstripout
46+
rev: 0.5.0
47+
hooks:
48+
- id: nbstripout
49+
args: [--extra-keys=metadata.kernelspec metadata.language_info.version]

advanced/parallelize-custom-functions.ipynb

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -403,11 +403,6 @@
403403
}
404404
],
405405
"metadata": {
406-
"kernelspec": {
407-
"display_name": "Python 3 (ipykernel)",
408-
"language": "python",
409-
"name": "python3"
410-
},
411406
"language_info": {
412407
"codemirror_mode": {
413408
"name": "ipython",
@@ -417,15 +412,7 @@
417412
"mimetype": "text/x-python",
418413
"name": "python",
419414
"nbconvert_exporter": "python",
420-
"pygments_lexer": "ipython3",
421-
"version": "3.9.12"
422-
},
423-
"widgets": {
424-
"application/vnd.jupyter.widget-state+json": {
425-
"state": {},
426-
"version_major": 2,
427-
"version_minor": 0
428-
}
415+
"pygments_lexer": "ipython3"
429416
}
430417
},
431418
"nbformat": 4,

fundamentals/01_datastructures_and_io.ipynb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -871,11 +871,6 @@
871871
}
872872
],
873873
"metadata": {
874-
"kernelspec": {
875-
"display_name": "Python 3 (ipykernel)",
876-
"language": "python",
877-
"name": "python3"
878-
},
879874
"language_info": {
880875
"codemirror_mode": {
881876
"name": "ipython",
@@ -885,8 +880,7 @@
885880
"mimetype": "text/x-python",
886881
"name": "python",
887882
"nbconvert_exporter": "python",
888-
"pygments_lexer": "ipython3",
889-
"version": "3.10.5"
883+
"pygments_lexer": "ipython3"
890884
}
891885
},
892886
"nbformat": 4,

fundamentals/02.1_working_with_labeled_data.ipynb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,6 @@
304304
}
305305
],
306306
"metadata": {
307-
"kernelspec": {
308-
"display_name": "Python 3 (ipykernel)",
309-
"language": "python",
310-
"name": "python3"
311-
},
312307
"language_info": {
313308
"codemirror_mode": {
314309
"name": "ipython",
@@ -318,8 +313,7 @@
318313
"mimetype": "text/x-python",
319314
"name": "python",
320315
"nbconvert_exporter": "python",
321-
"pygments_lexer": "ipython3",
322-
"version": "3.10.5"
316+
"pygments_lexer": "ipython3"
323317
}
324318
},
325319
"nbformat": 4,

fundamentals/02.2_manipulating_dimensions.ipynb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,6 @@
102102
}
103103
],
104104
"metadata": {
105-
"kernelspec": {
106-
"display_name": "Python 3 (ipykernel)",
107-
"language": "python",
108-
"name": "python3"
109-
},
110105
"language_info": {
111106
"codemirror_mode": {
112107
"name": "ipython",
@@ -116,8 +111,7 @@
116111
"mimetype": "text/x-python",
117112
"name": "python",
118113
"nbconvert_exporter": "python",
119-
"pygments_lexer": "ipython3",
120-
"version": "3.10.5"
114+
"pygments_lexer": "ipython3"
121115
}
122116
},
123117
"nbformat": 4,

fundamentals/02.3_aligning_data_objects.ipynb

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -495,11 +495,6 @@
495495
}
496496
],
497497
"metadata": {
498-
"kernelspec": {
499-
"display_name": "Python 3 (ipykernel)",
500-
"language": "python",
501-
"name": "python3"
502-
},
503498
"language_info": {
504499
"codemirror_mode": {
505500
"name": "ipython",
@@ -509,15 +504,7 @@
509504
"mimetype": "text/x-python",
510505
"name": "python",
511506
"nbconvert_exporter": "python",
512-
"pygments_lexer": "ipython3",
513-
"version": "3.9.12"
514-
},
515-
"widgets": {
516-
"application/vnd.jupyter.widget-state+json": {
517-
"state": {},
518-
"version_major": 2,
519-
"version_minor": 0
520-
}
507+
"pygments_lexer": "ipython3"
521508
}
522509
},
523510
"nbformat": 4,

fundamentals/03.1_computation_with_xarray.ipynb

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -390,11 +390,6 @@
390390
}
391391
],
392392
"metadata": {
393-
"kernelspec": {
394-
"display_name": "Python 3 (ipykernel)",
395-
"language": "python",
396-
"name": "python3"
397-
},
398393
"language_info": {
399394
"codemirror_mode": {
400395
"name": "ipython",
@@ -404,15 +399,7 @@
404399
"mimetype": "text/x-python",
405400
"name": "python",
406401
"nbconvert_exporter": "python",
407-
"pygments_lexer": "ipython3",
408-
"version": "3.10.5"
409-
},
410-
"widgets": {
411-
"application/vnd.jupyter.widget-state+json": {
412-
"state": {},
413-
"version_major": 2,
414-
"version_minor": 0
415-
}
402+
"pygments_lexer": "ipython3"
416403
}
417404
},
418405
"nbformat": 4,

fundamentals/03.2_groupby_with_xarray.ipynb

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -612,11 +612,6 @@
612612
}
613613
],
614614
"metadata": {
615-
"kernelspec": {
616-
"display_name": "Python 3 (ipykernel)",
617-
"language": "python",
618-
"name": "python3"
619-
},
620615
"language_info": {
621616
"codemirror_mode": {
622617
"name": "ipython",
@@ -626,15 +621,7 @@
626621
"mimetype": "text/x-python",
627622
"name": "python",
628623
"nbconvert_exporter": "python",
629-
"pygments_lexer": "ipython3",
630-
"version": "3.9.12"
631-
},
632-
"widgets": {
633-
"application/vnd.jupyter.widget-state+json": {
634-
"state": {},
635-
"version_major": 2,
636-
"version_minor": 0
637-
}
624+
"pygments_lexer": "ipython3"
638625
}
639626
},
640627
"nbformat": 4,

0 commit comments

Comments
 (0)