From cc761f3078009a73b10a52fc02d33550627a0ff2 Mon Sep 17 00:00:00 2001 From: Ou Ku Date: Mon, 6 Jan 2025 17:23:53 +0100 Subject: [PATCH 1/9] update the cloning description in readme to make it generic for private and public repo --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ed420ea..aecf02a 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,11 @@ This is the WIP repository for the Python version of DePSI *(), a Python package It is assumed that you have `mamba` installed. If not, you can find the installation instructions [here](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html). Other package managers like `conda` or `venv` can be used as well. -Clone this repository and `cd` into it: +Clone this repository + +Then`cd` into it: ```bash -git clone git@github.com:TUDelftGeodesy/DePSI.git cd DePSI ``` From 4783fffbd76c4af11fa7e9b8205be7b4cb6272d6 Mon Sep 17 00:00:00 2001 From: Ou Ku Date: Mon, 6 Jan 2025 17:28:29 +0100 Subject: [PATCH 2/9] update gh actions --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ddc2f6..3b372ee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ on: push: branches: [ "main" ] pull_request: - branches: [ "main" ] + branches: [ "main", "dev" ] jobs: build: From 271d14b5496e6c1bd9a5545d22125c53b70439fa Mon Sep 17 00:00:00 2001 From: Ou Ku Date: Mon, 6 Jan 2025 17:38:11 +0100 Subject: [PATCH 3/9] not trigger actions for draft prs --- .github/workflows/build.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b372ee..2280253 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,14 @@ on: push: branches: [ "main" ] pull_request: - branches: [ "main", "dev" ] + branches: + - "main" + - "dev" + types: + - opened + - synchronize + - reopened + - ready_for_review jobs: build: From cf69f378a2a31b2975f05603005a44a88849b40b Mon Sep 17 00:00:00 2001 From: Ou Ku Date: Thu, 9 Jan 2025 15:36:09 +0100 Subject: [PATCH 4/9] separate gh workflows for both pub and private repo --- .github/workflows/build.yml | 9 +------- .github/workflows/build_group.yml | 35 +++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/build_group.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2280253..7ddc2f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,14 +7,7 @@ on: push: branches: [ "main" ] pull_request: - branches: - - "main" - - "dev" - types: - - opened - - synchronize - - reopened - - ready_for_review + branches: [ "main" ] jobs: build: diff --git a/.github/workflows/build_group.yml b/.github/workflows/build_group.yml new file mode 100644 index 0000000..872aaf1 --- /dev/null +++ b/.github/workflows/build_group.yml @@ -0,0 +1,35 @@ +# Build and test for the private repository for TUDelft Radar group +# Only test on PR for dev branch, not triggered for draft PR + +name: Build and pytest + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + branches: [ "dev" ] + +jobs: + build: + + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ['ubuntu-latest'] + python-version: ["3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install build + python -m pip install ".[dev,docs,demo]" + - name: Build the package + run: python -m build + - name: Test with pytest + run: python -m pytest From 16616501c55895bbfbb7a5b1587fb83691a5323c Mon Sep 17 00:00:00 2001 From: Ou Ku Date: Thu, 9 Jan 2025 15:47:22 +0100 Subject: [PATCH 5/9] add ruff lint check workflow --- .github/workflows/ruff.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/ruff.yml diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml new file mode 100644 index 0000000..60df6ae --- /dev/null +++ b/.github/workflows/ruff.yml @@ -0,0 +1,15 @@ +# Lint and format check +# For dev branch on private repo, only test on PR, not triggered for draft PR + +name: Ruff +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main", "dev" ] +jobs: + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/ruff-action@v3 \ No newline at end of file From 2cb0786711713c769b94c3b48be937beb4710df8 Mon Sep 17 00:00:00 2001 From: Ou Ku Date: Thu, 9 Jan 2025 16:00:11 +0100 Subject: [PATCH 6/9] update dev guide --- docs/dev_guide.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/dev_guide.md b/docs/dev_guide.md index 786bfa4..c2fc6c8 100644 --- a/docs/dev_guide.md +++ b/docs/dev_guide.md @@ -6,10 +6,11 @@ The Python implementation of DePSI is under development. At present you can only It is assumed that you have `mamba` installed. If not, you can find the installation instructions [here](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html). Other package managers like `conda` or `venv` can be used as well. -Clone this repository and `cd` into it: +Before you start, make sure you have access to the correct DePSI repository. You can contribute to the pubilic DePSI repository by forking it to your own GitHub account. If you are a member of the TUDelftGeodesy organization, you can also contribute to the group DePSI repository. + +Clone this GitHub repository, then `cd` into the cloned repository. ```bash -git clone git@github.com:TUDelftGeodesy/DePSI.git cd DePSI ``` From e3d0630374212bab908ee4b64dd3fbfc869482c1 Mon Sep 17 00:00:00 2001 From: Ou Ku Date: Thu, 9 Jan 2025 16:02:51 +0100 Subject: [PATCH 7/9] Apply suggestions from code review --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index d31110d..d22b2f1 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,10 @@ DePSI (van Leijen, 2014) is an open source software for processing Persistent Scatterer Interferometry (PS-InSAR) data, originally implemented in MATLAB. From 2024, TUDelft and Netherlands eScience Center are collaborating to develop a Python version of DePSI, with recent advances in PS-InSAR. - ## Developer Guide Please refer to the [Developer Guide](docs/dev_guide.md) for installation instructions, testing, and other development-related information. - ## Useful reading material - [Python packaging user guide](https://packaging.python.org/) From 63378fa90802b00599603903a16bdff44598e66e Mon Sep 17 00:00:00 2001 From: Ou Ku Date: Thu, 9 Jan 2025 16:19:30 +0100 Subject: [PATCH 8/9] update workflow versions --- .github/workflows/build.yml | 4 ++-- .github/workflows/build_group.yml | 4 ++-- .github/workflows/doc_deploy.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ddc2f6..e5ea0b7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,9 +20,9 @@ jobs: python-version: ["3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/build_group.yml b/.github/workflows/build_group.yml index 872aaf1..3c3863e 100644 --- a/.github/workflows/build_group.yml +++ b/.github/workflows/build_group.yml @@ -19,9 +19,9 @@ jobs: python-version: ["3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/doc_deploy.yml b/.github/workflows/doc_deploy.yml index 9fb0b02..35dfd48 100644 --- a/.github/workflows/doc_deploy.yml +++ b/.github/workflows/doc_deploy.yml @@ -14,11 +14,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout main - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python 3.12 - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: "3.12" - name: Install dependencies From 1a1b923c1361ecc277d66b97f8d58464acaad5d2 Mon Sep 17 00:00:00 2001 From: Ou Ku Date: Fri, 10 Jan 2025 13:04:01 +0100 Subject: [PATCH 9/9] Apply suggestions from code review Co-authored-by: Francesco Nattino <49899980+fnattino@users.noreply.github.com> --- .github/workflows/build_group.yml | 2 +- .github/workflows/ruff.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_group.yml b/.github/workflows/build_group.yml index 3c3863e..19c29a9 100644 --- a/.github/workflows/build_group.yml +++ b/.github/workflows/build_group.yml @@ -28,7 +28,7 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install build - python -m pip install ".[dev,docs,demo]" + python -m pip install ".[dev,docs]" - name: Build the package run: python -m build - name: Test with pytest diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml index 60df6ae..c1d453e 100644 --- a/.github/workflows/ruff.yml +++ b/.github/workflows/ruff.yml @@ -12,4 +12,4 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: astral-sh/ruff-action@v3 \ No newline at end of file + - uses: astral-sh/ruff-action@v3