Skip to content

Commit b35bad6

Browse files
Merge pull request #218 from geo-engine/fix-blacklist
Fix-blacklist
2 parents 11d316e + 97c015e commit b35bad6

File tree

4 files changed

+26
-22
lines changed

4 files changed

+26
-22
lines changed
File renamed without changes.

examples/data_usage.ipynb

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,33 @@
2929
"cell_type": "markdown",
3030
"metadata": {},
3131
"source": [
32-
"## Connect to the Virtual Data Trustee"
32+
"## Note\n",
33+
"\n",
34+
"1. It is important that the Geo Engine is running with\n",
35+
"```toml\n",
36+
"[quota]\n",
37+
"mode = \"track\"\n",
38+
"```\n",
39+
"\n",
40+
"2. You have to do some work beforehand to get the data from the log.\n",
41+
"\n",
42+
"This is a simple example to show how to access the log."
43+
]
44+
},
45+
{
46+
"cell_type": "markdown",
47+
"metadata": {},
48+
"source": [
49+
"## Connect to Geo Engine"
3350
]
3451
},
3552
{
3653
"cell_type": "code",
37-
"execution_count": 2,
54+
"execution_count": null,
3855
"metadata": {},
3956
"outputs": [],
4057
"source": [
41-
"ge.initialize(\"http://localhost:3030/api\", (\"admin@localhost\", \"adminadmin\")) # TODO: load from .env for demo TODO: set remote url"
58+
"ge.initialize(\"http://localhost:3030/api\", (\"admin@localhost\", \"adminadmin\"))"
4259
]
4360
},
4461
{
@@ -296,7 +313,7 @@
296313
},
297314
{
298315
"cell_type": "code",
299-
"execution_count": 5,
316+
"execution_count": null,
300317
"metadata": {},
301318
"outputs": [
302319
{
@@ -312,6 +329,9 @@
312329
],
313330
"source": [
314331
"df = ge.data_usage_summary(ge.UsageSummaryGranularity.MINUTES)\n",
332+
"if df.empty:\n",
333+
" print('No data usage found')\n",
334+
" exit()\n",
315335
"df['timestamp'] = pd.to_datetime(df['timestamp']).dt.tz_localize(None)\n",
316336
"\n",
317337
"pivot_df = df.pivot(index='timestamp', columns='data', values='count').fillna(0)\n",
@@ -324,13 +344,6 @@
324344
"plt.legend(title='Data')\n",
325345
"plt.show()"
326346
]
327-
},
328-
{
329-
"cell_type": "code",
330-
"execution_count": null,
331-
"metadata": {},
332-
"outputs": [],
333-
"source": []
334347
}
335348
],
336349
"metadata": {

examples/plots.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010
},
1111
{
1212
"cell_type": "code",
13-
"execution_count": 1,
13+
"execution_count": null,
1414
"metadata": {},
1515
"outputs": [],
1616
"source": [
1717
"from datetime import datetime\n",
18+
"from IPython.display import display\n",
1819
"\n",
1920
"import geoengine as ge"
2021
]

test_all_notebooks.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@
77
import shutil
88
import sys
99

10-
# TODO: fix the blacklisted notebooks
11-
BLACKLIST = [
12-
'copernicus_dataspace.ipynb',
13-
'data_usage.ipynb',
14-
'plots.ipynb',
15-
]
16-
1710

1811
def eprint(*args, **kwargs):
1912
'''Print to stderr.'''
@@ -57,9 +50,6 @@ def main() -> int:
5750
if not file.endswith('.ipynb'):
5851
eprint(f"Skipping non-notebook file {file}")
5952
continue
60-
if file in BLACKLIST:
61-
eprint(f"Skipping blacklisted notebook {file}")
62-
continue
6353
notebook_path = os.path.join(root, file)
6454
if not run_test_notebook(notebook_path):
6555
return -1

0 commit comments

Comments
 (0)