Skip to content

Commit

Permalink
Merge pull request #58 from opendatacube/fix-s2
Browse files Browse the repository at this point in the history
fix s2 notebook
  • Loading branch information
pindge authored Dec 19, 2022
2 parents 2f16a80 + 6001210 commit 73d6d6b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ services:
volumes:
- ./notebooks:/notebooks
- ./tests:/tests
- ./utils:/utils
- ./products.csv:/products.csv
restart: always
checkdb:
Expand Down
23 changes: 18 additions & 5 deletions notebooks/Sentinel_2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,18 @@
"outputs": [],
"source": [
"import sys\n",
"sys.path.insert(1, '../utils/')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import datacube\n",
"\n",
"from notebooks.utils.deafrica_datahandling import load_ard\n",
"from notebooks.utils.deafrica_plotting import rgb"
"from utils.deafrica_datahandling import load_ard\n",
"from utils.deafrica_plotting import rgb"
]
},
{
Expand Down Expand Up @@ -498,7 +506,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -512,7 +520,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.8.15 | packaged by conda-forge | (default, Nov 22 2022, 08:49:35) \n[GCC 10.4.0]"
},
"vscode": {
"interpreter": {
"hash": "36f1ec0750f296e3257d4c290a6c8ed00b14af3513565f9d7fc44fe655b3805b"
}
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
12 changes: 9 additions & 3 deletions tests/test_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@ def test_esri_land_cover(tb):
def test_nasadem(tb):
assert True # ok

@pytest.mark.skip()
@pytest.mark.xfail(reason="Index error")
@testbook(f'{NB_DIR}/notebooks/Sentinel_2.ipynb', execute=True, timeout=180)
@testbook(f'{NB_DIR}/notebooks/Sentinel_2.ipynb',timeout=180)
def test_sentinel_2(tb):
tb.execute_cell(1)
tb.inject(
"""
import sys
sys.path.insert(1, '/notebooks/')
"""
)
tb.execute_cell(slice(3, 10))
assert True # ok

0 comments on commit 73d6d6b

Please sign in to comment.