-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/johntruckenbrodt/pyroSAR in…
…to feature/coherence_gamma
- Loading branch information
Showing
31 changed files
with
985 additions
and
463 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: conda build | ||
|
||
on: [ push ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgis/postgis:16-3.4 | ||
env: | ||
POSTGRES_PASSWORD: Password12! | ||
ports: | ||
- 5432:5432 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.10 | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
auto-update-conda: true | ||
python-version: '3.10' | ||
- name: install ESA SNAP | ||
run: | | ||
wget -nv https://download.esa.int/step/snap/10_0/installers/esa-snap_sentinel_linux-10.0.0.sh | ||
bash esa-snap_sentinel_linux-10.0.0.sh -q -dir $GITHUB_ACTION_PATH/esa-snap | ||
- name: Set paths and variables | ||
run: | | ||
echo "$CONDA/bin" >> $GITHUB_PATH | ||
echo "$GITHUB_ACTION_PATH/esa-snap/bin" >> $GITHUB_PATH | ||
echo "PROJ_DATA=$CONDA/share/proj" >> $GITHUB_ENV | ||
- name: Install dependencies | ||
run: | | ||
: # https://github.com/conda/conda/issues/13560#issuecomment-1992720842 | ||
conda install -y python=3.10 | ||
conda env update --file environment.yml --name base | ||
- name: Lint with flake8 | ||
run: | | ||
conda install flake8 | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Install package | ||
run: | | ||
pip install . | ||
- name: Test with pytest | ||
run: | | ||
conda install pytest coverage | ||
coverage run -m pytest | ||
env: | ||
PGUSER: postgres | ||
PGPASSWORD: Password12! | ||
- name: Publish to coveralls.io | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
github-token: ${{ github.token }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This workflow will upload a Python Package using Twine when a release is created | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [ published ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
deploy: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Build package | ||
run: python -m build | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,5 @@ Ancillary Functions | |
multilook_factors | ||
parse_datasetname | ||
seconds | ||
Lock | ||
LockCollection |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
############# | ||
Configuration | ||
############# | ||
|
||
pyroSAR stores configuration under `$HOME/.pyrosar`. | ||
It contains a file `config.ini` which stores installation paths of SNAP and GAMMA. | ||
The installations are first identified by running the respective `Examine*` class (e.g. :class:`~pyroSAR.examine.ExamineSnap`): | ||
|
||
.. code-block:: python | ||
from pyroSAR.examine import ExamineSnap | ||
config = ExamineSnap() | ||
SNAP configuration can also be modified with this class, either by the object properties `userpath` and `auxdatapath` or by the underlying :class:`~pyroSAR.examine.SnapProperties` object: | ||
|
||
.. code-block:: python | ||
config.userpath = '/path/to/snap/data' | ||
config.snap_properties['snap.userdir'] = '/path/to/snap/data' | ||
The values are directly written to either `snap.auxdata.properties` or `snap.properties` under `$HOME/.snap/etc`. | ||
The content of these files will override that in the files found under `etc` in the SNAP installation folder. | ||
Setting a parameter to `None` will comment out the value in the respective file. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2", "wheel"] | |
[project] | ||
name = "pyroSAR" | ||
description = "a framework for large-scale SAR satellite data processing" | ||
requires-python = ">=3.6" | ||
requires-python = ">=3.8,<3.11" | ||
license = { file = "LICENSE.txt" } | ||
maintainers = [ | ||
{ name = "John Truckenbrodt", email = "[email protected]" } | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,10 @@ | ||
from .drivers import * | ||
import sys | ||
from . import ancillary, drivers | ||
|
||
if sys.version_info >= (3, 8): | ||
from importlib.metadata import version, PackageNotFoundError | ||
try: | ||
__version__ = version(__name__) | ||
except PackageNotFoundError: | ||
# package is not installed | ||
pass | ||
else: | ||
from pkg_resources import get_distribution, DistributionNotFound | ||
try: | ||
__version__ = get_distribution(__name__).version | ||
except DistributionNotFound: | ||
# package is not installed | ||
pass | ||
from importlib.metadata import version, PackageNotFoundError | ||
|
||
try: | ||
__version__ = version(__name__) | ||
except PackageNotFoundError: | ||
# package is not installed | ||
pass |
Oops, something went wrong.