-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an extra SELF_CONTAINED catalog test (#658)
* Add an extra SELF_CONTAINED catalog test * Improve unit test * Run pre-commit * Make linter happy * Update test to avoid checking 'self' link 'self' link is always absolute; PySTAC avoids writing the link if the Catalog is self contained or relative published (besides the root catalog in the latter case). * Inline test issue-specific catalog; check raw json * Set root on resolved links when setting on Catalog When setting the root on a Catalog, also set the root on any child or item objects that are resolved. This handles the case where child items and catalogs were created, added to a catalog, and then that catalog added to another catalog, invalidating the originally set root links of the leaf items and catalogs. * Close file properly in test * Message which catalog failed for better debugging * Don't recursively clear the root of children/items When clearing the root link of a Catalog, avoid clearing the root link of the children/items. This is to avoid the root link clearing in the "clone" method to avoid touching the un-cloned linked STAC Objects. * Use STACObject.set_root in full_copy This avoids logic in the child class implementations that are incompatible with the full_copy logic, such as the Catalog's call of set_root on of child and item links. This crawling logic is handled by full_copy itself. * Update CHANGELOG Co-authored-by: Rob Emanuele <rdemanuele@gmail.com>
- Loading branch information
Showing
4 changed files
with
63 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters