stac-validator 3.9.1__tar.gz → 3.9.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: stac_validator
3
- Version: 3.9.1
3
+ Version: 3.9.2
4
4
  Summary: A package to validate STAC files
5
5
  Home-page: https://github.com/stac-utils/stac-validator
6
6
  Author: James Banting, Jonathan Healy
@@ -2,7 +2,7 @@
2
2
 
3
3
  from setuptools import setup
4
4
 
5
- __version__ = "3.9.1"
5
+ __version__ = "3.9.2"
6
6
 
7
7
  with open("README.md", "r") as fh:
8
8
  long_description = fh.read()
@@ -681,10 +681,22 @@ class StacValidate:
681
681
  Args:
682
682
  item_collection (dict): The dictionary representation of the item collection.
683
683
  """
684
+ # Store the original stac_file to restore it later
685
+ original_stac_file = self.stac_file
686
+
684
687
  for item in item_collection["features"]:
688
+ # Update the path to include the item ID for better traceability
689
+ if isinstance(original_stac_file, str) and "id" in item:
690
+ # Remove any query string from the URL before appending the item ID
691
+ base_url = original_stac_file.split("?")[0]
692
+ self.stac_file = f"{base_url}/{item['id']}"
693
+
685
694
  self.schema = ""
686
695
  self.validate_dict(item)
687
696
 
697
+ # Restore the original stac_file
698
+ self.stac_file = original_stac_file
699
+
688
700
  def validate_collections(self) -> None:
689
701
  """
690
702
  Validate STAC Collections from a /collections endpoint.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: stac-validator
3
- Version: 3.9.1
3
+ Version: 3.9.2
4
4
  Summary: A package to validate STAC files
5
5
  Home-page: https://github.com/stac-utils/stac-validator
6
6
  Author: James Banting, Jonathan Healy
File without changes
File without changes
File without changes