From 12d02046384662b180b08af123dee2c3773e85a2 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Thu, 9 Nov 2023 16:02:24 +0100 Subject: [PATCH 01/63] trigger doc builder --- .github/workflows/test_doc_build.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/test_doc_build.yml diff --git a/.github/workflows/test_doc_build.yml b/.github/workflows/test_doc_build.yml new file mode 100644 index 00000000..b10c40e4 --- /dev/null +++ b/.github/workflows/test_doc_build.yml @@ -0,0 +1,28 @@ +name: Build and deploy documentation (testing) +on: + push +permissions: + contents: write +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - name: Install dependencies + run: | + pip install poetry + - name: poetry create doc environment + run: | + poetry update + poetry install --with documentation,dev,titan + - name: Sphinx build + run: | + sphinx-build -a -E docs _build + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + publish_branch: gh-pages + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: _build/ + force_orphan: true \ No newline at end of file From a5cc1b333f70dc3e233744fac2821bfb61444b0b Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Thu, 9 Nov 2023 16:10:06 +0100 Subject: [PATCH 02/63] restrict poetry version --- .github/workflows/test_doc_build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_doc_build.yml b/.github/workflows/test_doc_build.yml index b10c40e4..8e9194ed 100644 --- a/.github/workflows/test_doc_build.yml +++ b/.github/workflows/test_doc_build.yml @@ -11,13 +11,16 @@ jobs: - uses: actions/setup-python@v3 - name: Install dependencies run: | - pip install poetry + pip install poetry==1.3.2 - name: poetry create doc environment run: | + poetry --version poetry update + poetry --version poetry install --with documentation,dev,titan - name: Sphinx build run: | + poetry --version sphinx-build -a -E docs _build - name: Deploy uses: peaceiris/actions-gh-pages@v3 From 44a9cd5b7dad8438e439789b865701c6efe93061 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Thu, 9 Nov 2023 16:15:56 +0100 Subject: [PATCH 03/63] try without explicit version control on numpy --- .github/workflows/test_doc_build.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_doc_build.yml b/.github/workflows/test_doc_build.yml index 8e9194ed..7ed8ef42 100644 --- a/.github/workflows/test_doc_build.yml +++ b/.github/workflows/test_doc_build.yml @@ -17,7 +17,7 @@ jobs: poetry --version poetry update poetry --version - poetry install --with documentation,dev,titan + poetry install --with documentation,dev - name: Sphinx build run: | poetry --version diff --git a/pyproject.toml b/pyproject.toml index 0bb6de57..90a7998e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ keywords = ["meteorology", "observations", "urban climate"] [tool.poetry.dependencies] python = "^3.9" #can be converted to 3.8 but furher investigation needed pandas = "^1.3.0" -numpy = "^1.17.3" +#numpy = "^1.17.3" matplotlib = "^3.0.0" #mysql-connector-python = "^8.0.6" geopandas = "^0.9.0" From e9e7686b629ad4ebce8f4d7f92321435f374eac7 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Thu, 9 Nov 2023 16:22:34 +0100 Subject: [PATCH 04/63] force numpy to 1.26.0 (as on my local env) --- .github/workflows/test_doc_build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_doc_build.yml b/.github/workflows/test_doc_build.yml index 7ed8ef42..4f677d33 100644 --- a/.github/workflows/test_doc_build.yml +++ b/.github/workflows/test_doc_build.yml @@ -12,6 +12,7 @@ jobs: - name: Install dependencies run: | pip install poetry==1.3.2 + pip install numpy==1.26.0 - name: poetry create doc environment run: | poetry --version From 8bf599c05078f3c447cedd71268f32c274905065 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Thu, 9 Nov 2023 16:33:32 +0100 Subject: [PATCH 05/63] try without dev group --- .github/workflows/test_doc_build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test_doc_build.yml b/.github/workflows/test_doc_build.yml index 4f677d33..909478c1 100644 --- a/.github/workflows/test_doc_build.yml +++ b/.github/workflows/test_doc_build.yml @@ -12,13 +12,12 @@ jobs: - name: Install dependencies run: | pip install poetry==1.3.2 - pip install numpy==1.26.0 - name: poetry create doc environment run: | poetry --version poetry update poetry --version - poetry install --with documentation,dev + poetry install --with documentation - name: Sphinx build run: | poetry --version From 394e29b6a8b12692f583bf46de4290d1866073d9 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Thu, 9 Nov 2023 16:37:01 +0100 Subject: [PATCH 06/63] with --only arg --- .github/workflows/test_doc_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_doc_build.yml b/.github/workflows/test_doc_build.yml index 909478c1..8a4de5dc 100644 --- a/.github/workflows/test_doc_build.yml +++ b/.github/workflows/test_doc_build.yml @@ -17,7 +17,7 @@ jobs: poetry --version poetry update poetry --version - poetry install --with documentation + poetry install --only documentation - name: Sphinx build run: | poetry --version From 50aea352c01a16d2c1309a593917f9e56cd3e8e5 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Thu, 9 Nov 2023 16:40:53 +0100 Subject: [PATCH 07/63] without the update --- .github/workflows/test_doc_build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test_doc_build.yml b/.github/workflows/test_doc_build.yml index 8a4de5dc..11abcbb8 100644 --- a/.github/workflows/test_doc_build.yml +++ b/.github/workflows/test_doc_build.yml @@ -14,10 +14,9 @@ jobs: pip install poetry==1.3.2 - name: poetry create doc environment run: | - poetry --version - poetry update poetry --version poetry install --only documentation + poetry show - name: Sphinx build run: | poetry --version From 1a3f0bbeb3fdba0ad8e3d84e6d91fa73f69c30f7 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Thu, 9 Nov 2023 16:46:18 +0100 Subject: [PATCH 08/63] explicit add poetry run for sphinx build --- .github/workflows/test_doc_build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_doc_build.yml b/.github/workflows/test_doc_build.yml index 11abcbb8..40aafcc0 100644 --- a/.github/workflows/test_doc_build.yml +++ b/.github/workflows/test_doc_build.yml @@ -20,7 +20,8 @@ jobs: - name: Sphinx build run: | poetry --version - sphinx-build -a -E docs _build + poetry run sphinx-build --version + poetry run sphinx-build -a -E docs _build - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: From 683af6933df5c27ed8240b39d5631f4889a7f616 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Thu, 9 Nov 2023 16:48:57 +0100 Subject: [PATCH 09/63] poetry with default deps --- .github/workflows/test_doc_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_doc_build.yml b/.github/workflows/test_doc_build.yml index 40aafcc0..e4d481de 100644 --- a/.github/workflows/test_doc_build.yml +++ b/.github/workflows/test_doc_build.yml @@ -15,7 +15,7 @@ jobs: - name: poetry create doc environment run: | poetry --version - poetry install --only documentation + poetry install --with documentation poetry show - name: Sphinx build run: | From e63c2275229dc096d800eb0208b5717b4b324b5e Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Thu, 9 Nov 2023 18:05:48 +0100 Subject: [PATCH 10/63] new test with recent poetry version --- .github/workflows/test_doc_build.yml | 4 ++-- pyproject.toml | 13 +++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_doc_build.yml b/.github/workflows/test_doc_build.yml index e4d481de..0038bee0 100644 --- a/.github/workflows/test_doc_build.yml +++ b/.github/workflows/test_doc_build.yml @@ -11,10 +11,10 @@ jobs: - uses: actions/setup-python@v3 - name: Install dependencies run: | - pip install poetry==1.3.2 + pip install poetry==1.7.0 - name: poetry create doc environment run: | - poetry --version + poetry update poetry install --with documentation poetry show - name: Sphinx build diff --git a/pyproject.toml b/pyproject.toml index 90a7998e..ba4d3556 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,17 +11,22 @@ packages = [{include = "metobs_toolkit"}] keywords = ["meteorology", "observations", "urban climate"] [tool.poetry.dependencies] -python = "^3.9" #can be converted to 3.8 but furher investigation needed +python = "^3.9" pandas = "^1.3.0" -#numpy = "^1.17.3" +numpy = "^1.17.3" matplotlib = "^3.0.0" -#mysql-connector-python = "^8.0.6" geopandas = "^0.9.0" pyproj = "~3.4" mapclassify = "^2.4.0" earthengine-api = "^0.1.340" geemap = '^0.20.0' +[tool.poetry.group.setup.dependencies] +#setuptools = '^68.2' +future = '0.18.1' + + + [tool.poetry.group.titan.dependencies] #titanlib requires C-compilers, which are not by default present on windows. #Make a seperate group for titan @@ -40,7 +45,7 @@ myst_parser = '^2.0.0' [tool.poetry.group.dev.dependencies] #To run poetry tests -poetry = "^1.3.2" +poetry = "^1.7" [build-system] requires = ["poetry-core"] From 6740ba89365f51c02a88432b78e7796596cef925 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Thu, 9 Nov 2023 18:10:45 +0100 Subject: [PATCH 11/63] without np explicit --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ba4d3556..091a0ce7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ keywords = ["meteorology", "observations", "urban climate"] [tool.poetry.dependencies] python = "^3.9" pandas = "^1.3.0" -numpy = "^1.17.3" +#numpy = "^1.17.3" matplotlib = "^3.0.0" geopandas = "^0.9.0" pyproj = "~3.4" From 49beb0e1adc40a13c0593ab8a7a872d777592306 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 09:35:03 +0100 Subject: [PATCH 12/63] set back to requirements --- .github/workflows/test_doc_build.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test_doc_build.yml b/.github/workflows/test_doc_build.yml index 0038bee0..f6d595d0 100644 --- a/.github/workflows/test_doc_build.yml +++ b/.github/workflows/test_doc_build.yml @@ -1,4 +1,4 @@ -name: Build and deploy documentation (testing) +name: Build and deploy documentation (test) on: push permissions: @@ -11,17 +11,18 @@ jobs: - uses: actions/setup-python@v3 - name: Install dependencies run: | - pip install poetry==1.7.0 - - name: poetry create doc environment + pip install sphinx==6.2.1 sphinx_rtd_theme sphinx-copybutton myst_parser nbsphinx + pip install poetry + - name: poetry create requirements run: | poetry update - poetry install --with documentation - poetry show + poetry export -f requirements.txt --output requirements.txt + - name: install package using pip + run: | + pip install -r requirements.txt - name: Sphinx build run: | - poetry --version - poetry run sphinx-build --version - poetry run sphinx-build -a -E docs _build + sphinx-build -a -E docs _build - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: From f4b511d2d5b6e70d27bf951b362cde2b17fd27c9 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 09:39:44 +0100 Subject: [PATCH 13/63] pfff again utils error ... is this a poetry bug? --- .github/workflows/test_doc_build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_doc_build.yml b/.github/workflows/test_doc_build.yml index f6d595d0..a622bb3b 100644 --- a/.github/workflows/test_doc_build.yml +++ b/.github/workflows/test_doc_build.yml @@ -11,10 +11,11 @@ jobs: - uses: actions/setup-python@v3 - name: Install dependencies run: | - pip install sphinx==6.2.1 sphinx_rtd_theme sphinx-copybutton myst_parser nbsphinx + pip install sphinx==6.2.1 sphinx_rtd_theme sphinx-copybutton myst_parser nbsphinx setuptools pip install poetry - - name: poetry create requirements + - name: poetry create requirements file run: | + poetry --version poetry update poetry export -f requirements.txt --output requirements.txt - name: install package using pip From 0e3f4586899323c29cfb7c7660cb9fd100dc68f9 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 09:44:32 +0100 Subject: [PATCH 14/63] add python3 -m explicit before pip --- .github/workflows/test_doc_build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_doc_build.yml b/.github/workflows/test_doc_build.yml index a622bb3b..a615461f 100644 --- a/.github/workflows/test_doc_build.yml +++ b/.github/workflows/test_doc_build.yml @@ -11,8 +11,8 @@ jobs: - uses: actions/setup-python@v3 - name: Install dependencies run: | - pip install sphinx==6.2.1 sphinx_rtd_theme sphinx-copybutton myst_parser nbsphinx setuptools - pip install poetry + python3 -m pip install sphinx==6.2.1 sphinx_rtd_theme sphinx-copybutton myst_parser nbsphinx setuptools + python3 -m pip install poetry - name: poetry create requirements file run: | poetry --version @@ -20,7 +20,7 @@ jobs: poetry export -f requirements.txt --output requirements.txt - name: install package using pip run: | - pip install -r requirements.txt + python3 -m pip install -r requirements.txt - name: Sphinx build run: | sphinx-build -a -E docs _build From d043e15721be0253fe7b6fffa79dd72349668728 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 09:50:08 +0100 Subject: [PATCH 15/63] test doc building in the python matrix of the master test script --- .github/workflows/master_test.yml | 4 ++++ .github/workflows/test_doc_build.yml | 1 + 2 files changed, 5 insertions(+) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index e44d5277..03161bce 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -34,6 +34,10 @@ jobs: poetry update poetry install --all-extras poetry build + - name: Build documentation + run: | + poetry show + poetry run sphinx-build -a -E docs _build - name: Run tests run: | cd tests diff --git a/.github/workflows/test_doc_build.yml b/.github/workflows/test_doc_build.yml index a615461f..0ccade58 100644 --- a/.github/workflows/test_doc_build.yml +++ b/.github/workflows/test_doc_build.yml @@ -11,6 +11,7 @@ jobs: - uses: actions/setup-python@v3 - name: Install dependencies run: | + python3 --version python3 -m pip install sphinx==6.2.1 sphinx_rtd_theme sphinx-copybutton myst_parser nbsphinx setuptools python3 -m pip install poetry - name: poetry create requirements file From 9ba0e51871435d5c4b9616e4c6e709273b543671 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 09:55:05 +0100 Subject: [PATCH 16/63] add pandoc to doc dep group --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 091a0ce7..ea58768f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,6 +41,7 @@ nbsphinx = '^0.9' sphinx-copybutton = '^0.5.1' sphinx-rtd-theme = '^1.3.0' myst_parser = '^2.0.0' +pandoc = '^3.1' [tool.poetry.group.dev.dependencies] From 09f94b67a4f7a6de7db4264a25efbc66e82dad20 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 09:57:00 +0100 Subject: [PATCH 17/63] pandoc version update --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ea58768f..651b3732 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ nbsphinx = '^0.9' sphinx-copybutton = '^0.5.1' sphinx-rtd-theme = '^1.3.0' myst_parser = '^2.0.0' -pandoc = '^3.1' +pandoc = '^3.1.3' [tool.poetry.group.dev.dependencies] From b616e2a171ad8ab694a011baf12fd368d41082c5 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 10:02:26 +0100 Subject: [PATCH 18/63] try with pandoc docker --- .github/workflows/master_test.yml | 4 -- .github/workflows/test_doc_build.yml | 63 +++++++++++++++------------- 2 files changed, 35 insertions(+), 32 deletions(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index 03161bce..e44d5277 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -34,10 +34,6 @@ jobs: poetry update poetry install --all-extras poetry build - - name: Build documentation - run: | - poetry show - poetry run sphinx-build -a -E docs _build - name: Run tests run: | cd tests diff --git a/.github/workflows/test_doc_build.yml b/.github/workflows/test_doc_build.yml index 0ccade58..d517097c 100644 --- a/.github/workflows/test_doc_build.yml +++ b/.github/workflows/test_doc_build.yml @@ -1,34 +1,41 @@ -name: Build and deploy documentation (test) -on: - push -permissions: - contents: write +name: test Build documentation + +on: [push] + jobs: - docs: - runs-on: ubuntu-latest + build: + + runs-on: ${{ matrix.os }} + strategy: + # You can use PyPy versions in python-version. + # For example, pypy-2.7 and pypy-3.8 + matrix: + python-version: ["3.9"] + # os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest] + node-version: [12.x] + steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 - - name: Install dependencies - run: | - python3 --version - python3 -m pip install sphinx==6.2.1 sphinx_rtd_theme sphinx-copybutton myst_parser nbsphinx setuptools - python3 -m pip install poetry - - name: poetry create requirements file + - uses: docker://pandoc/core:2.9 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + #cache: 'poetry' + # You can test your matrix by printing the current Python version + - name: Display Python version + run: python -c "import sys; print(sys.version)" + - name: Install poetry run: | - poetry --version - poetry update - poetry export -f requirements.txt --output requirements.txt - - name: install package using pip + pip install poetry + + - name: Install dependencies and build run: | - python3 -m pip install -r requirements.txt - - name: Sphinx build + poetry update + poetry install --all-extras + poetry build + - name: Build documentation run: | - sphinx-build -a -E docs _build - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - publish_branch: gh-pages - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: _build/ - force_orphan: true \ No newline at end of file + poetry show + poetry run sphinx-build -a -E docs _build \ No newline at end of file From 825617c91437dca4c93a3655f823cd5dd13bea47 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 10:06:35 +0100 Subject: [PATCH 19/63] update pandoc version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 651b3732..f30960bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ nbsphinx = '^0.9' sphinx-copybutton = '^0.5.1' sphinx-rtd-theme = '^1.3.0' myst_parser = '^2.0.0' -pandoc = '^3.1.3' +pandoc = '^2' [tool.poetry.group.dev.dependencies] From 4e4c356fd87e6064c270eea64d51f19e49d7e917 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 11:08:24 +0100 Subject: [PATCH 20/63] install pandoc system wide test1 --- .github/workflows/test_doc_build.yml | 6 ++++-- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_doc_build.yml b/.github/workflows/test_doc_build.yml index d517097c..e6bf3564 100644 --- a/.github/workflows/test_doc_build.yml +++ b/.github/workflows/test_doc_build.yml @@ -26,10 +26,12 @@ jobs: # You can test your matrix by printing the current Python version - name: Display Python version run: python -c "import sys; print(sys.version)" + - name: install pandoc (system wide) + run: | + sudo apt-get -y install pandoc - name: Install poetry run: | pip install poetry - - name: Install dependencies and build run: | poetry update @@ -38,4 +40,4 @@ jobs: - name: Build documentation run: | poetry show - poetry run sphinx-build -a -E docs _build \ No newline at end of file + poetry run sphinx-build -a -E docs _build diff --git a/pyproject.toml b/pyproject.toml index f30960bb..ab5fa5f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ nbsphinx = '^0.9' sphinx-copybutton = '^0.5.1' sphinx-rtd-theme = '^1.3.0' myst_parser = '^2.0.0' -pandoc = '^2' +pandoc = '^2' #Check version on PyPi (not in local conda env) [tool.poetry.group.dev.dependencies] From 9bed71d4452c4a34f2a23ffa08a579befdd0f970 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 11:09:32 +0100 Subject: [PATCH 21/63] remove docker --- .github/workflows/test_doc_build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test_doc_build.yml b/.github/workflows/test_doc_build.yml index e6bf3564..29540e92 100644 --- a/.github/workflows/test_doc_build.yml +++ b/.github/workflows/test_doc_build.yml @@ -17,7 +17,6 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: docker://pandoc/core:2.9 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: From 2874234f37434998e8bcb922adcf5436a9914a86 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 11:14:46 +0100 Subject: [PATCH 22/63] test deploying --- .github/workflows/test_doc_build.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/test_doc_build.yml b/.github/workflows/test_doc_build.yml index 29540e92..b6668d6c 100644 --- a/.github/workflows/test_doc_build.yml +++ b/.github/workflows/test_doc_build.yml @@ -40,3 +40,12 @@ jobs: run: | poetry show poetry run sphinx-build -a -E docs _build + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + publish_branch: gh-pages + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: _build/ + force_orphan: true + From 64435dd62bf8b8ae90c3ababd53f7d1ed8dc90c0 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 11:46:39 +0100 Subject: [PATCH 23/63] updated the workflows --- .github/workflows/build_and_deploy_doc.yml | 45 ++++++++++++---- .../workflows/build_and_deploy_doc_dev.yml | 43 +++++++++++---- .github/workflows/master_test.yml | 53 +++++++++++++++++-- .github/workflows/test_doc_build.yml | 51 ------------------ poetry.lock | 32 ++++++++--- 5 files changed, 143 insertions(+), 81 deletions(-) delete mode 100644 .github/workflows/test_doc_build.yml diff --git a/.github/workflows/build_and_deploy_doc.yml b/.github/workflows/build_and_deploy_doc.yml index d2595ebe..891b5e4a 100644 --- a/.github/workflows/build_and_deploy_doc.yml +++ b/.github/workflows/build_and_deploy_doc.yml @@ -6,22 +6,45 @@ on: permissions: contents: write jobs: - docs: - runs-on: ubuntu-latest + build: + + runs-on: ${{ matrix.os }} + strategy: + # You can use PyPy versions in python-version. + # For example, pypy-2.7 and pypy-3.8 + matrix: + python-version: ["3.9"] + # os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest] + node-version: [12.x] + steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 - - name: Install dependencies + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + #cache: 'poetry' + # You can test your matrix by printing the current Python version + - name: Display Python version + run: python -c "import sys; print(sys.version)" + - name: install pandoc (system wide) + run: | + sudo apt-get -y install pandoc + - name: Install poetry run: | - pip install poetry - - name: poetry create doc environment + pip install poetry + - name: Install dependencies and build run: | - poetry update - poetry install --with documentation,dev,titan - - name: Sphinx build + poetry update + poetry install --all-extras + poetry build + - name: Build documentation run: | - sphinx-build -a -E docs _build - - name: Deploy + poetry show + poetry run sphinx-build -a -E docs _build + + - name: Deploy documentation online uses: peaceiris/actions-gh-pages@v3 with: publish_branch: gh-pages diff --git a/.github/workflows/build_and_deploy_doc_dev.yml b/.github/workflows/build_and_deploy_doc_dev.yml index efcc8f55..7fd842c1 100644 --- a/.github/workflows/build_and_deploy_doc_dev.yml +++ b/.github/workflows/build_and_deploy_doc_dev.yml @@ -6,21 +6,44 @@ on: permissions: contents: write jobs: - docs: - runs-on: ubuntu-latest + build: + + runs-on: ${{ matrix.os }} + strategy: + # You can use PyPy versions in python-version. + # For example, pypy-2.7 and pypy-3.8 + matrix: + python-version: ["3.9"] + # os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest] + node-version: [12.x] + steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 - - name: Install dependencies + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + #cache: 'poetry' + # You can test your matrix by printing the current Python version + - name: Display Python version + run: python -c "import sys; print(sys.version)" + - name: install pandoc (system wide) + run: | + sudo apt-get -y install pandoc + - name: Install poetry run: | - pip install poetry - - name: poetry create doc environment + pip install poetry + - name: Install dependencies and build run: | - poetry update - poetry install --with documentation,dev,titan - - name: Sphinx build + poetry update + poetry install --all-extras + poetry build + - name: Build documentation run: | - sphinx-build -a -E docs _build + poetry show + poetry run sphinx-build -a -E docs _build + - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index e44d5277..677484f8 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -1,10 +1,10 @@ name: Test pushed version -on: [push] +on: [push, pull_request] jobs: - build: - + run-tests: + name: run test scripts runs-on: ${{ matrix.os }} strategy: # You can use PyPy versions in python-version. @@ -45,4 +45,51 @@ jobs: #poetry run python gui_launch_test.py poetry run python analysis_test.py + versiontest: + name: check if version is valid + needs: run-tests + runs-on: ubuntu-latest + steps: + - name: Current Version + run: | + CURRENT_VERSION="$(grep -E '__version__' metobs_toolkit/__init__.py | cut -d ' ' -f3)" + echo "current_version=${CURRENT_VERSION}" + + doctests: + name: documentation-test + needs: run-tests + runs-on: ${{ matrix.os }} + strategy: + # You can use PyPy versions in python-version. + # For example, pypy-2.7 and pypy-3.8 + matrix: + python-version: ["3.9"] + # os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest] + node-version: [12.x] + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + #cache: 'poetry' + # You can test your matrix by printing the current Python version + - name: Display Python version + run: python -c "import sys; print(sys.version)" + - name: install pandoc (system wide) + run: | + sudo apt-get -y install pandoc + - name: Install poetry + run: | + pip install poetry + - name: Install dependencies and build + run: | + poetry update + poetry install --all-extras + poetry build + - name: Build documentation + run: | + poetry show + poetry run sphinx-build -a -E docs _build \ No newline at end of file diff --git a/.github/workflows/test_doc_build.yml b/.github/workflows/test_doc_build.yml deleted file mode 100644 index b6668d6c..00000000 --- a/.github/workflows/test_doc_build.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: test Build documentation - -on: [push] - -jobs: - build: - - runs-on: ${{ matrix.os }} - strategy: - # You can use PyPy versions in python-version. - # For example, pypy-2.7 and pypy-3.8 - matrix: - python-version: ["3.9"] - # os: [ubuntu-latest, windows-latest] - os: [ubuntu-latest] - node-version: [12.x] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - #cache: 'poetry' - # You can test your matrix by printing the current Python version - - name: Display Python version - run: python -c "import sys; print(sys.version)" - - name: install pandoc (system wide) - run: | - sudo apt-get -y install pandoc - - name: Install poetry - run: | - pip install poetry - - name: Install dependencies and build - run: | - poetry update - poetry install --all-extras - poetry build - - name: Build documentation - run: | - poetry show - poetry run sphinx-build -a -E docs _build - - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - publish_branch: gh-pages - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: _build/ - force_orphan: true - diff --git a/poetry.lock b/poetry.lock index 8870c028..a6c06401 100644 --- a/poetry.lock +++ b/poetry.lock @@ -959,12 +959,12 @@ woff = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "zopfli (>=0.1.4)"] [[package]] name = "future" -version = "0.18.3" +version = "0.18.1" description = "Clean single-source support for Python 3 and 2" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" files = [ - {file = "future-0.18.3.tar.gz", hash = "sha256:34a17436ed1e96697a86f9de3d15a3b0be01d8bc8de9c1dffd59fb8234ed5307"}, + {file = "future-0.18.1.tar.gz", hash = "sha256:858e38522e8fd0d3ce8f0c1feaf0603358e366d5403209674c7b617fa0c24093"}, ] [[package]] @@ -1873,6 +1873,16 @@ files = [ {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:f698de3fd0c4e6972b92290a45bd9b1536bffe8c6759c62471efaa8acb4c37bc"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aa57bd9cf8ae831a362185ee444e15a93ecb2e344c8e52e4d721ea3ab6ef1823"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffcc3f7c66b5f5b7931a5aa68fc9cecc51e685ef90282f4a82f0f5e9b704ad11"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47d4f1c5f80fc62fdd7777d0d40a2e9dda0a05883ab11374334f6c4de38adffd"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f67c7038d560d92149c060157d623c542173016c4babc0c1913cca0564b9939"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:9aad3c1755095ce347e26488214ef77e0485a3c34a50c5a5e2471dff60b9dd9c"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:14ff806850827afd6b07a5f32bd917fb7f45b046ba40c57abdb636674a8b559c"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8f9293864fe09b8149f0cc42ce56e3f0e54de883a9de90cd427f191c346eb2e1"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-win32.whl", hash = "sha256:715d3562f79d540f251b99ebd6d8baa547118974341db04f5ad06d5ea3eb8007"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-win_amd64.whl", hash = "sha256:1b8dd8c3fd14349433c79fa8abeb573a55fc0fdd769133baac1f5e07abf54aeb"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, @@ -2833,6 +2843,7 @@ files = [ {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, + {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, @@ -2840,8 +2851,15 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, + {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, + {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, + {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, + {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, @@ -2858,6 +2876,7 @@ files = [ {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, + {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, @@ -2865,6 +2884,7 @@ files = [ {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, + {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, @@ -3845,13 +3865,13 @@ test = ["numpy", "pandas", "pytest", "xarray"] [[package]] name = "trove-classifiers" -version = "2023.11.7" +version = "2023.11.9" description = "Canonical source for classifiers on PyPI (pypi.org)." optional = false python-versions = "*" files = [ - {file = "trove-classifiers-2023.11.7.tar.gz", hash = "sha256:ef85282f6ec9c028b5349ae9bab4f384f770bb4883a15694318e1b1a5cedf5fe"}, - {file = "trove_classifiers-2023.11.7-py3-none-any.whl", hash = "sha256:75d0158222dc76e2f3faa55846b77d8bd8a6683b84c65c9f1fdb3588f914fbd9"}, + {file = "trove-classifiers-2023.11.9.tar.gz", hash = "sha256:0542bc03d151f8af84f0eb0e74aa931b374b6f9c8ed8fbf7ee41989fb9d40f1d"}, + {file = "trove_classifiers-2023.11.9-py3-none-any.whl", hash = "sha256:f9784ab55054bb327d0c8d33931fb2555b81e5b4868832490ab7959ae3ea9186"}, ] [[package]] @@ -4059,4 +4079,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "03c6d4efcdad9b080c14f75ac22c49caf6c5290c3bf36906d393a30cdd6217bd" +content-hash = "6e34fbd34b714182f6329d8ca6bd174d1ac1a4bfdba3d804f6e1eddc55f19b72" From 718fbec75aea4fd6fbe38ac7e3225bca32ec0195 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 12:12:46 +0100 Subject: [PATCH 24/63] test the version check --- .github/workflows/master_test.yml | 95 +++++++++++++++++-------------- pyproject.toml | 2 +- 2 files changed, 52 insertions(+), 45 deletions(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index 677484f8..dff138a4 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -1,64 +1,71 @@ name: Test pushed version -on: [push, pull_request] +on: [push] jobs: - run-tests: - name: run test scripts - runs-on: ${{ matrix.os }} - strategy: - # You can use PyPy versions in python-version. - # For example, pypy-2.7 and pypy-3.8 - matrix: - python-version: ["3.9", "3.10"] - # os: [ubuntu-latest, windows-latest] - os: [ubuntu-latest] - node-version: [12.x] + # run-tests: + # name: run test scripts + # runs-on: ${{ matrix.os }} + # strategy: + # # You can use PyPy versions in python-version. + # # For example, pypy-2.7 and pypy-3.8 + # matrix: + # python-version: ["3.9", "3.10"] + # # os: [ubuntu-latest, windows-latest] + # os: [ubuntu-latest] + # node-version: [12.x] - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - #cache: 'poetry' - # You can test your matrix by printing the current Python version - - name: Display Python version - run: python -c "import sys; print(sys.version)" - - name: Install poetry - run: | - pip install poetry + # steps: + # - uses: actions/checkout@v3 + # - name: Set up Python ${{ matrix.python-version }} + # uses: actions/setup-python@v4 + # with: + # python-version: ${{ matrix.python-version }} + # #cache: 'poetry' + # # You can test your matrix by printing the current Python version + # - name: Display Python version + # run: python -c "import sys; print(sys.version)" + # - name: Install poetry + # run: | + # pip install poetry - - name: Install dependencies and build - run: | - poetry update - poetry install --all-extras - poetry build - - name: Run tests - run: | - cd tests - cd push_test - poetry run python gap_and_fill_test.py - poetry run python IO_test.py - poetry run python qc_test.py - poetry run python breaking_test.py - #poetry run python gui_launch_test.py - poetry run python analysis_test.py + # - name: Install dependencies and build + # run: | + # poetry update + # poetry install --all-extras + # poetry build + # - name: Run tests + # run: | + # poetry run python tests/push_test/gap_and_fill_test.py + # poetry run python tests/push_test/IO_test.py + # poetry run python tests/push_test/qc_test.py + # poetry run python tests/push_test/breaking_test.py + # #poetry run python tests/push_test/gui_launch_test.py + # poetry run python tests/push_test/analysis_test.py versiontest: name: check if version is valid - needs: run-tests + #needs: run-tests runs-on: ubuntu-latest steps: - - name: Current Version + - name: get version run: | CURRENT_VERSION="$(grep -E '__version__' metobs_toolkit/__init__.py | cut -d ' ' -f3)" - echo "current_version=${CURRENT_VERSION}" + echo "current version (init) = ${CURRENT_VERSION}" + PYPROJECT_VERSION="$(grep -E 'version' pyproject.toml | cut -d ' ' -f3)" + echo "current version (pyproject) = ${PYPROJECT_VERSION}" + [${CURRENT_VERSION}] == [${PYPROJECT_VERSION}] + - name: check sync + if: ${{ CURRENT_VERSION }} != ${{ PYPROJECT_VERSION }} + uses: actions/github-script@v3 + with: + script: | + core.setFailed('versions in init and pyproject are not equivalent!') doctests: name: documentation-test - needs: run-tests + #needs: run-tests runs-on: ${{ matrix.os }} strategy: # You can use PyPy versions in python-version. diff --git a/pyproject.toml b/pyproject.toml index ab5fa5f8..98d780dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ nbsphinx = '^0.9' sphinx-copybutton = '^0.5.1' sphinx-rtd-theme = '^1.3.0' myst_parser = '^2.0.0' -pandoc = '^2' #Check version on PyPi (not in local conda env) +pandoc = '^2' #Check on PyPi (not in local conda env) [tool.poetry.group.dev.dependencies] From 1dd2ebbcce000486aa141f80236433cf8df1df07 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 12:20:29 +0100 Subject: [PATCH 25/63] test2 --- .github/workflows/master_test.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index dff138a4..f95fbf67 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -57,10 +57,7 @@ jobs: [${CURRENT_VERSION}] == [${PYPROJECT_VERSION}] - name: check sync if: ${{ CURRENT_VERSION }} != ${{ PYPROJECT_VERSION }} - uses: actions/github-script@v3 - with: - script: | - core.setFailed('versions in init and pyproject are not equivalent!') + run: exit 1 doctests: From 6a3529233e6d32cac72892f3aec72945b4c0230f Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 12:22:50 +0100 Subject: [PATCH 26/63] test3 --- .github/workflows/master_test.yml | 76 +++++++++++++++---------------- 1 file changed, 37 insertions(+), 39 deletions(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index f95fbf67..baf8087a 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -54,46 +54,44 @@ jobs: echo "current version (init) = ${CURRENT_VERSION}" PYPROJECT_VERSION="$(grep -E 'version' pyproject.toml | cut -d ' ' -f3)" echo "current version (pyproject) = ${PYPROJECT_VERSION}" - [${CURRENT_VERSION}] == [${PYPROJECT_VERSION}] - - name: check sync if: ${{ CURRENT_VERSION }} != ${{ PYPROJECT_VERSION }} run: exit 1 - doctests: - name: documentation-test - #needs: run-tests - runs-on: ${{ matrix.os }} - strategy: - # You can use PyPy versions in python-version. - # For example, pypy-2.7 and pypy-3.8 - matrix: - python-version: ["3.9"] - # os: [ubuntu-latest, windows-latest] - os: [ubuntu-latest] - node-version: [12.x] - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - #cache: 'poetry' - # You can test your matrix by printing the current Python version - - name: Display Python version - run: python -c "import sys; print(sys.version)" - - name: install pandoc (system wide) - run: | - sudo apt-get -y install pandoc - - name: Install poetry - run: | - pip install poetry - - name: Install dependencies and build - run: | - poetry update - poetry install --all-extras - poetry build - - name: Build documentation - run: | - poetry show - poetry run sphinx-build -a -E docs _build \ No newline at end of file + # doctests: + # name: documentation-test + # #needs: run-tests + # runs-on: ${{ matrix.os }} + # strategy: + # # You can use PyPy versions in python-version. + # # For example, pypy-2.7 and pypy-3.8 + # matrix: + # python-version: ["3.9"] + # # os: [ubuntu-latest, windows-latest] + # os: [ubuntu-latest] + # node-version: [12.x] + # steps: + # - uses: actions/checkout@v3 + # - name: Set up Python ${{ matrix.python-version }} + # uses: actions/setup-python@v4 + # with: + # python-version: ${{ matrix.python-version }} + # #cache: 'poetry' + # # You can test your matrix by printing the current Python version + # - name: Display Python version + # run: python -c "import sys; print(sys.version)" + # - name: install pandoc (system wide) + # run: | + # sudo apt-get -y install pandoc + # - name: Install poetry + # run: | + # pip install poetry + # - name: Install dependencies and build + # run: | + # poetry update + # poetry install --all-extras + # poetry build + # - name: Build documentation + # run: | + # poetry show + # poetry run sphinx-build -a -E docs _build \ No newline at end of file From 2424397bb4dbea7669e049c04c4eafce289b8a66 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 12:24:09 +0100 Subject: [PATCH 27/63] test4 --- .github/workflows/master_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index baf8087a..1a6590a6 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -54,8 +54,8 @@ jobs: echo "current version (init) = ${CURRENT_VERSION}" PYPROJECT_VERSION="$(grep -E 'version' pyproject.toml | cut -d ' ' -f3)" echo "current version (pyproject) = ${PYPROJECT_VERSION}" - if: ${{ CURRENT_VERSION }} != ${{ PYPROJECT_VERSION }} - run: exit 1 + # if: ${{ CURRENT_VERSION }} != ${{ PYPROJECT_VERSION }} + # run: exit 1 # doctests: From 6ec6318a3eb9e7b65cfb808aaa7a26ac9a9d7418 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 12:26:02 +0100 Subject: [PATCH 28/63] test5 --- .github/workflows/master_test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index 1a6590a6..cfd72620 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -48,6 +48,10 @@ jobs: #needs: run-tests runs-on: ubuntu-latest steps: + - name: navigate + run: | + pwd + ls - name: get version run: | CURRENT_VERSION="$(grep -E '__version__' metobs_toolkit/__init__.py | cut -d ' ' -f3)" From 1d5ca83f84b63e65b7a0d8937274f1e1b92b88b2 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 12:27:35 +0100 Subject: [PATCH 29/63] test6 --- .github/workflows/master_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index cfd72620..1ff8e1bf 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -48,6 +48,7 @@ jobs: #needs: run-tests runs-on: ubuntu-latest steps: + - uses: actions/checkout@v3 - name: navigate run: | pwd From 50e32e98fab6c668efe3d7250811e7513da21a00 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 12:29:08 +0100 Subject: [PATCH 30/63] test7 --- .github/workflows/master_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index 1ff8e1bf..ef61b7cb 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -59,8 +59,8 @@ jobs: echo "current version (init) = ${CURRENT_VERSION}" PYPROJECT_VERSION="$(grep -E 'version' pyproject.toml | cut -d ' ' -f3)" echo "current version (pyproject) = ${PYPROJECT_VERSION}" - # if: ${{ CURRENT_VERSION }} != ${{ PYPROJECT_VERSION }} - # run: exit 1 + if: ${{ CURRENT_VERSION }} != ${{ PYPROJECT_VERSION }} + run: exit 1 # doctests: From 2a8aa54a9f11ae851fa0912ce6dcb839e0d4d3e2 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 12:33:18 +0100 Subject: [PATCH 31/63] test8 --- .github/workflows/master_test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index ef61b7cb..ff166827 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -54,13 +54,14 @@ jobs: pwd ls - name: get version + id: 'version_info' run: | CURRENT_VERSION="$(grep -E '__version__' metobs_toolkit/__init__.py | cut -d ' ' -f3)" echo "current version (init) = ${CURRENT_VERSION}" PYPROJECT_VERSION="$(grep -E 'version' pyproject.toml | cut -d ' ' -f3)" echo "current version (pyproject) = ${PYPROJECT_VERSION}" - if: ${{ CURRENT_VERSION }} != ${{ PYPROJECT_VERSION }} - run: exit 1 + if: ${{ steps.version_info.outputs.CURRENT_VERSION }} != ${{ steps.version_info.outputsPYPROJECT_VERSION }} + run: exit 1 # doctests: From 3b08dc6eb2a7665d9ae7cb3a6ee6b123469037ca Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 12:35:02 +0100 Subject: [PATCH 32/63] test9 --- .github/workflows/master_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index ff166827..820ebb11 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -60,6 +60,7 @@ jobs: echo "current version (init) = ${CURRENT_VERSION}" PYPROJECT_VERSION="$(grep -E 'version' pyproject.toml | cut -d ' ' -f3)" echo "current version (pyproject) = ${PYPROJECT_VERSION}" + - name: sync versions if: ${{ steps.version_info.outputs.CURRENT_VERSION }} != ${{ steps.version_info.outputsPYPROJECT_VERSION }} run: exit 1 From 6edabbac2d4a77275fe32ede5782406416f934d1 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 12:37:52 +0100 Subject: [PATCH 33/63] test10 --- .github/workflows/master_test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index 820ebb11..8aa0de4a 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -61,8 +61,11 @@ jobs: PYPROJECT_VERSION="$(grep -E 'version' pyproject.toml | cut -d ' ' -f3)" echo "current version (pyproject) = ${PYPROJECT_VERSION}" - name: sync versions - if: ${{ steps.version_info.outputs.CURRENT_VERSION }} != ${{ steps.version_info.outputsPYPROJECT_VERSION }} - run: exit 1 + if: ${{ steps.version_info.outputs.CURRENT_VERSION }} != ${{ steps.version_info.outputs.PYPROJECT_VERSION }} + run: | + echo ${steps.version_info.outputs.CURRENT_VERSION} + echo ${steps.version_info.outputs.PYPROJECT_VERSION} + exit 1 # doctests: From 41f47ee9fbeba300d69133ff9ae75e4c9fffc49f Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 12:41:11 +0100 Subject: [PATCH 34/63] test11 --- .github/workflows/master_test.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index 8aa0de4a..5cf7f1ed 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -60,12 +60,10 @@ jobs: echo "current version (init) = ${CURRENT_VERSION}" PYPROJECT_VERSION="$(grep -E 'version' pyproject.toml | cut -d ' ' -f3)" echo "current version (pyproject) = ${PYPROJECT_VERSION}" - - name: sync versions - if: ${{ steps.version_info.outputs.CURRENT_VERSION }} != ${{ steps.version_info.outputs.PYPROJECT_VERSION }} - run: | - echo ${steps.version_info.outputs.CURRENT_VERSION} - echo ${steps.version_info.outputs.PYPROJECT_VERSION} - exit 1 + + - name: version is correct + if: ${{ steps.version_info.outputs.CURRENT_VERSION == steps.version_info.outputs.CURRENT_VERSION }} + run: echo "version tag is alined" # doctests: From 3d9a6d601632b3619d885fb1b76ce94a4521a6a7 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 12:42:54 +0100 Subject: [PATCH 35/63] test12 --- .github/workflows/master_test.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index 5cf7f1ed..90ffea0f 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -60,12 +60,9 @@ jobs: echo "current version (init) = ${CURRENT_VERSION}" PYPROJECT_VERSION="$(grep -E 'version' pyproject.toml | cut -d ' ' -f3)" echo "current version (pyproject) = ${PYPROJECT_VERSION}" - - - name: version is correct - if: ${{ steps.version_info.outputs.CURRENT_VERSION == steps.version_info.outputs.CURRENT_VERSION }} - run: echo "version tag is alined" - - + - name: version-is-correct + if: ${{ steps.version_info.outputs.CURRENT_VERSION == steps.version_info.outputs.CURRENT_VERSION }} + run: echo "version tag is alined" # doctests: # name: documentation-test # #needs: run-tests From 34a107008521b84354f48a12b919ab07f69b4064 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 12:43:58 +0100 Subject: [PATCH 36/63] test14 --- .github/workflows/master_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index 90ffea0f..f0e00bbb 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -61,7 +61,7 @@ jobs: PYPROJECT_VERSION="$(grep -E 'version' pyproject.toml | cut -d ' ' -f3)" echo "current version (pyproject) = ${PYPROJECT_VERSION}" - name: version-is-correct - if: ${{ steps.version_info.outputs.CURRENT_VERSION == steps.version_info.outputs.CURRENT_VERSION }} + if: ${{ steps.version_info.outputs.CURRENT_VERSION == steps.version_info.outputs.PYPROJECT_VERSION }} run: echo "version tag is alined" # doctests: # name: documentation-test From 1d17cf11b9675ad4a1ab6f2d893efaf683bce1b2 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 12:45:56 +0100 Subject: [PATCH 37/63] test15 --- .github/workflows/master_test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index f0e00bbb..2948b8d5 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -62,7 +62,9 @@ jobs: echo "current version (pyproject) = ${PYPROJECT_VERSION}" - name: version-is-correct if: ${{ steps.version_info.outputs.CURRENT_VERSION == steps.version_info.outputs.PYPROJECT_VERSION }} - run: echo "version tag is alined" + run: | + echo "version tags ar not aligned!" + exit 1 # doctests: # name: documentation-test # #needs: run-tests From 7ad6c5f3de06b0c37942e2cffa9dbaced4cca57f Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 12:46:52 +0100 Subject: [PATCH 38/63] test func --- .github/workflows/master_test.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index 2948b8d5..299a265d 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -61,7 +61,7 @@ jobs: PYPROJECT_VERSION="$(grep -E 'version' pyproject.toml | cut -d ' ' -f3)" echo "current version (pyproject) = ${PYPROJECT_VERSION}" - name: version-is-correct - if: ${{ steps.version_info.outputs.CURRENT_VERSION == steps.version_info.outputs.PYPROJECT_VERSION }} + if: ${{ steps.version_info.outputs.CURRENT_VERSION != steps.version_info.outputs.PYPROJECT_VERSION }} run: | echo "version tags ar not aligned!" exit 1 diff --git a/pyproject.toml b/pyproject.toml index 98d780dd..73a6dd9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "MetObs-toolkit" -version = "0.1.2beta" +version = "0.1.2betafake" description = "A Meteorological observations toolkit for scientists" authors = ["Thomas Vergauwen "] maintainers = ["Thomas Vergauwen "] From 6c5cc277f5895084e4d25bd06ee97b26ec3f6ea1 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 12:50:41 +0100 Subject: [PATCH 39/63] what is happening? --- .github/workflows/master_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index 299a265d..d04fcbaf 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -61,7 +61,7 @@ jobs: PYPROJECT_VERSION="$(grep -E 'version' pyproject.toml | cut -d ' ' -f3)" echo "current version (pyproject) = ${PYPROJECT_VERSION}" - name: version-is-correct - if: ${{ steps.version_info.outputs.CURRENT_VERSION != steps.version_info.outputs.PYPROJECT_VERSION }} + if: ${{ steps.version_info.outputs.CURRENT_VERSION !== steps.version_info.outputs.PYPROJECT_VERSION }} run: | echo "version tags ar not aligned!" exit 1 From 54e68d762cb6588e8ff64965986b9401e146ca4b Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 12:51:51 +0100 Subject: [PATCH 40/63] hunk --- .github/workflows/master_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index d04fcbaf..2948b8d5 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -61,7 +61,7 @@ jobs: PYPROJECT_VERSION="$(grep -E 'version' pyproject.toml | cut -d ' ' -f3)" echo "current version (pyproject) = ${PYPROJECT_VERSION}" - name: version-is-correct - if: ${{ steps.version_info.outputs.CURRENT_VERSION !== steps.version_info.outputs.PYPROJECT_VERSION }} + if: ${{ steps.version_info.outputs.CURRENT_VERSION == steps.version_info.outputs.PYPROJECT_VERSION }} run: | echo "version tags ar not aligned!" exit 1 From 61c45e2bcba64baf4586b9f7ebe68e47a17ca524 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 12:54:43 +0100 Subject: [PATCH 41/63] strange ... --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 73a6dd9b..98d780dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "MetObs-toolkit" -version = "0.1.2betafake" +version = "0.1.2beta" description = "A Meteorological observations toolkit for scientists" authors = ["Thomas Vergauwen "] maintainers = ["Thomas Vergauwen "] From c37c1ecb30f6272a8e19c79a4c1e2b321d3409fe Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 13:03:50 +0100 Subject: [PATCH 42/63] with some gpt help maybe? --- .github/workflows/master_test.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index 2948b8d5..1b96f165 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -56,14 +56,16 @@ jobs: - name: get version id: 'version_info' run: | - CURRENT_VERSION="$(grep -E '__version__' metobs_toolkit/__init__.py | cut -d ' ' -f3)" + CURRENT_VERSION="$(grep -oP '__version__ = "\K\d+\.\d+\.\d+' metobs_toolkit/__init__.py)" echo "current version (init) = ${CURRENT_VERSION}" - PYPROJECT_VERSION="$(grep -E 'version' pyproject.toml | cut -d ' ' -f3)" + echo "::set-output name=current_version::$CURRENT_VERSION" + PYPROJECT_VERSION="$(grep -oP 'version = "\K\d+\.\d+\.\d+' pyproject.toml)" echo "current version (pyproject) = ${PYPROJECT_VERSION}" + echo "::set-output name=pyproject_version::$PYPROJECT_VERSION" - name: version-is-correct - if: ${{ steps.version_info.outputs.CURRENT_VERSION == steps.version_info.outputs.PYPROJECT_VERSION }} + if: ${{ steps.version_info.outputs.current_version != steps.version_info.outputs.pyproject_version }} run: | - echo "version tags ar not aligned!" + echo "version tags are not aligned!" exit 1 # doctests: # name: documentation-test From aa9ccb1c89df3a4ebbc4bd4ad64adf646e7626d6 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 13:05:04 +0100 Subject: [PATCH 43/63] trigger error --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 98d780dd..8b102194 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "MetObs-toolkit" -version = "0.1.2beta" +version = "0.1.3beta" description = "A Meteorological observations toolkit for scientists" authors = ["Thomas Vergauwen "] maintainers = ["Thomas Vergauwen "] From 9b9a40a6a2f8157afbd71c323fd4835f27d7c5d2 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 13:10:06 +0100 Subject: [PATCH 44/63] bring all checks together --- .github/workflows/master_test.yml | 144 ++++++++++++++---------------- pyproject.toml | 2 +- 2 files changed, 70 insertions(+), 76 deletions(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index 1b96f165..f7720279 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -3,49 +3,49 @@ name: Test pushed version on: [push] jobs: - # run-tests: - # name: run test scripts - # runs-on: ${{ matrix.os }} - # strategy: - # # You can use PyPy versions in python-version. - # # For example, pypy-2.7 and pypy-3.8 - # matrix: - # python-version: ["3.9", "3.10"] - # # os: [ubuntu-latest, windows-latest] - # os: [ubuntu-latest] - # node-version: [12.x] + run-tests: + name: run test scripts + runs-on: ${{ matrix.os }} + strategy: + # You can use PyPy versions in python-version. + # For example, pypy-2.7 and pypy-3.8 + matrix: + python-version: ["3.9", "3.10"] + # os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest] + node-version: [12.x] - # steps: - # - uses: actions/checkout@v3 - # - name: Set up Python ${{ matrix.python-version }} - # uses: actions/setup-python@v4 - # with: - # python-version: ${{ matrix.python-version }} - # #cache: 'poetry' - # # You can test your matrix by printing the current Python version - # - name: Display Python version - # run: python -c "import sys; print(sys.version)" - # - name: Install poetry - # run: | - # pip install poetry + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + #cache: 'poetry' + # You can test your matrix by printing the current Python version + - name: Display Python version + run: python -c "import sys; print(sys.version)" + - name: Install poetry + run: | + pip install poetry - # - name: Install dependencies and build - # run: | - # poetry update - # poetry install --all-extras - # poetry build - # - name: Run tests - # run: | - # poetry run python tests/push_test/gap_and_fill_test.py - # poetry run python tests/push_test/IO_test.py - # poetry run python tests/push_test/qc_test.py - # poetry run python tests/push_test/breaking_test.py - # #poetry run python tests/push_test/gui_launch_test.py - # poetry run python tests/push_test/analysis_test.py + - name: Install dependencies and build + run: | + poetry update + poetry install --all-extras + poetry build + - name: Run tests + run: | + poetry run python tests/push_test/gap_and_fill_test.py + poetry run python tests/push_test/IO_test.py + poetry run python tests/push_test/qc_test.py + poetry run python tests/push_test/breaking_test.py + #poetry run python tests/push_test/gui_launch_test.py + poetry run python tests/push_test/analysis_test.py versiontest: name: check if version is valid - #needs: run-tests + needs: run-tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -67,40 +67,34 @@ jobs: run: | echo "version tags are not aligned!" exit 1 - # doctests: - # name: documentation-test - # #needs: run-tests - # runs-on: ${{ matrix.os }} - # strategy: - # # You can use PyPy versions in python-version. - # # For example, pypy-2.7 and pypy-3.8 - # matrix: - # python-version: ["3.9"] - # # os: [ubuntu-latest, windows-latest] - # os: [ubuntu-latest] - # node-version: [12.x] - # steps: - # - uses: actions/checkout@v3 - # - name: Set up Python ${{ matrix.python-version }} - # uses: actions/setup-python@v4 - # with: - # python-version: ${{ matrix.python-version }} - # #cache: 'poetry' - # # You can test your matrix by printing the current Python version - # - name: Display Python version - # run: python -c "import sys; print(sys.version)" - # - name: install pandoc (system wide) - # run: | - # sudo apt-get -y install pandoc - # - name: Install poetry - # run: | - # pip install poetry - # - name: Install dependencies and build - # run: | - # poetry update - # poetry install --all-extras - # poetry build - # - name: Build documentation - # run: | - # poetry show - # poetry run sphinx-build -a -E docs _build \ No newline at end of file + + + doctests: + name: documentation-test + #needs: run-tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python39 + uses: actions/setup-python@v4 + with: + python-version: '3.9' + #cache: 'poetry' + # You can test your matrix by printing the current Python version + - name: Display Python version + run: python -c "import sys; print(sys.version)" + - name: install pandoc (system wide) + run: | + sudo apt-get -y install pandoc + - name: Install poetry + run: | + pip install poetry + - name: Install dependencies and build + run: | + poetry update + poetry install --all-extras + poetry build + - name: Build documentation + run: | + poetry show + poetry run sphinx-build -a -E docs _build \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 8b102194..98d780dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "MetObs-toolkit" -version = "0.1.3beta" +version = "0.1.2beta" description = "A Meteorological observations toolkit for scientists" authors = ["Thomas Vergauwen "] maintainers = ["Thomas Vergauwen "] From a0811210bc2ca788f047b1d6747f684fdebed9ce Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 13:12:25 +0100 Subject: [PATCH 45/63] cleanup identation --- .github/workflows/master_test.yml | 48 +++++++++++++++---------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index f7720279..a8379dbb 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -43,30 +43,30 @@ jobs: #poetry run python tests/push_test/gui_launch_test.py poetry run python tests/push_test/analysis_test.py - versiontest: - name: check if version is valid - needs: run-tests - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: navigate - run: | - pwd - ls - - name: get version - id: 'version_info' - run: | - CURRENT_VERSION="$(grep -oP '__version__ = "\K\d+\.\d+\.\d+' metobs_toolkit/__init__.py)" - echo "current version (init) = ${CURRENT_VERSION}" - echo "::set-output name=current_version::$CURRENT_VERSION" - PYPROJECT_VERSION="$(grep -oP 'version = "\K\d+\.\d+\.\d+' pyproject.toml)" - echo "current version (pyproject) = ${PYPROJECT_VERSION}" - echo "::set-output name=pyproject_version::$PYPROJECT_VERSION" - - name: version-is-correct - if: ${{ steps.version_info.outputs.current_version != steps.version_info.outputs.pyproject_version }} - run: | - echo "version tags are not aligned!" - exit 1 + versiontest: + name: check if version is valid + needs: run-tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: navigate + run: | + pwd + ls + - name: get version + id: 'version_info' + run: | + CURRENT_VERSION="$(grep -oP '__version__ = "\K\d+\.\d+\.\d+' metobs_toolkit/__init__.py)" + echo "current version (init) = ${CURRENT_VERSION}" + echo "::set-output name=current_version::$CURRENT_VERSION" + PYPROJECT_VERSION="$(grep -oP 'version = "\K\d+\.\d+\.\d+' pyproject.toml)" + echo "current version (pyproject) = ${PYPROJECT_VERSION}" + echo "::set-output name=pyproject_version::$PYPROJECT_VERSION" + - name: version-is-correct + if: ${{ steps.version_info.outputs.current_version != steps.version_info.outputs.pyproject_version }} + run: | + echo "version tags are not aligned!" + exit 1 doctests: From 85212730a11d378e48143b097bc0d25b787b1a11 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 13:13:52 +0100 Subject: [PATCH 46/63] without all extras for tests --- .github/workflows/master_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index a8379dbb..ad7a3c98 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -32,7 +32,7 @@ jobs: - name: Install dependencies and build run: | poetry update - poetry install --all-extras + poetry install poetry build - name: Run tests run: | From c64d882e2110be839c3f4d3177616b650eab76a8 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 14:01:58 +0100 Subject: [PATCH 47/63] cleanup --- .github/workflows/master_test.yml | 2 +- pyproject.toml | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index ad7a3c98..8f6fd57b 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -71,7 +71,7 @@ jobs: doctests: name: documentation-test - #needs: run-tests + #needs: versiontest runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/pyproject.toml b/pyproject.toml index 98d780dd..b9a8c599 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ keywords = ["meteorology", "observations", "urban climate"] [tool.poetry.dependencies] python = "^3.9" pandas = "^1.3.0" -#numpy = "^1.17.3" +#numpy = "^1.17.3" #in pandas matplotlib = "^3.0.0" geopandas = "^0.9.0" pyproj = "~3.4" @@ -21,10 +21,6 @@ mapclassify = "^2.4.0" earthengine-api = "^0.1.340" geemap = '^0.20.0' -[tool.poetry.group.setup.dependencies] -#setuptools = '^68.2' -future = '0.18.1' - [tool.poetry.group.titan.dependencies] @@ -35,13 +31,12 @@ titanlib = '^0.3' [tool.poetry.group.documentation.dependencies] #Group of dep packages for building the documentation - sphinx = '^7.2' nbsphinx = '^0.9' sphinx-copybutton = '^0.5.1' sphinx-rtd-theme = '^1.3.0' myst_parser = '^2.0.0' -pandoc = '^2' #Check on PyPi (not in local conda env) +pandoc = '^2' #Check on PyPi (not in local conda env) + with system wide install [tool.poetry.group.dev.dependencies] From 09eb049cd0809873e0c0d35a5c47a0ffb317ec31 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 14:26:58 +0100 Subject: [PATCH 48/63] combine to one workflow file --- .github/workflows/master_test.yml | 38 ++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index 8f6fd57b..4b0e9f4a 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -3,6 +3,7 @@ name: Test pushed version on: [push] jobs: +#---- Run tests -----# run-tests: name: run test scripts runs-on: ${{ matrix.os }} @@ -42,7 +43,7 @@ jobs: poetry run python tests/push_test/breaking_test.py #poetry run python tests/push_test/gui_launch_test.py poetry run python tests/push_test/analysis_test.py - +#---- Version Control -----# versiontest: name: check if version is valid needs: run-tests @@ -68,7 +69,7 @@ jobs: echo "version tags are not aligned!" exit 1 - +#---- Documentation build -----# doctests: name: documentation-test #needs: versiontest @@ -97,4 +98,35 @@ jobs: - name: Build documentation run: | poetry show - poetry run sphinx-build -a -E docs _build \ No newline at end of file + poetry run sphinx-build -a -E docs _build + +#---- Deploy documentation -----# + deploy_doc: + name: Deploy main documentation + needs: doctest + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/master' + steps: + - uses: peaceiris/actions-gh-pages@v3 + with: + publish_branch: gh-pages + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: _build/ + force_orphan: true + + deploy_doc_dev: + name: Deploy main documentation + needs: doctest + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/dev' + steps: + - uses: peaceiris/actions-gh-pages@v3 + with: + publish_branch: gh-pages-dev + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: _build/ + force_orphan: true + + + + From d846587a6b88eb10672e30d11f090f8b137d1af2 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 14:28:23 +0100 Subject: [PATCH 49/63] fix identation --- .github/workflows/master_test.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index 4b0e9f4a..155731dc 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -109,10 +109,10 @@ jobs: steps: - uses: peaceiris/actions-gh-pages@v3 with: - publish_branch: gh-pages - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: _build/ - force_orphan: true + publish_branch: gh-pages + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: _build/ + force_orphan: true deploy_doc_dev: name: Deploy main documentation @@ -122,10 +122,10 @@ jobs: steps: - uses: peaceiris/actions-gh-pages@v3 with: - publish_branch: gh-pages-dev - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: _build/ - force_orphan: true + publish_branch: gh-pages-dev + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: _build/ + force_orphan: true From 979fc9aa9fc976493f1f71e18cd1b47a35877dad Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 14:30:34 +0100 Subject: [PATCH 50/63] syntax test --- .github/workflows/master_test.yml | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index 155731dc..cf2db16f 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -107,25 +107,13 @@ jobs: runs-on: ubuntu-latest if: github.ref == 'refs/heads/master' steps: - - uses: peaceiris/actions-gh-pages@v3 - with: - publish_branch: gh-pages - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: _build/ - force_orphan: true + uses: peaceiris/actions-gh-pages@v3 + with: + publish_branch: gh-pages + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: _build/ + force_orphan: true - deploy_doc_dev: - name: Deploy main documentation - needs: doctest - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/dev' - steps: - - uses: peaceiris/actions-gh-pages@v3 - with: - publish_branch: gh-pages-dev - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: _build/ - force_orphan: true From 2c7e9a9c2c7e4c4be166a455d65e79ed4424c709 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen <82087298+vergauwenthomas@users.noreply.github.com> Date: Fri, 10 Nov 2023 14:39:14 +0100 Subject: [PATCH 51/63] syntax fixes --- .github/workflows/master_test.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index cf2db16f..acc6f20b 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -103,12 +103,14 @@ jobs: #---- Deploy documentation -----# deploy_doc: name: Deploy main documentation - needs: doctest + needs: doctests runs-on: ubuntu-latest if: github.ref == 'refs/heads/master' steps: - uses: peaceiris/actions-gh-pages@v3 - with: + - uses: actions/checkout@v3 + - name: deploy artifact + uses: peaceiris/actions-gh-pages@v3 + with: publish_branch: gh-pages github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: _build/ From 5d62871ba3432aeee5f0d8665fee42bc11168989 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen <82087298+vergauwenthomas@users.noreply.github.com> Date: Fri, 10 Nov 2023 14:44:04 +0100 Subject: [PATCH 52/63] Update master_test.yml --- .github/workflows/master_test.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/master_test.yml b/.github/workflows/master_test.yml index acc6f20b..2718b0a4 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/master_test.yml @@ -103,7 +103,7 @@ jobs: #---- Deploy documentation -----# deploy_doc: name: Deploy main documentation - needs: doctests + needs: [doctests,run-tests,versiontest] runs-on: ubuntu-latest if: github.ref == 'refs/heads/master' steps: @@ -116,6 +116,21 @@ jobs: publish_dir: _build/ force_orphan: true + deploy_doc_dev: + name: Deploy dev documentation + needs: [doctests] + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/dev' + steps: + - uses: actions/checkout@v3 + - name: deploy artifact + uses: peaceiris/actions-gh-pages@v3 + with: + publish_branch: gh-pages-dev + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: _build/ + force_orphan: true + From 885eaa1a32a69d30dd6fa417608bb021f39ba902 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 14:56:05 +0100 Subject: [PATCH 53/63] all in one workflow' --- .github/workflows/build_and_deploy_doc.yml | 53 ------------------ .../workflows/build_and_deploy_doc_dev.yml | 53 ------------------ .../{master_test.yml => main_workflow.yml} | 55 ++++++++++++++++++- 3 files changed, 54 insertions(+), 107 deletions(-) delete mode 100644 .github/workflows/build_and_deploy_doc.yml delete mode 100644 .github/workflows/build_and_deploy_doc_dev.yml rename .github/workflows/{master_test.yml => main_workflow.yml} (73%) diff --git a/.github/workflows/build_and_deploy_doc.yml b/.github/workflows/build_and_deploy_doc.yml deleted file mode 100644 index 891b5e4a..00000000 --- a/.github/workflows/build_and_deploy_doc.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Build and deploy documentation (master) -on: - push: - branches: - - master -permissions: - contents: write -jobs: - build: - - runs-on: ${{ matrix.os }} - strategy: - # You can use PyPy versions in python-version. - # For example, pypy-2.7 and pypy-3.8 - matrix: - python-version: ["3.9"] - # os: [ubuntu-latest, windows-latest] - os: [ubuntu-latest] - node-version: [12.x] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - #cache: 'poetry' - # You can test your matrix by printing the current Python version - - name: Display Python version - run: python -c "import sys; print(sys.version)" - - name: install pandoc (system wide) - run: | - sudo apt-get -y install pandoc - - name: Install poetry - run: | - pip install poetry - - name: Install dependencies and build - run: | - poetry update - poetry install --all-extras - poetry build - - name: Build documentation - run: | - poetry show - poetry run sphinx-build -a -E docs _build - - - name: Deploy documentation online - uses: peaceiris/actions-gh-pages@v3 - with: - publish_branch: gh-pages - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: _build/ - force_orphan: true diff --git a/.github/workflows/build_and_deploy_doc_dev.yml b/.github/workflows/build_and_deploy_doc_dev.yml deleted file mode 100644 index 7fd842c1..00000000 --- a/.github/workflows/build_and_deploy_doc_dev.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Build and deploy documentation (dev) -on: - push: - branches: - - dev -permissions: - contents: write -jobs: - build: - - runs-on: ${{ matrix.os }} - strategy: - # You can use PyPy versions in python-version. - # For example, pypy-2.7 and pypy-3.8 - matrix: - python-version: ["3.9"] - # os: [ubuntu-latest, windows-latest] - os: [ubuntu-latest] - node-version: [12.x] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - #cache: 'poetry' - # You can test your matrix by printing the current Python version - - name: Display Python version - run: python -c "import sys; print(sys.version)" - - name: install pandoc (system wide) - run: | - sudo apt-get -y install pandoc - - name: Install poetry - run: | - pip install poetry - - name: Install dependencies and build - run: | - poetry update - poetry install --all-extras - poetry build - - name: Build documentation - run: | - poetry show - poetry run sphinx-build -a -E docs _build - - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - publish_branch: gh-pages-dev - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: _build/ - force_orphan: true diff --git a/.github/workflows/master_test.yml b/.github/workflows/main_workflow.yml similarity index 73% rename from .github/workflows/master_test.yml rename to .github/workflows/main_workflow.yml index 2718b0a4..49b3817e 100644 --- a/.github/workflows/master_test.yml +++ b/.github/workflows/main_workflow.yml @@ -43,6 +43,57 @@ jobs: poetry run python tests/push_test/breaking_test.py #poetry run python tests/push_test/gui_launch_test.py poetry run python tests/push_test/analysis_test.py + +#--- Package os installation --- + os_install_testing: + name: test package installation on multiple os + if: (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master') + strategy: + fail-fast: true + matrix: + os: [ "ubuntu-latest", "macos-latest", "windows-latest" ] + python-version: ["3.9", "3.10"] + defaults: + run: + shell: bash + runs-on: ${{ matrix.os }} + steps: + #--- + # check-out repo and set-up python + #---- + - name: Check out repository + uses: actions/checkout@v3 + - name: Set up python ${{ matrix.python-version }} + id: setup-python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + #-- + # ----- install & configure poetry ----- + #-- + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + version: 1.3.2 + virtualenvs-create: true + virtualenvs-in-project: true + - name: Load cached venv + id: cached-pip-wheels + uses: actions/cache@v3 + with: + path: ~/.cache + key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} + - name: Update lock + run: poetry update + - name: Install dependencies + run: poetry install --no-interaction --no-root + - name: Install library + run: poetry install --no-interaction + - name: Run tests + run: | + source $VENV + python tests/push_test/import_test.py + #---- Version Control -----# versiontest: name: check if version is valid @@ -103,7 +154,7 @@ jobs: #---- Deploy documentation -----# deploy_doc: name: Deploy main documentation - needs: [doctests,run-tests,versiontest] + needs: [doctests,run-tests,versiontest,os_install_testing] runs-on: ubuntu-latest if: github.ref == 'refs/heads/master' steps: @@ -135,3 +186,5 @@ jobs: + + From d883169ef968a631d69e01643bda98312ba18a64 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen <82087298+vergauwenthomas@users.noreply.github.com> Date: Fri, 10 Nov 2023 15:00:32 +0100 Subject: [PATCH 54/63] Update main_workflow.yml --- .github/workflows/main_workflow.yml | 94 ++++++++++++++--------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 49b3817e..af08ef92 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -46,53 +46,53 @@ jobs: #--- Package os installation --- os_install_testing: - name: test package installation on multiple os - if: (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master') - strategy: - fail-fast: true - matrix: - os: [ "ubuntu-latest", "macos-latest", "windows-latest" ] - python-version: ["3.9", "3.10"] - defaults: - run: - shell: bash - runs-on: ${{ matrix.os }} - steps: - #--- - # check-out repo and set-up python - #---- - - name: Check out repository - uses: actions/checkout@v3 - - name: Set up python ${{ matrix.python-version }} - id: setup-python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - #-- - # ----- install & configure poetry ----- - #-- - - name: Install Poetry - uses: snok/install-poetry@v1 - with: - version: 1.3.2 - virtualenvs-create: true - virtualenvs-in-project: true - - name: Load cached venv - id: cached-pip-wheels - uses: actions/cache@v3 - with: - path: ~/.cache - key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} - - name: Update lock - run: poetry update - - name: Install dependencies - run: poetry install --no-interaction --no-root - - name: Install library - run: poetry install --no-interaction - - name: Run tests - run: | - source $VENV - python tests/push_test/import_test.py + name: test package installation on multiple os + if: (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master') + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: [ "ubuntu-latest", "macos-latest", "windows-latest" ] + python-version: ["3.9", "3.10"] + defaults: + run: + shell: bash + steps: + #--- + # check-out repo and set-up python + #---- + - name: Check out repository + uses: actions/checkout@v3 + - name: Set up python ${{ matrix.python-version }} + id: setup-python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + #-- + # ----- install & configure poetry ----- + #-- + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + version: 1.3.2 + virtualenvs-create: true + virtualenvs-in-project: true + - name: Load cached venv + id: cached-pip-wheels + uses: actions/cache@v3 + with: + path: ~/.cache + key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} + - name: Update lock + run: poetry update + - name: Install dependencies + run: poetry install --no-interaction --no-root + - name: Install library + run: poetry install --no-interaction + - name: Run tests + run: | + source $VENV + python tests/push_test/import_test.py #---- Version Control -----# versiontest: From 793fb72bbf817baa791b66bb1ce931303ab5a5d7 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 15:01:55 +0100 Subject: [PATCH 55/63] trigger os testing --- .github/workflows/main_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index af08ef92..be3385d3 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -47,7 +47,7 @@ jobs: #--- Package os installation --- os_install_testing: name: test package installation on multiple os - if: (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master') + #if: (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master') runs-on: ${{ matrix.os }} strategy: fail-fast: true From fe5b6a6d4a473715393eb898abf2c1515cc1967e Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 15:11:05 +0100 Subject: [PATCH 56/63] possible fix --- .github/workflows/main_workflow.yml | 31 ++++++++++------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index be3385d3..88d09b42 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -71,28 +71,17 @@ jobs: #-- # ----- install & configure poetry ----- #-- - - name: Install Poetry - uses: snok/install-poetry@v1 - with: - version: 1.3.2 - virtualenvs-create: true - virtualenvs-in-project: true - - name: Load cached venv - id: cached-pip-wheels - uses: actions/cache@v3 - with: - path: ~/.cache - key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} - - name: Update lock - run: poetry update - - name: Install dependencies - run: poetry install --no-interaction --no-root - - name: Install library - run: poetry install --no-interaction - - name: Run tests + - name: Install poetry + run: | + pip install poetry + - name: Install the toolkit run: | - source $VENV - python tests/push_test/import_test.py + poetry update + poetry install + - name: Run import test + run: | + poetry run python tests/push_test/import_test.py + #---- Version Control -----# versiontest: From 1808239b0ee463f3fcd13ed967657e5affa8c5b2 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 15:17:59 +0100 Subject: [PATCH 57/63] os testing without titan --- .github/workflows/main_workflow.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 88d09b42..8405a1e0 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -53,7 +53,7 @@ jobs: fail-fast: true matrix: os: [ "ubuntu-latest", "macos-latest", "windows-latest" ] - python-version: ["3.9", "3.10"] + python-version: ["3.9"] defaults: run: shell: bash @@ -77,7 +77,8 @@ jobs: - name: Install the toolkit run: | poetry update - poetry install + poetry install --without titan,documentation + poetry show - name: Run import test run: | poetry run python tests/push_test/import_test.py From 42dee4d8e8b8a2f2f294843f48ce3682eee994eb Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen <82087298+vergauwenthomas@users.noreply.github.com> Date: Fri, 10 Nov 2023 15:30:01 +0100 Subject: [PATCH 58/63] Update main_workflow.yml --- .github/workflows/main_workflow.yml | 79 +++++++++++++++-------------- 1 file changed, 42 insertions(+), 37 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 8405a1e0..b6a365e5 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -45,44 +45,49 @@ jobs: poetry run python tests/push_test/analysis_test.py #--- Package os installation --- - os_install_testing: - name: test package installation on multiple os - #if: (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master') - runs-on: ${{ matrix.os }} - strategy: - fail-fast: true - matrix: - os: [ "ubuntu-latest", "macos-latest", "windows-latest" ] - python-version: ["3.9"] - defaults: - run: - shell: bash + mac_install_testing: + name: Installation on Mac latest + runs-on: macos-latest steps: - #--- - # check-out repo and set-up python - #---- - - name: Check out repository - uses: actions/checkout@v3 - - name: Set up python ${{ matrix.python-version }} - id: setup-python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - #-- - # ----- install & configure poetry ----- - #-- - - name: Install poetry - run: | - pip install poetry - - name: Install the toolkit - run: | - poetry update - poetry install --without titan,documentation - poetry show - - name: Run import test - run: | + - uses: actions/checkout@v3 + - name: Set up Python39 + uses: actions/setup-python@v4 + with: + python-version: "3.9" + - name: Install poetry + run: | + pip install poetry + - name: Install dependencies and build + run: | + poetry update + poetry install --without titan, documentation + poetry build + - name: Run tests + run: | poetry run python tests/push_test/import_test.py - + + windows_install_testing: + name: Installation on Windows latest + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python39 + uses: actions/setup-python@v4 + with: + python-version: "3.9" + - name: Install poetry + run: | + pip install poetry + - name: Install dependencies and build + run: | + poetry update + poetry install --without titan, documentation + poetry build + - name: Run tests + run: | + poetry run python tests\push_test\import_test.py + + #---- Version Control -----# versiontest: @@ -144,7 +149,7 @@ jobs: #---- Deploy documentation -----# deploy_doc: name: Deploy main documentation - needs: [doctests,run-tests,versiontest,os_install_testing] + needs: [doctests,run-tests,versiontest,mac_install_testing, windows_install_testing] runs-on: ubuntu-latest if: github.ref == 'refs/heads/master' steps: From ca9406452461087ebbddd2350b683c1bdcd4b1b3 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen <82087298+vergauwenthomas@users.noreply.github.com> Date: Fri, 10 Nov 2023 15:37:46 +0100 Subject: [PATCH 59/63] Update main_workflow.yml --- .github/workflows/main_workflow.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index b6a365e5..84abcae9 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -60,8 +60,7 @@ jobs: - name: Install dependencies and build run: | poetry update - poetry install --without titan, documentation - poetry build + poetry install --without titan,documentation - name: Run tests run: | poetry run python tests/push_test/import_test.py @@ -81,8 +80,7 @@ jobs: - name: Install dependencies and build run: | poetry update - poetry install --without titan, documentation - poetry build + poetry install --without titan,documentation - name: Run tests run: | poetry run python tests\push_test\import_test.py From 00d135c0bd4f4ac5cb3a8a2cbb41cc7be7c55fe3 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen <82087298+vergauwenthomas@users.noreply.github.com> Date: Fri, 10 Nov 2023 15:45:50 +0100 Subject: [PATCH 60/63] Update main_workflow.yml --- .github/workflows/main_workflow.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 84abcae9..62d0dd99 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -34,7 +34,6 @@ jobs: run: | poetry update poetry install - poetry build - name: Run tests run: | poetry run python tests/push_test/gap_and_fill_test.py @@ -57,6 +56,8 @@ jobs: - name: Install poetry run: | pip install poetry + - name: delete poetry lock if present + run: rm -f poetry.lock - name: Install dependencies and build run: | poetry update @@ -77,6 +78,8 @@ jobs: - name: Install poetry run: | pip install poetry + - name: delete poetry lock if present + run: del "poetry.lock" 2> nul - name: Install dependencies and build run: | poetry update From de99a7fb24099be0149f0dd7b92d34a185c98ea5 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 15:51:23 +0100 Subject: [PATCH 61/63] test without titan in pyproject --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b9a8c599..b0f66784 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,10 +23,10 @@ geemap = '^0.20.0' -[tool.poetry.group.titan.dependencies] +#[tool.poetry.group.titan.dependencies] #titanlib requires C-compilers, which are not by default present on windows. #Make a seperate group for titan -titanlib = '^0.3' +#titanlib = '^0.3' [tool.poetry.group.documentation.dependencies] From b0418756b4a6a4fc2e4488d3d1d99a46b54e03fd Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 16:42:27 +0100 Subject: [PATCH 62/63] test with poetry update --without titan --- .github/workflows/main_workflow.yml | 10 +++++----- pyproject.toml | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 62d0dd99..3cc0f3a2 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -60,12 +60,12 @@ jobs: run: rm -f poetry.lock - name: Install dependencies and build run: | - poetry update + poetry update --without titan,documentation poetry install --without titan,documentation - name: Run tests run: | poetry run python tests/push_test/import_test.py - + windows_install_testing: name: Installation on Windows latest runs-on: windows-latest @@ -82,13 +82,13 @@ jobs: run: del "poetry.lock" 2> nul - name: Install dependencies and build run: | - poetry update + poetry update --without titan,documentation poetry install --without titan,documentation - name: Run tests run: | poetry run python tests\push_test\import_test.py - - + + #---- Version Control -----# versiontest: diff --git a/pyproject.toml b/pyproject.toml index b0f66784..b9a8c599 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,10 +23,10 @@ geemap = '^0.20.0' -#[tool.poetry.group.titan.dependencies] +[tool.poetry.group.titan.dependencies] #titanlib requires C-compilers, which are not by default present on windows. #Make a seperate group for titan -#titanlib = '^0.3' +titanlib = '^0.3' [tool.poetry.group.documentation.dependencies] From c52a1626a50d56cbd7dde24677dae82954fa13cb Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Fri, 10 Nov 2023 16:54:30 +0100 Subject: [PATCH 63/63] cleanup --- .github/workflows/main_workflow.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/main_workflow.yml b/.github/workflows/main_workflow.yml index 3cc0f3a2..1cde8490 100644 --- a/.github/workflows/main_workflow.yml +++ b/.github/workflows/main_workflow.yml @@ -56,8 +56,6 @@ jobs: - name: Install poetry run: | pip install poetry - - name: delete poetry lock if present - run: rm -f poetry.lock - name: Install dependencies and build run: | poetry update --without titan,documentation @@ -78,8 +76,6 @@ jobs: - name: Install poetry run: | pip install poetry - - name: delete poetry lock if present - run: del "poetry.lock" 2> nul - name: Install dependencies and build run: | poetry update --without titan,documentation @@ -97,10 +93,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: navigate - run: | - pwd - ls - name: get version id: 'version_info' run: |