8000 fix build (#48) · qheuristics/xarray-tutorial@10b6c16 · GitHub
[go: up one dir, main page]

Skip to content

Commit 10b6c16

Browse files
authored
fix build (xarray-contrib#48)
1 parent c133a80 commit 10b6c16

File tree

4 files changed

+28
-34
lines changed

4 files changed

+28
-34
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
repos:
22

33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v2.5.0
4+
rev: v4.1.0
55
hooks:
66
- id: trailing-whitespace
77
- id: end-of-file-fixer
@@ -12,27 +12,23 @@ repos:
1212
args: ["--autofix", "--indent=2", "--no-sort-keys"]
1313

1414
- repo: https://github.com/ambv/black
15-
rev: 19.10b0
15+
rev: 22.1.0
1616
hooks:
1717
- id: black
1818
args: ["--line-length", "100"]
1919

2020
- repo: https://gitlab.com/pycqa/flake8
21-
rev: 3.8.0a2
21+
rev: 3.9.2
2222
hooks:
2323
- id: flake8
2424

25-
- repo: https://github.com/asottile/seed-isort-config
26-
rev: v2.1.1
27-
hooks:
28-
- id: seed-isort-config
2925
- repo: https://github.com/pre-commit/mirrors-isort
30-
rev: v4.3.21
26+
rev: v5.10.1
3127
hooks:
3228
- id: isort
3329

3430
- repo: https://github.com/deathbeds/prenotebook
35-
rev: master
31+
rev: f5bdb72a400f1a56fe88109936c83aa12cc349fa
3632
hooks:
3733
- id: prenotebook
3834

ci/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: xarray
22
channels:
33
- conda-forge
4-
- default
4+
- nodefaults
55
dependencies:
66
- pathlib
77
- nbconvert

conf.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,15 @@
156156

157157
# One entry per manual page. List of tuples
158158
# (source start file, name, description, authors, manual section).
159-
man_pages = [(master_doc, "xarraytutorial", "Xarray Tutorial Documentation", [author], 1,)]
159+
man_pages = [
160+
(
161+
master_doc,
162+
"xarraytutorial",
163+
"Xarray Tutorial Documentation",
164+
[author],
165+
1,
166+
)
167+
]
160168

161169

162170
# -- Options for Texinfo output ----------------------------------------------

scipy-tutorial/03_computation_with_xarray.ipynb

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
"metadata": {},
150150
"outputs": [],
151151
"source": [
152-
"f = 0.5 * np.log(sst_kelvin ** 2)\n",
152+
"f = 0.5 * np.log(sst_kelvin**2)\n",
153153
"f"
154154
]
155155
},
@@ -600,25 +600,8 @@
600600
"source": [
601601
"#### Aggregations\n",
602602
"\n",
603-
"`.apply` accepts as its argument a function. We can pass an existing function:\n"
604-
]
605-
},
606-
{
607-
"cell_type": "code",
608-
"execution_count": null,
609-
"metadata": {},
610-
"outputs": [],
611-
"source": [
612-
"gb.map(np.mean)"
613-
]
614-
},
615-
{
616-
"cell_type": "markdown",
617-
"metadata": {},
618-
"source": [
619-
"Because we specified no extra arguments (like `axis`) the function was applied\n",
620-
"over all space and time dimensions. This is not what we wanted. Instead, we\n",
621-
"could define a custom function. This function takes a single argument--the group\n",
603+
"`.map` accepts as its argument a function that expects and return xarray objects. \n",
604+
"We define a custom function. This function takes a single argument--the group\n",
622605
"dataset--and returns a new dataset to be combined:\n"
623606
]
624607
},
@@ -947,9 +930,9 @@
947930
],
948931
"metadata": {
949932
"kernelspec": {
950-
"display_name": "Python 3",
933+
"display_name": "Python [conda env:xarray-tutorial]",
951934
"language": "python",
952-
"name": "python3"
935+
"name": "conda-env-xarray-tutorial-py"
953936
},
954937
"language_info": {
955938
"codemirror_mode": {
@@ -961,7 +944,14 @@
961944
"name": "python",
962945
"nbconvert_exporter": "python",
963946
"pygments_lexer": "ipython3",
964-
"version": "3.8.1"
947+
"version": "3.8.12"
948+
},
949+
"widgets": {
950+
"application/vnd.jupyter.widget-state+json": {
951+
"state": {},
952+
"version_major": 2,
953+
"version_minor": 0
954+
}
965955
}
966956
},
967957
"nbformat": 4,

0 commit comments

Comments
 (0)
0