From aec89ee8ac2317afcf3b2aeea3d614919e0284ed Mon Sep 17 00:00:00 2001 From: BuddyVolly Date: Wed, 22 Sep 2021 11:11:39 +0200 Subject: [PATCH 1/2] fixing ts-ls_mask when it is empty --- ost/generic/ts_ls_mask.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ost/generic/ts_ls_mask.py b/ost/generic/ts_ls_mask.py index fbc8ebb1..7f7ee001 100644 --- a/ost/generic/ts_ls_mask.py +++ b/ost/generic/ts_ls_mask.py @@ -52,8 +52,9 @@ def mt_layover(list_of_ls): df2 = gpd.read_file(file) df2 = df2[~(df2.geometry.is_empty | df2.geometry.isna())] - geom2 = df2.geometry.buffer(0).unary_union - geom = unary_union([geom, geom2]) + if not df2.empty: + geom2 = df2.geometry.buffer(0).unary_union + geom = unary_union([geom, geom2]) if y > 0: # make geometry valid in case it isn't From c7d86882ce885e18572c0e5d460117a651621eee Mon Sep 17 00:00:00 2001 From: BuddyVolly Date: Fri, 24 Sep 2021 12:30:42 +0200 Subject: [PATCH 2/2] preparing for first automatic release --- .github/workflows/release.yml | 24 ++++++++++++++++++++++++ setup.py | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..7801301b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,24 @@ +name: Upload Python Package + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* \ No newline at end of file diff --git a/setup.py b/setup.py index 1e48c0da..a1e7147d 100755 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ name='opensartoolkit', packages=find_packages(), include_package_data=True, - version='0.12.4', + version='0.12.5', description='High-level functionality for the inventory, download ' 'and pre-processing of Sentinel-1 data', install_requires=[