Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: microsoft/planetary-computer-sdk-for-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: microsoft/planetary-computer-sdk-for-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: feature/pc-filesystem
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Aug 8, 2022

  1. [POC]: Added "pc" fsspec filesystem

    This adds a "pc" fsspec filesystem implementation, which lets us
    insert "pc::" in an fsspec URL and automatically sign it when loading
    it with an fsspec client.
    
    The primary motivation is integration with fsspec's filesystem where
    users would need to call `planetary_computer.sign` in multiple places
    
    1. Once for loading the index JSON files
    2. Once for signing the reference filesystem templates
    
    Which lets us replace this:
    
    ```python
    >>> result = xr.open_dataset(
    ...     fsspec.get_mapper(
    ...         "reference://",
    ...         fo=planetary_computer.sign(requests.get(planetary_computer.sign("https://deltaresreservoirssa.blob.core.windows.net/references/reservoirs/chirps.json")).json()),
    ...     ),
    ...     engine="zarr",
    ...     consolidated=False,
    ... )
    ```
    
    With this:
    
    ```python
    >>> result = xr.open_dataset(
    ...     "pc::reference::pc::https://deltaresreservoirssa.blob.core.windows.net/references/reservoirs/CHIRPS.json",
    ...     engine="zarr",
    ...     consolidated=False,
    ... )
    ```
    Tom Augspurger committed Aug 8, 2022
    Configuration menu
    Copy the full SHA
    8f042bd View commit details
    Browse the repository at this point in the history
Loading