Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved handling of imports from utils.py #308

Merged
merged 1 commit into from
Aug 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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