Skip to content

Commit 9ec8d03

Browse files
committed
precommits...
1 parent b6e73ac commit 9ec8d03

File tree

5 files changed

+34
-7
lines changed

5 files changed

+34
-7
lines changed

src/meteole/forecast.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,7 @@ def _get_coverage_id(
182182
capabilities = self.capabilities[self.capabilities["indicator"] == indicator]
183183

184184
if indicator not in self.indicators:
185-
raise ValueError(
186-
f"Unknown `indicator` - checkout `{self.model_name}.indicators` to have the full list."
187-
)
185+
raise ValueError(f"Unknown `indicator` - checkout `{self.model_name}.indicators` to have the full list.")
188186

189187
if run is None:
190188
run = capabilities.iloc[0]["run"]
@@ -309,7 +307,9 @@ def _raise_if_invalid_or_fetch_default(
309307
if input_value not in availables:
310308
raise ValueError(f"`{param_name}={inputs}` is invalid. Available {param_name}: {availables}")
311309
else:
312-
inputs = availables[:1] or [-1] # using [-1] make sure we have an iterable. Using None makes things too complicated with mypy...
310+
inputs = availables[:1] or [
311+
-1
312+
] # using [-1] make sure we have an iterable. Using None makes things too complicated with mypy...
313313
if inputs[0] != -1:
314314
logger.info(f"Using `{param_name}={inputs}`")
315315
return inputs

src/meteole/raster.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Functionnalities to deal with the raster data"""
2+
23
import cartopy.crs as ccrs
34
import matplotlib.pyplot as plt
45
import rasterio

tutorial/access_viligance_bulletin.ipynb

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5+
"id": "7fb27b941602401d91542211134fc71a",
56
"metadata": {},
67
"source": [
78
"# Vigilance Bulletin\n",
@@ -19,23 +20,28 @@
1920
{
2021
"cell_type": "code",
2122
"execution_count": 1,
23+
"id": "acae54e37e7d407bbb7b55eff062a284",
2224
"metadata": {},
2325
"outputs": [],
2426
"source": [
2527
"import os\n",
28+
"\n",
2629
"import pandas as pd\n",
30+
"\n",
2731
"from meteole import Vigilance"
2832
]
2933
},
3034
{
3135
"cell_type": "markdown",
36+
"id": "9a63283cbaf04dbcab1f6479b197f3a8",
3237
"metadata": {},
3338
"source": [
3439
"# Init Vigilance Class"
3540
]
3641
},
3742
{
3843
"cell_type": "markdown",
44+
"id": "8dd0d8092fe74a7c96281538738b07e2",
3945
"metadata": {},
4046
"source": [
4147
"**Requirements notice** : TODO Link to the documentation to have application_id"
@@ -44,26 +50,30 @@
4450
{
4551
"cell_type": "code",
4652
"execution_count": 3,
53+
"id": "72eea5119410473aa328ad9291626812",
4754
"metadata": {},
4855
"outputs": [],
4956
"source": [
5057
"# load application_id from .env\n",
5158
"from dotenv import load_dotenv\n",
59+
"\n",
5260
"load_dotenv()\n",
5361
"application_id = os.getenv(\"APPLICATION_ID\", None)"
5462
]
5563
},
5664
{
5765
"cell_type": "code",
5866
"execution_count": 4,
67+
"id": "8edb47106e1a46a883d545849b8ab81b",
5968
"metadata": {},
6069
"outputs": [],
6170
"source": [
62-
"client = Vigilance(application_id = application_id)"
71+
"client = Vigilance(application_id=application_id)"
6372
]
6473
},
6574
{
6675
"cell_type": "markdown",
76+
"id": "10185d26023b46108eb7d9f57d49d2b3",
6777
"metadata": {},
6878
"source": [
6979
"# Collect Forecasted phenomenon\n",
@@ -74,6 +84,7 @@
7484
{
7585
"cell_type": "code",
7686
"execution_count": 5,
87+
"id": "8763a12b2bbd4a93a75aff182afb95dc",
7788
"metadata": {},
7889
"outputs": [],
7990
"source": [
@@ -83,6 +94,7 @@
8394
{
8495
"cell_type": "code",
8596
"execution_count": 6,
97+
"id": "7623eae2785240b9bd12b16a66d81610",
8698
"metadata": {},
8799
"outputs": [
88100
{
@@ -193,6 +205,7 @@
193205
{
194206
"cell_type": "code",
195207
"execution_count": 7,
208+
"id": "7cdc8c89c7104fffa095e18ddfef8986",
196209
"metadata": {},
197210
"outputs": [
198211
{
@@ -289,6 +302,7 @@
289302
},
290303
{
291304
"cell_type": "markdown",
305+
"id": "b118ea5561624da68c537baed56e602f",
292306
"metadata": {},
293307
"source": [
294308
"# Collect text of monitoring bulletins\n",
@@ -299,6 +313,7 @@
299313
{
300314
"cell_type": "code",
301315
"execution_count": 8,
316+
"id": "938c804e27f84196a10c8828c723f798",
302317
"metadata": {},
303318
"outputs": [],
304319
"source": [
@@ -308,6 +323,7 @@
308323
{
309324
"cell_type": "code",
310325
"execution_count": 9,
326+
"id": "504fb2a444614c0babb325280ed9130a",
311327
"metadata": {},
312328
"outputs": [],
313329
"source": [
@@ -317,6 +333,7 @@
317333
{
318334
"cell_type": "code",
319335
"execution_count": 10,
336+
"id": "59bbdb311c014d738909a11f9e486628",
320337
"metadata": {},
321338
"outputs": [
322339
{
@@ -401,15 +418,17 @@
401418
{
402419
"cell_type": "code",
403420
"execution_count": 11,
421+
"id": "b43b363d81ae4b689946ece5c682cd59",
404422
"metadata": {},
405423
"outputs": [],
406424
"source": [
407-
"df_text_bloc_items = pd.json_normalize(test_texte['product.text_bloc_items'].explode())"
425+
"df_text_bloc_items = pd.json_normalize(test_texte[\"product.text_bloc_items\"].explode())"
408426
]
409427
},
410428
{
411429
"cell_type": "code",
412430
"execution_count": 12,
431+
"id": "8a65eabff63a45729fe45fb5ade58bdc",
413432
"metadata": {},
414433
"outputs": [
415434
{
@@ -574,6 +593,7 @@
574593
},
575594
{
576595
"cell_type": "markdown",
596+
"id": "c3933fab20d04ec698c2621248eb3be0",
577597
"metadata": {},
578598
"source": [
579599
"# Map display"
@@ -582,6 +602,7 @@
582602
{
583603
"cell_type": "code",
584604
"execution_count": 13,
605+
"id": "4dd4641cc4064e0191573fe9c69df29b",
585606
"metadata": {},
586607
"outputs": [
587608
{
@@ -602,6 +623,7 @@
602623
{
603624
"cell_type": "code",
604625
"execution_count": null,
626+
"id": "8309879909854d7188b41380fd92a7c3",
605627
"metadata": {},
606628
"outputs": [],
607629
"source": []

tutorial/arome.ipynb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
"source": [
1616
"import os\n",
1717
"import random\n",
18+
"\n",
1819
"import dotenv\n",
20+
"\n",
1921
"from meteole import AromeForecast\n",
2022
"\n",
2123
"dotenv.load_dotenv()\n",

tutorial/arpege.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
"outputs": [],
1515
"source": [
1616
"import os\n",
17-
"import dotenv\n",
1817
"import random\n",
18+
"\n",
19+
"import dotenv\n",
20+
"\n",
1921
"from meteole import ArpegeForecast\n",
2022
"\n",
2123
"dotenv.load_dotenv()\n",

0 commit comments

Comments
 (0)