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: stac-utils/stac-fastapi-elasticsearch-opensearch
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.2.5
Choose a base ref
...
head repository: stac-utils/stac-fastapi-elasticsearch-opensearch
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.0.0
Choose a head ref
  • 8 commits
  • 35 files changed
  • 2 contributors

Commits on Apr 12, 2025

  1. Zero-config dynamically-generated queryables, Performance fixes (#351)

    **Related Issue(s):**
    
    - Fixes
    #345
    - Fixes
    #344
    - Fixes
    #336
    
    **Description:**
    
    This PR consists of self-contained commits (except the first commit that
    provides database_logic deduplication), making it easy to change or
    remove individual patches. It addresses several small issues, improves
    the performance of certain methods, and adds support for
    dynamically-generated queryables. This enhancement doesn't require any
    new configuration as queryables are generated on the fly based on the
    os/es mappings. The implementation is designed for extensibility, with
    built-in logic for augmenting fields metadata with additional
    information. Currently, it only includes the _DEFAULT_QUERYABLES
    configuration, which was simply copied from the pre-PR code.
    
    Example queryables response:
    
    ```json
    {"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://stac-api.example.com/queryables","type":"object","title":"Queryables for STAC API","description":"Queryable names for the STAC API Item Search filter.","properties":{"bbox":{"title":"Bbox","type":"number"},"collection":{"description":"Collection","$ref":"https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/item.json#/definitions/core/allOf/2/then/properties/collection","title":"Collection","type":"string"},"geometry":{"description":"Geometry","$ref":"https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/item.json#/definitions/core/allOf/1/oneOf/0/properties/geometry","title":"Geometry","type":"object"},"id":{"description":"ID","$ref":"https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/item.json#/definitions/core/allOf/2/properties/id","title":"Id","type":"string"},"stac_extensions":{"title":"Stac Extensions","type":"string"},"stac_version":{"title":"Stac Version","type":"string"},"type":{"title":"Type","type":"string"},"constellation":{"title":"Constellation","type":"string"},"created":{"description":"Creation Timestamp","$ref":"https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/datetime.json#/properties/created","title":"Created","type":"string","format":"date-time"},"datetime":{"description":"Acquisition Timestamp","$ref":"https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/datetime.json#/properties/datetime","title":"Datetime","type":"string","format":"date-time"},"end_datetime":{"title":"End Datetime","type":"string","format":"date-time"},"eopf:datatake_id":{"title":"Eopf:Datatake Id","type":"string"},"eopf:instrument_configuration_id":{"title":"Eopf:Instrument Configuration Id","type":"number"},"instruments":{"title":"Instruments","type":"string"},"platform":{"title":"Platform","type":"string"},"processing:datetime":{"title":"Processing:Datetime","type":"string","format":"date-time"},"processing:facility":{"title":"Processing:Facility","type":"string"},"processing:level":{"title":"Processing:Level","type":"string"},"processing:version":{"title":"Processing:Version","type":"string"},"product:timeliness":{"title":"Product:Timeliness","type":"string"},"product:timeliness_category":{"title":"Product:Timeliness Category","type":"string"},"product:type":{"title":"Product:Type","type":"string"},"published":{"title":"Published","type":"string","format":"date-time"},"sar:center_frequency":{"title":"Sar:Center Frequency","type":"number"},"sar:frequency_band":{"title":"Sar:Frequency Band","type":"string"},"sar:instrument_mode":{"title":"Sar:Instrument Mode","type":"string"},"sar:observation_direction":{"title":"Sar:Observation Direction","type":"string"},"sar:pixel_spacing_azimuth":{"title":"Sar:Pixel Spacing Azimuth","type":"number"},"sar:pixel_spacing_range":{"title":"Sar:Pixel Spacing Range","type":"number"},"sar:polarizations":{"title":"Sar:Polarizations","type":"string"},"sar:resolution_azimuth":{"title":"Sar:Resolution Azimuth","type":"number"},"sar:resolution_range":{"title":"Sar:Resolution Range","type":"number"},"sat:absolute_orbit":{"title":"Sat:Absolute Orbit","type":"integer"},"sat:orbit_cycle":{"title":"Sat:Orbit Cycle","type":"number"},"sat:orbit_state":{"title":"Sat:Orbit State","type":"string"},"sat:platform_international_designator":{"title":"Sat:Platform International Designator","type":"string"},"sat:relative_orbit":{"title":"Sat:Relative Orbit","type":"integer"},"start_datetime":{"title":"Start Datetime","type":"string","format":"date-time"},"updated":{"description":"Creation Timestamp","$ref":"https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/datetime.json#/properties/updated","title":"Updated","type":"string","format":"date-time"},"view:azimuth":{"title":"View:Azimuth","type":"number"},"view:incidence_angle":{"title":"View:Incidence Angle","type":"number"},"auth:schemes.oidc.openIdConnectUrl":{"title":"Auth:Schemes.Oidc.Openidconnecturl","type":"string"},"auth:schemes.oidc.type":{"title":"Auth:Schemes.Oidc.Type","type":"string"},"auth:schemes.s3.type":{"title":"Auth:Schemes.S3.Type","type":"string"},"storage:schemes.cdse-s3.description":{"title":"Storage:Schemes.Cdse-S3.Description","type":"string"},"storage:schemes.cdse-s3.platform":{"title":"Storage:Schemes.Cdse-S3.Platform","type":"string"},"storage:schemes.cdse-s3.requester_pays":{"title":"Storage:Schemes.Cdse-S3.Requester Pays","type":"boolean"},"storage:schemes.cdse-s3.title":{"title":"Storage:Schemes.Cdse-S3.Title","type":"string"},"storage:schemes.cdse-s3.type":{"title":"Storage:Schemes.Cdse-S3.Type","type":"string"},"storage:schemes.creodias-s3.description":{"title":"Storage:Schemes.Creodias-S3.Description","type":"string"},"storage:schemes.creodias-s3.platform":{"title":"Storage:Schemes.Creodias-S3.Platform","type":"string"},"storage:schemes.creodias-s3.requester_pays":{"title":"Storage:Schemes.Creodias-S3.Requester Pays","type":"boolean"},"storage:schemes.creodias-s3.title":{"title":"Storage:Schemes.Creodias-S3.Title","type":"string"},"storage:schemes.creodias-s3.type":{"title":"Storage:Schemes.Creodias-S3.Type","type":"string"}},"additionalProperties":false}
    ```
    
    PS. I think the auto-generated "title" should be removed completely, but
    I included it because I found it to be common practice in some STAC
    projects. I'm not sure how you feel about it.
    
    **PR Checklist:**
    
    - [ ] Code is formatted and linted (run `pre-commit run --all-files`)
    - [ ] Tests pass (run `make test`)
    - [ ] Documentation has been updated to reflect changes, if applicable
    - [ ] Changes are added to the changelog
    
    ---------
    
    Co-authored-by: Jonathan Healy <jonathan.d.healy@gmail.com>
    Zaczero and jonhealy1 authored Apr 12, 2025
    Configuration menu
    Copy the full SHA
    6b25e56 View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2025

  1. Update stac-fastapi parent libraries to 5.1.1 (#354)

    **Related Issue(s):**
    
    - #
    
    **Description:**
    
    
    **PR Checklist:**
    
    - [x] Code is formatted and linted (run `pre-commit run --all-files`)
    - [x] Tests pass (run `make test`)
    - [x] Documentation has been updated to reflect changes, if applicable
    - [x] Changes are added to the changelog
    jonhealy1 authored Apr 16, 2025
    Configuration menu
    Copy the full SHA
    fe37609 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2025

  1. Inherit from Base Database Logic (#355)

    **Related Issue(s):**
    
    - #342 
    - #343
    
    **Description:**
    
    
    **PR Checklist:**
    
    - [x] Code is formatted and linted (run `pre-commit run --all-files`)
    - [x] Tests pass (run `make test`)
    - [x] Documentation has been updated to reflect changes, if applicable
    - [x] Changes are added to the changelog
    jonhealy1 authored Apr 17, 2025
    Configuration menu
    Copy the full SHA
    e6ebe29 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    790fb7d View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2025

  1. Update package names for Pep625 compliance (#358)

    **Related Issue(s):**
    
    #337 
    
    **Description:**
    
    - Updated package names in setup.py files to use underscores instead of
    periods for PEP 625 compliance
      - Changed `stac_fastapi.opensearch` to `stac_fastapi_opensearch`
      - Changed `stac_fastapi.elasticsearch` to `stac_fastapi_elasticsearch`
      - Changed `stac_fastapi.core` to `stac_fastapi_core`
      - Updated all related dependencies to use the new naming convention
    - Renamed `docker-compose.yml` to `compose.yml` to align with Docker
    Compose V2 conventions
    - Removed deprecated `version` field from all compose files
    - Updated `STAC_FASTAPI_VERSION` environment variables to 4.0.0a1 in all
    compose files
    - Bumped version from 4.0.0a0 to 4.0.0a1 for the PEP 625 compliant
    release
    - Updated dependency requirements to use compatible release specifiers
    (~=) for more controlled updates while allowing for bug fixes and
    security patches
    - Removed elasticsearch-dsl dependency as it's now part of the
    elasticsearch package since version 8.18.0
    
    **PR Checklist:**
    
    - [x] Code is formatted and linted (run `pre-commit run --all-files`)
    - [x] Tests pass (run `make test`)
    - [x] Documentation has been updated to reflect changes, if applicable
    - [x] Changes are added to the changelog
    jonhealy1 authored Apr 18, 2025
    Configuration menu
    Copy the full SHA
    5f91e50 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2025

  1. Enable direct response, stac-fastapi 5.2.0, deprecation warnings (#359)

    **Related Issue(s):**
    
    - #347 
    
    **Description:**
    
    #### v4.0.0a2 release 
    
    #### Added
    - Added support for high-performance direct response mode for both
    Elasticsearch and Opensearch backends, controlled by the
    `ENABLE_DIRECT_RESPONSE` environment variable. When enabled
    (`ENABLE_DIRECT_RESPONSE=true`), endpoints return Starlette Response
    objects directly, bypassing FastAPI's jsonable_encoder and Pydantic
    serialization for significantly improved performance on large search
    responses. **Note:** In this mode, all FastAPI dependencies (including
    authentication, custom status codes, and validation) are disabled for
    all routes. Default is `false` for safety. A warning is logged at
    startup if enabled. See [issue
    #347](#347)
    
    #### Changed
    - Updated test suite to use `httpx.ASGITransport(app=...)` for FastAPI
    app testing (removes deprecation warning).
    - Updated stac-fastapi parent libraries to 5.2.0. 
    - Migrated Elasticsearch index template creation from legacy
    `put_template` to composable `put_index_template` API in
    `database_logic.py`. This resolves deprecation warnings and ensures
    compatibility with Elasticsearch 7.x and 8.x.
    - Updated all Pydantic models to use `ConfigDict` instead of class-based
    `Config` for Pydantic v2 compatibility. This resolves deprecation
    warnings and prepares for Pydantic v3.
    - Migrated all Pydantic `@root_validator` validators to
    `@model_validator` for Pydantic v2 compatibility.
    - Migrated startup event handling from deprecated
    `@app.on_event("startup")` to FastAPI's recommended lifespan context
    manager. This removes deprecation warnings and ensures compatibility
    with future FastAPI versions.
    
    **PR Checklist:**
    
    - [x] Code is formatted and linted (run `pre-commit run --all-files`)
    - [x] Tests pass (run `make test`)
    - [x] Documentation has been updated to reflect changes, if applicable
    - [x] Changes are added to the changelog
    jonhealy1 authored Apr 22, 2025
    Configuration menu
    Copy the full SHA
    67df17b View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2025

  1. Lifespan context (#361)

    **Related Issue(s):**
    
    - #
    
    **Description:**
    - Migrated startup event handling from deprecated `@app.on_event("startup")` to FastAPI's recommended lifespan context manager. This removes deprecation warnings and ensures compatibility with future FastAPI versions
    
    **PR Checklist:**
    
    - [x] Code is formatted and linted (run `pre-commit run --all-files`)
    - [x] Tests pass (run `make test`)
    - [x] Documentation has been updated to reflect changes, if applicable
    - [x] Changes are added to the changelog
    jonhealy1 authored Apr 23, 2025
    Configuration menu
    Copy the full SHA
    8079607 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2025

  1. Update to v4.0.0 (#362)

    **Description:**
    
    **Changes from 3.2.5:**
    
    #### Added
    - Added support for dynamically-generated queryables based on
    Elasticsearch/OpenSearch mappings, with extensible metadata augmentation
    [#351](#351)
    - Included default queryables configuration for seamless integration.
    [#351](#351)
    - Added support for high-performance direct response mode for both
    Elasticsearch and Opensearch backends, controlled by the
    `ENABLE_DIRECT_RESPONSE` environment variable. When enabled
    (`ENABLE_DIRECT_RESPONSE=true`), endpoints return Starlette Response
    objects directly, bypassing FastAPI's jsonable_encoder and Pydantic
    serialization for significantly improved performance on large search
    responses. **Note:** In this mode, all FastAPI dependencies (including
    authentication, custom status codes, and validation) are disabled for
    all routes. Default is `false` for safety. A warning is logged at
    startup if enabled. See [issue
    #347](#347)
    and [PR
    #359](#359).
    - Added robust tests for the `ENABLE_DIRECT_RESPONSE` environment
    variable, covering both Elasticsearch and OpenSearch backends. Tests
    gracefully handle missing backends by attempting to import both configs
    and skipping if neither is available.
    [#359](#359)
    
    #### Changed
    - Refactored database logic to reduce duplication
    [#351](#351)
    - Replaced `fastapi-slim` with `fastapi` dependency
    [#351](#351)
    - Changed minimum Python version to 3.9
    [#354](#354)
    - Updated stac-fastapi api, types, and extensions libraries to 5.1.1
    from 3.0.0 and made various associated changes
    [#354](#354)
    - Changed makefile commands from 'docker-compose' to 'docker compose'
    [#354](#354)
    - Updated package names in setup.py files to use underscores instead of
    periods for PEP 625 compliance
    [#358](#358)
      - Changed `stac_fastapi.opensearch` to `stac_fastapi_opensearch`
      - Changed `stac_fastapi.elasticsearch` to `stac_fastapi_elasticsearch`
      - Changed `stac_fastapi.core` to `stac_fastapi_core`
      - Updated all related dependencies to use the new naming convention
    - Renamed `docker-compose.yml` to `compose.yml` to align with Docker
    Compose V2 conventions
    [#358](#358)
    - Removed deprecated `version` field from all compose files
    [#358](#358)
    - Updated `STAC_FASTAPI_VERSION` environment variables to 4.0.0 in all
    compose files
    [#362](#362)
    - Bumped version from 4.0.0a2 to 4.0.0 for the PEP 625 compliant release
    [#362](#362)
    - Updated dependency requirements to use compatible release specifiers
    (~=) for more controlled updates while allowing for bug fixes and
    security patches
    [#358](#358)
    - Removed elasticsearch-dsl dependency as it's now part of the
    elasticsearch package since version 8.18.0
    [#358](#358)
    - Updated test suite to use `httpx.ASGITransport(app=...)` for FastAPI
    app testing (removes deprecation warning).
    [#359](#359)
    - Updated stac-fastapi parent libraries to 5.2.0.
    [#359](#359)
    - Migrated Elasticsearch index template creation from legacy
    `put_template` to composable `put_index_template` API in
    `database_logic.py`. This resolves deprecation warnings and ensures
    compatibility with Elasticsearch 7.x and 8.x.
    [#359](#359)
    - Updated all Pydantic models to use `ConfigDict` instead of class-based
    `Config` for Pydantic v2 compatibility. This resolves deprecation
    warnings and prepares for Pydantic v3.
    [#359](#359)
    - Migrated all Pydantic `@root_validator` validators to
    `@model_validator` for Pydantic v2 compatibility.
    [#359](#359)
    - Migrated startup event handling from deprecated
    `@app.on_event("startup")` to FastAPI's recommended lifespan context
    manager. This removes deprecation warnings and ensures compatibility
    with future FastAPI versions.
    [#361](#361)
    - Refactored all boolean environment variable parsing in both
    Elasticsearch and OpenSearch backends to use the shared `get_bool_env`
    utility. This ensures robust and consistent handling of environment
    variables such as `ES_USE_SSL`, `ES_HTTP_COMPRESS`, and
    `ES_VERIFY_CERTS` across both backends.
    [#359](#359)
    
    #### Fixed
    - Improved performance of `mk_actions` and `filter-links` methods
    [#351](#351)
    - Fixed inheritance relating to BaseDatabaseSettings and ApiBaseSettings
    [#355](#355)
    - Fixed delete_item and delete_collection methods return types
    [#355](#355)
    - Fixed inheritance relating to DatabaseLogic and BaseDatabaseLogic, and
    ApiBaseSettings
    [#355](#355)
    
    **PR Checklist:**
    
    - [x] Code is formatted and linted (run `pre-commit run --all-files`)
    - [x] Tests pass (run `make test`)
    - [x] Documentation has been updated to reflect changes, if applicable
    - [x] Changes are added to the changelog
    jonhealy1 authored Apr 24, 2025
    Configuration menu
    Copy the full SHA
    53a9d7e View commit details
    Browse the repository at this point in the history
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy