Skip to content

Commit

Permalink
Improved handling of imports from utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksMat committed Aug 8, 2022
1 parent 9ef079a commit a13775d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
6 changes: 4 additions & 2 deletions examples/batch_processing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"import geopandas as gpd\n",
"import matplotlib.pyplot as plt\n",
"from matplotlib.patches import Patch\n",
"from utils import plot_image\n",
"\n",
"from sentinelhub import (\n",
" CRS,\n",
Expand All @@ -53,7 +52,10 @@
" SHConfig,\n",
" bbox_to_dimensions,\n",
" monitor_batch_job,\n",
")"
")\n",
"\n",
"# The following is not a package. It is a file utils.py which should be in the same folder as this notebook.\n",
"from utils import plot_image"
]
},
{
Expand Down
1 change: 1 addition & 0 deletions examples/data_collections.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@
"source": [
"%matplotlib inline\n",
"\n",
"# The following is not a package. It is a file utils.py which should be in the same folder as this notebook.\n",
"from utils import plot_image\n",
"\n",
"plot_image(image, factor=3.5 / 255, clip_range=(0, 1))"
Expand Down
6 changes: 4 additions & 2 deletions examples/process_request.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"from utils import plot_image\n",
"\n",
"from sentinelhub import (\n",
" CRS,\n",
Expand All @@ -75,7 +74,10 @@
" SentinelHubDownloadClient,\n",
" SentinelHubRequest,\n",
" bbox_to_dimensions,\n",
")"
")\n",
"\n",
"# The following is not a package. It is a file utils.py which should be in the same folder as this notebook.\n",
"from utils import plot_image"
]
},
{
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ preview = true
[tool.isort]
profile = "black"
known_absolute = "sentinelhub"
known_local_folder = "utils"
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "ABSOLUTE", "LOCALFOLDER"]
line_length = 120

Expand Down

0 comments on commit a13775d

Please sign in to comment.