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

Fixed path and root inconsistency. #1704

Merged
merged 1 commit into from
Oct 28, 2023
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
2 changes: 1 addition & 1 deletion torchgeo/datasets/agb_live_woody_density.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def _verify(self) -> None:
# Check if the user requested to download the dataset
if not self.download:
raise RuntimeError(
f"Dataset not found in `root={self.paths}` and `download=False`, "
f"Dataset not found in `paths={self.paths!r}` and `download=False`, "
"either specify a different `root` directory or use `download=True` "
"to automatically download the dataset."
)
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/astergdem.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def _verify(self) -> None:
return

raise RuntimeError(
f"Dataset not found in `root={self.paths}` "
f"Dataset not found in `paths={self.paths!r}` "
"either specify a different `root` directory or make sure you "
"have manually downloaded dataset tiles as suggested in the documentation."
)
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/cdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def _verify(self) -> None:
# Check if the user requested to download the dataset
if not self.download:
raise RuntimeError(
f"Dataset not found in `root={self.paths}` and `download=False`, "
f"Dataset not found in `paths={self.paths!r}` and `download=False`, "
"either specify a different `root` directory or use `download=True` "
"to automatically download the dataset."
)
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/chesapeake.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def _verify(self) -> None:
# Check if the user requested to download the dataset
if not self.download:
raise RuntimeError(
f"Dataset not found in `root={self.paths}` and `download=False`, "
f"Dataset not found in `paths={self.paths!r}` and `download=False`, "
"either specify a different `root` directory or use `download=True` "
"to automatically download the dataset."
)
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/cms_mangrove_canopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def _verify(self) -> None:
return

raise RuntimeError(
f"Dataset not found in `root={self.paths}` "
f"Dataset not found in `paths={self.paths!r}` "
"either specify a different `root` directory or make sure you "
"have manually downloaded the dataset as instructed in the documentation."
)
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/esri2020.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def _verify(self) -> None:
# Check if the user requested to download the dataset
if not self.download:
raise RuntimeError(
f"Dataset not found in `root={self.paths}` and `download=False`, "
f"Dataset not found in `paths={self.paths!r}` and `download=False`, "
"either specify a different `root` directory or use `download=True` "
"to automatically download the dataset."
)
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/eudem.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def _verify(self) -> None:
return

raise RuntimeError(
f"Dataset not found in `root={self.paths}` "
f"Dataset not found in `paths={self.paths!r}` "
"either specify a different `root` directory or make sure you "
"have manually downloaded the dataset as suggested in the documentation."
)
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/globbiomass.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def _verify(self) -> None:
return

raise RuntimeError(
f"Dataset not found in `root={self.paths}` "
f"Dataset not found in `paths={self.paths!r}` "
"either specify a different `root` directory or make sure you "
"have manually downloaded the dataset as suggested in the documentation."
)
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/l7irish.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def _verify(self) -> None:
# Check if the user requested to download the dataset
if not self.download:
raise RuntimeError(
f"Dataset not found in `root={self.paths}` and `download=False`, "
f"Dataset not found in `paths={self.paths!r}` and `download=False`, "
"either specify a different `root` directory or use `download=True` "
"to automatically download the dataset."
)
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/l8biome.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def _verify(self) -> None:
# Check if the user requested to download the dataset
if not self.download:
raise RuntimeError(
f"Dataset not found in `root={self.paths}` and `download=False`, "
f"Dataset not found in `paths={self.paths!r}` and `download=False`, "
"either specify a different `root` directory or use `download=True` "
"to automatically download the dataset."
)
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/nlcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def _verify(self) -> None:
# Check if the user requested to download the dataset
if not self.download:
raise RuntimeError(
f"Dataset not found in `root={self.paths}` and `download=False`, "
f"Dataset not found in `paths={self.paths!r}` and `download=False`, "
"either specify a different `root` directory or use `download=True` "
"to automatically download the dataset."
)
Expand Down
4 changes: 2 additions & 2 deletions torchgeo/datasets/openbuildings.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,11 @@ def _verify(self) -> None:
if not os.path.exists(os.path.join(self.paths, self.meta_data_filename)):
raise FileNotFoundError(
f"Meta data file {self.meta_data_filename} "
f"not found in in `root={self.paths}`."
f"not found in in `paths={self.paths!r}`."
)

raise RuntimeError(
f"Dataset not found in `root={self.paths}` "
f"Dataset not found in `paths={self.paths!r}` "
"either specify a different `root` directory or make sure you "
"have manually downloaded the dataset as suggested in the documentation."
)
Expand Down