Skip to content

Commit

Permalink
Prepare for release (#484)
Browse files Browse the repository at this point in the history
* update pre-commit

* update version

* satisfy linters

* update changelog

* update changelog

* update read-the-docs configuration
  • Loading branch information
zigaLuksic authored Oct 24, 2023
1 parent e4f9a31 commit e757999
Show file tree
Hide file tree
Showing 74 changed files with 101 additions and 36 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: end-of-file-fixer
- id: requirements-txt-fixer
Expand All @@ -13,13 +13,13 @@ repos:
- id: debug-statements

- repo: https://github.com/psf/black
rev: 23.7.0
rev: 23.10.1
hooks:
- id: black
language_version: python3

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.282"
rev: "v0.1.1"
hooks:
- id: ruff

Expand Down
14 changes: 9 additions & 5 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

sphinx:
configuration: docs/source/conf.py

python:
version: 3.8
install:
- method: pip
path: .
extra_requirements:
- docs
- method: pip
path: .
extra_requirements:
- docs
7 changes: 7 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [Version 3.9.2] - 2023-10-24

- Adjusted how user credentials are passed to the OAuth service.
- Added `QUALITY_FLAGS` band to `S3_OLCI`
- Batch statistical API now supports IAM role style credentials.
- Various minor improvements

## [Version 3.9.1] - 2023-05-04

- The parameter `sh_auth_base_url` has been replaced with `sh_token_url` to allow authentication on endpoints with suffixes other than `oauth/token`. For the new parameter the address must be provided in full, e.g. `https://services.sentinel-hub.com/oauth/token` instead of `https://services.sentinel-hub.com`. The change only affects users who manually adjusted this field.
Expand Down
1 change: 1 addition & 0 deletions examples/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Utilities used by example notebooks
"""

from __future__ import annotations

from typing import Any
Expand Down
2 changes: 1 addition & 1 deletion sentinelhub/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Version of the sentinelhub package."""

__version__ = "3.9.1"
__version__ = "3.9.2"
1 change: 1 addition & 0 deletions sentinelhub/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
The part of the package that implements interface with Sentinel Hub services.
"""

from .batch import (
BatchCollection,
BatchRequest,
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/api/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module implementing some utility functions not suitable for other utility modules
"""

# ruff: noqa: FA100
# do not use `from __future__ import annotations`, it clashes with `dataclass_json`
from abc import ABCMeta, abstractmethod
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/api/base_request.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Implementation of base Sentinel Hub interfaces
"""

from __future__ import annotations

from abc import ABCMeta, abstractmethod
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/api/batch/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
The part of the package that implements interface with Sentinel Hub services.
"""

from .base import BatchRequestStatus, BatchUserAction
from .process import BatchCollection, BatchRequest, BatchTileStatus, SentinelHubBatch
from .statistical import BatchStatisticalRequest, SentinelHubBatchStatistical
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/api/batch/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module containing shared code of Batch Process API and Batch Statistical API
"""

# ruff: noqa: FA100
# do not use `from __future__ import annotations`, it clashes with `dataclass_json` (even through inheritance)
from abc import ABCMeta
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/api/batch/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Module implementing an interface with
`Sentinel Hub Batch Processing API <https://docs.sentinel-hub.com/api/latest/api/batch/>`__.
"""

# ruff: noqa: FA100
# do not use `from __future__ import annotations`, it clashes with `dataclass_json`
import datetime as dt
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/api/batch/statistical.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Module implementing an interface with
`Sentinel Hub Batch Processing API <https://docs.sentinel-hub.com/api/latest/api/batch-statistical/>`__.
"""

# ruff: noqa: FA100
# do not use `from __future__ import annotations`, it clashes with `dataclass_json`
import datetime as dt
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/api/batch/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module implementing utilities for working with batch jobs.
"""

from __future__ import annotations

import logging
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/api/byoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Module implementing an interface with
`Sentinel Hub Bring Your Own COG API <https://docs.sentinel-hub.com/api/latest/api/byoc/>`__.
"""

# ruff: noqa: FA100
# do not use `from __future__ import annotations`, it clashes with `dataclass_json`
from dataclasses import dataclass, field
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/api/catalog.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
A client interface for `Sentinel Hub Catalog API <https://docs.sentinel-hub.com/api/latest/api/catalog>`__.
"""

from __future__ import annotations

import datetime as dt
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/api/fis.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module for working with Sentinel Hub FIS service
"""

from __future__ import annotations

import datetime
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/api/ogc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Module for working with Sentinel Hub OGC services
`Sentinel Hub OGC services <https://www.sentinel-hub.com/develop/api/ogc/standard-parameters/>`__.
"""

from __future__ import annotations

import datetime
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/api/opensearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
For more search parameters check
`service description <http://opensearch.sentinel-hub.com/resto/api/collections/Sentinel2/describe.xml>`__.
"""

from __future__ import annotations

import datetime as dt
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/api/process.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Implementation of `Sentinel Hub Process API interface <https://docs.sentinel-hub.com/api/latest/api/process/>`__.
"""

from __future__ import annotations

from typing import Any, Iterable
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/api/statistical.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Implementation of
`Sentinel Hub Statistical API interface <https://docs.sentinel-hub.com/api/latest/api/statistical/>`__.
"""

from __future__ import annotations

from typing import Any, Sequence
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/api/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module implementing some common utility functions
"""

# ruff: noqa: FA100
# do not use `from __future__ import annotations`, it clashes with `dataclass_json`
from enum import Enum
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/api/wfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Interface of
`Sentinel Hub Web Feature Service (WFS) <https://www.sentinel-hub.com/develop/api/ogc/standard-parameters/wfs/>`__.
"""

from __future__ import annotations

import datetime as dt
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/areas.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module for working with large geographical areas
"""

from __future__ import annotations

import itertools
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/aws/batch.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module implementing utilities for collecting data, produced with Sentinel Hub Statistical Batch API, from an S3 bucket.
"""

from typing import List, Optional, Sequence, Union

from ..api.batch.statistical import BatchStatisticalRequest, BatchStatisticalRequestType, SentinelHubBatchStatistical
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/aws/client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module implementing a download client that is adjusted to download from AWS
"""

import logging
import warnings
from typing import Any, Dict, Optional
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/aws/commands.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module that implements command line interface for AWS package functionalities
"""

from typing import Optional, Tuple

import click
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/aws/constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Constants related to AWS functionalities of the package
"""

import itertools as it
from enum import Enum

Expand Down
1 change: 1 addition & 0 deletions sentinelhub/aws/request.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Data request interface for downloading satellite data from AWS
"""

import functools
from abc import abstractmethod
from typing import Any, Generic, List, Optional, Tuple, TypeVar, Union
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Implementation of base interface classes of this package.
"""

from __future__ import annotations

import copy
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/commands.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module that implements command line interface for the package
"""

from __future__ import annotations

import json
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module for managing configuration data from `config.toml`
"""

from __future__ import annotations

import copy
Expand Down
3 changes: 2 additions & 1 deletion sentinelhub/constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module defining constants and enumerate types used in the package
"""

from __future__ import annotations

import functools
Expand Down Expand Up @@ -104,7 +105,7 @@ def _parse_crs(value: object) -> object: # noqa: C901
if isinstance(value, dict) and "init" in value:
value = value["init"]
if hasattr(value, "to_epsg"):
if value == CRSMeta._UNSUPPORTED_CRS: # noqa: SLF001
if value == CRSMeta._UNSUPPORTED_CRS:
message = (
"sentinelhub-py supports only WGS 84 coordinate reference system with "
"coordinate order lng-lat. Given pyproj.CRS(4326) has coordinate order lat-lng. Be careful "
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/data_collections.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module defining data collections
"""

from __future__ import annotations

from dataclasses import dataclass, field, fields
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/data_collections_bands.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Contains information about data collections used by SH """

from __future__ import annotations

from dataclasses import dataclass
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/data_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module with statistics to dataframe transformation.
"""

from __future__ import annotations

from typing import Any, Iterable
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/decoding.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module for data decoding
"""

from __future__ import annotations

import json
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/download/client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module implementing the main download client class
"""

from __future__ import annotations

import json
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/download/handlers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module implementing error handlers which can occur during download procedure
"""

from __future__ import annotations

import functools
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/download/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module implementing model classes to store download-related parameters and data.
"""

from __future__ import annotations

import datetime as dt
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/download/rate_limit.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module implementing rate limiting logic for Sentinel Hub service
"""

import time
from enum import Enum

Expand Down
1 change: 1 addition & 0 deletions sentinelhub/download/sentinelhub_client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module implementing a rate-limited multithreaded download client for downloading from Sentinel Hub service
"""

from __future__ import annotations

import logging
Expand Down
1 change: 1 addition & 0 deletions sentinelhub/download/sentinelhub_statistical_client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Download process for Sentinel Hub Statistical API
"""

from __future__ import annotations

import concurrent.futures
Expand Down
Loading

0 comments on commit e757999

Please sign in to comment.