diff --git a/conda-env.yml b/conda-env.yml index 48aec619..81c056e1 100644 --- a/conda-env.yml +++ b/conda-env.yml @@ -2,7 +2,7 @@ name: dolphin-env channels: - conda-forge dependencies: - - python>=3.8 + - python==3.9 - pip>=21.3 # https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/#editable-installation - git # for pip install, due to setuptools_scm - gdal>=3.3 diff --git a/pyproject.toml b/pyproject.toml index f7bd9b80..2fe33dea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" name = "dolphin" description = "Workflows for generating surface displacement maps using InSAR" readme = { file = "README.md", content-type = "text/markdown" } -requires-python = ">=3.8" +requires-python = ">=3.9" classifiers = [ "Development Status :: 2 - Pre-Alpha", diff --git a/src/dolphin/_cli_unwrap.py b/src/dolphin/_cli_unwrap.py index 2fc4a485..7005020e 100644 --- a/src/dolphin/_cli_unwrap.py +++ b/src/dolphin/_cli_unwrap.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import argparse from pathlib import Path from typing import TYPE_CHECKING, Any diff --git a/src/dolphin/_log.py b/src/dolphin/_log.py index a173b60c..03ff939d 100644 --- a/src/dolphin/_log.py +++ b/src/dolphin/_log.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import json import logging import logging.config diff --git a/src/dolphin/_overviews.py b/src/dolphin/_overviews.py index 4bbb46a0..feb22809 100644 --- a/src/dolphin/_overviews.py +++ b/src/dolphin/_overviews.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import argparse import logging from enum import Enum diff --git a/src/dolphin/filtering.py b/src/dolphin/filtering.py index c307f722..19039a38 100644 --- a/src/dolphin/filtering.py +++ b/src/dolphin/filtering.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import multiprocessing as mp from concurrent.futures import ProcessPoolExecutor from itertools import repeat diff --git a/src/dolphin/goldstein.py b/src/dolphin/goldstein.py index c092bc03..a6735aef 100644 --- a/src/dolphin/goldstein.py +++ b/src/dolphin/goldstein.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import numpy as np from numpy.typing import NDArray diff --git a/src/dolphin/interpolation.py b/src/dolphin/interpolation.py index 99cfc0e9..476c1cdd 100644 --- a/src/dolphin/interpolation.py +++ b/src/dolphin/interpolation.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import logging import numba diff --git a/src/dolphin/io/_process.py b/src/dolphin/io/_process.py index 0fc9ecce..51ffc448 100644 --- a/src/dolphin/io/_process.py +++ b/src/dolphin/io/_process.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from concurrent.futures import FIRST_EXCEPTION, Future, ThreadPoolExecutor, wait from typing import Protocol, Sequence diff --git a/src/dolphin/phase_link/_compress.py b/src/dolphin/phase_link/_compress.py index 2df1e38f..33b737d1 100644 --- a/src/dolphin/phase_link/_compress.py +++ b/src/dolphin/phase_link/_compress.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import warnings import numpy as np diff --git a/src/dolphin/phase_link/metrics.py b/src/dolphin/phase_link/metrics.py index a12819a8..56f92b14 100644 --- a/src/dolphin/phase_link/metrics.py +++ b/src/dolphin/phase_link/metrics.py @@ -1,5 +1,7 @@ """Module for computing quality metrics of estimated solutions.""" +from __future__ import annotations + import jax.numpy as jnp from jax import Array, jit, vmap from jax.typing import ArrayLike diff --git a/src/dolphin/phase_link/simulate.py b/src/dolphin/phase_link/simulate.py index cdbadd52..e9f7f1f6 100644 --- a/src/dolphin/phase_link/simulate.py +++ b/src/dolphin/phase_link/simulate.py @@ -4,6 +4,8 @@ full CPU/GPU stack implementations. """ +from __future__ import annotations + import numpy as np import numpy.linalg as la import scipy.ndimage as ndi diff --git a/src/dolphin/similarity.py b/src/dolphin/similarity.py index 12fbe008..7df1a3d3 100644 --- a/src/dolphin/similarity.py +++ b/src/dolphin/similarity.py @@ -3,6 +3,8 @@ Uses metric from [@Wang2022AccuratePersistentScatterer] for similarity. """ +from __future__ import annotations + import logging from pathlib import Path from typing import Callable, Literal, Sequence diff --git a/src/dolphin/stack.py b/src/dolphin/stack.py index 98e78f80..66c433c7 100755 --- a/src/dolphin/stack.py +++ b/src/dolphin/stack.py @@ -151,18 +151,18 @@ class CompressedSlcInfo(BaseModel): ..., description="Datetime of the last real SLC used in the compression." ) - real_slc_file_list: list[Filename] | None = Field( + real_slc_file_list: Optional[list[Filename]] = Field( None, description="List of real SLC filenames in the ministack.", ) - real_slc_dates: list[datetime] | None = Field( + real_slc_dates: Optional[list[datetime]] = Field( None, description=( "List of date sequences, one for each SLC in the ministack. " "Each item is a list/tuple of datetime.date or datetime.datetime objects." ), ) - compressed_slc_file_list: list[Filename] | None = Field( + compressed_slc_file_list: Optional[list[Filename]] = Field( None, description="List of compressed SLC filenames in the ministack.", ) diff --git a/src/dolphin/unwrap/_post_process.py b/src/dolphin/unwrap/_post_process.py index 64bdfd16..bc068cf9 100644 --- a/src/dolphin/unwrap/_post_process.py +++ b/src/dolphin/unwrap/_post_process.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import logging import numpy as np diff --git a/src/dolphin/unwrap/_unwrap_3d.py b/src/dolphin/unwrap/_unwrap_3d.py index 49e9005e..da076ab1 100644 --- a/src/dolphin/unwrap/_unwrap_3d.py +++ b/src/dolphin/unwrap/_unwrap_3d.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import logging import shutil import subprocess diff --git a/src/dolphin/workflows/_cli_run.py b/src/dolphin/workflows/_cli_run.py index f0b1a138..29489d31 100644 --- a/src/dolphin/workflows/_cli_run.py +++ b/src/dolphin/workflows/_cli_run.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import argparse from typing import TYPE_CHECKING, Any, Optional, Sequence diff --git a/src/dolphin/workflows/config/_yaml_model.py b/src/dolphin/workflows/config/_yaml_model.py index 50a36b70..aaba92fe 100644 --- a/src/dolphin/workflows/config/_yaml_model.py +++ b/src/dolphin/workflows/config/_yaml_model.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import json import sys import textwrap