Skip to content

Commit

Permalink
fix scripts: avoid import error when working with conda environment
Browse files Browse the repository at this point in the history
  • Loading branch information
odhondt committed Aug 27, 2024
1 parent 4bb60b0 commit 26a18df
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 11 additions & 0 deletions scripts/test-s1-core.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# %%
# Uncomment the next block to test conda imports

# import sys
# sys.path.remove("/eo_tools")
# sys.path.append("/eo_tools/") # workaround to include eo_tools_dev
# import eo_tools
# print(f"EO-Tools imported from:")
# print(f"{eo_tools.__file__=}")

from eo_tools.S1.core import S1IWSwath
from eo_tools.S1.core import align, coregister
from eo_tools.S1.util import presum
Expand All @@ -13,6 +22,8 @@
import logging

logging.basicConfig(level=logging.INFO)
logging.getLogger("httpx").setLevel(logging.WARNING)
logging.getLogger("numexpr").setLevel(logging.WARNING)
log = logging.getLogger(__name__)


Expand Down
5 changes: 3 additions & 2 deletions scripts/test-s1-full-product-processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
logging.getLogger("httpx").setLevel(logging.WARNING)
logging.getLogger("numexpr").setLevel(logging.WARNING)

# Uncomment these lines to test conda imports
# Uncomment the next block to test conda imports

# import sys
# sys.path.remove("/eo_tools")
# sys.path.append("/eo_tools") # workaround to include eo_tools_dev
# import eo_tools
# print(f"EO-Tools imported from:")
# print(f"{eo_tools.__file__=}")

# from folium import LayerControl
import os
import geopandas as gpd
# from eodag import EODataAccessGateway
Expand Down

0 comments on commit 26a18df

Please sign in to comment.