From d7b02dcbc9e826a1e558e244fad26a58162fa4ee Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Thu, 31 Jul 2025 17:01:41 +0200 Subject: [PATCH 01/18] test --- .github/workflows/CICD.yml | 125 +++++++++++++++++++++++++------------ 1 file changed, 86 insertions(+), 39 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index aa5606ed..27f40cc2 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -14,57 +14,104 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.12" - - name: Test - run: | - pip install -r requirements.txt - pip install pytest - pytest + # - name: Test + # run: | + # pip install -r requirements.txt + # pip install pytest + # pytest + + release: + runs-on: ubuntu-latest + needs: [test] + steps: + - name: Create Release + uses: actions/github-script@v7 + with: + script: | + const refs = await github.rest.git.listMatchingRefs({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: "tags/${{ github.head_ref }}-tag" + }) + console.log(refs) + if(refs.data.length > 0) { + console.log("Tag already exists, skipping release") + return + } + github.rest.repos.createRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + tag_name: "${{ github.head_ref }}-tag", + name: "${{ github.head_ref }}", + prerelease: true, + target_commitish: "${{ github.head_ref }}" + }) + env: + GH_TOKEN: ${{ github.token }} + build: runs-on: ubuntu-latest - needs: test - if: github.ref == 'refs/heads/next' || github.ref == 'refs/heads/master' + needs: release + # if: github.ref == 'refs/heads/next' || github.ref == 'refs/heads/master' steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 token: ${{ secrets.TOKEN }} - - name: Python Semantic Release - uses: python-semantic-release/python-semantic-release@master - id: semantic-release + - uses: actions/setup-python@v5 with: - github_token: ${{ secrets.TOKEN }} + python-version: "3.12" + # - name: Python Semantic Release + # uses: python-semantic-release/python-semantic-release@master + # id: semantic-release + # with: + # github_token: ${{ secrets.TOKEN }} - name: Build run: | python3 -m pip install --upgrade build python3 -m build - - name: Upload PYPI - if: steps.semantic-release.outputs.released == 'true' + - name: Upload GH run: | - python3 -m pip install twine==6.0.1 - python3 -m twine upload --repository pypi dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }} - - name: Setup NODE - uses: actions/setup-node@v3 - with: - registry-url: "https://registry.npmjs.org" - node-version: "20.x" - - name: Upload NPM - if: steps.semantic-release.outputs.released == 'true' - run: | - pwd - cd ${{ github.workspace }} - npm i - npm run json - jq '.version="${{steps.semantic-release.outputs.version}}"' package.json > temp && mv temp package.json - cat package.json - npm publish + git config --global --add safe.directory $GITHUB_WORKSPACE + files="dist/*.whl" + for file in $files + do + echo $file + counter=0 + for i in 1 2 3 4 5; do gh release upload --clobber --repo $GITHUB_REPOSITORY ${{ github.head_ref }}-tag $file && break || counter=$[$counter +1] && sleep 30; done + echo $counter + if [ "$counter" -eq "5" ]; then exit 1; fi + done env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Merge master -> next - if: github.ref == 'refs/heads/master' - uses: devmasx/merge-branch@master - with: - type: now - from_branch: master - target_branch: next - github_token: ${{ secrets.TOKEN }} + GITHUB_TOKEN: ${{ github.token }} + # - name: Upload PYPI + # if: steps.semantic-release.outputs.released == 'true' + # run: | + # python3 -m pip install twine==6.0.1 + # python3 -m twine upload --repository pypi dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }} + # - name: Setup NODE + # uses: actions/setup-node@v3 + # with: + # registry-url: "https://registry.npmjs.org" + # node-version: "20.x" + # - name: Upload NPM + # if: steps.semantic-release.outputs.released == 'true' + # run: | + # pwd + # cd ${{ github.workspace }} + # npm i + # npm run json + # jq '.version="${{steps.semantic-release.outputs.version}}"' package.json > temp && mv temp package.json + # cat package.json + # npm publish + # env: + # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + # - name: Merge master -> next + # if: github.ref == 'refs/heads/master' + # uses: devmasx/merge-branch@master + # with: + # type: now + # from_branch: master + # target_branch: next + # github_token: ${{ secrets.TOKEN }} From 489263d6eec38056605934cc59a00cc8ca488d14 Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Thu, 31 Jul 2025 17:04:27 +0200 Subject: [PATCH 02/18] PR --- .github/workflows/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 27f40cc2..a6218e24 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -1,7 +1,7 @@ name: CICD on: - push: + pull_request: jobs: test: From 2da0320414aa16f22c0ce18c91242f68ce8c3958 Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Thu, 31 Jul 2025 17:19:35 +0200 Subject: [PATCH 03/18] test --- .github/workflows/CICD.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index a6218e24..d9b53d00 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -14,11 +14,11 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.12" - # - name: Test - # run: | - # pip install -r requirements.txt - # pip install pytest - # pytest + - name: Test + run: | + pip install -r requirements.txt + # pip install pytest + # pytest release: runs-on: ubuntu-latest From ab8625ded0bc8e1ff589d9bbfc82cdebc438b4eb Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Thu, 31 Jul 2025 17:26:06 +0200 Subject: [PATCH 04/18] 0.0.0 --- .github/workflows/CICD.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index d9b53d00..f0a100b7 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -69,6 +69,7 @@ jobs: # github_token: ${{ secrets.TOKEN }} - name: Build run: | + sed -i 's/version = "[0-9]*\.[0-9]*\.[0-9]*"/version = "0.0.0"/' pyproject.toml python3 -m pip install --upgrade build python3 -m build - name: Upload GH From 58bccdc4024b5b27dee8f4067b6a1e4e6f104721 Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Thu, 31 Jul 2025 17:31:17 +0200 Subject: [PATCH 05/18] handle rc --- .github/workflows/CICD.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index f0a100b7..6f811010 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -69,7 +69,9 @@ jobs: # github_token: ${{ secrets.TOKEN }} - name: Build run: | - sed -i 's/version = "[0-9]*\.[0-9]*\.[0-9]*"/version = "0.0.0"/' pyproject.toml + cat pyproject.toml + sed -i 's/version = "[0-9]*\.[0-9]*\.[0-9]*\(-rc\.[0-9]*\)\?"/version = "0.0.0"/' pyproject.toml + cat pyproject.toml python3 -m pip install --upgrade build python3 -m build - name: Upload GH From 898fc6be3d25f96d300d228315d5488ce1e6891a Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Fri, 1 Aug 2025 09:08:29 +0200 Subject: [PATCH 06/18] version 100 --- .github/workflows/CICD.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 6f811010..57b15f8c 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -69,8 +69,7 @@ jobs: # github_token: ${{ secrets.TOKEN }} - name: Build run: | - cat pyproject.toml - sed -i 's/version = "[0-9]*\.[0-9]*\.[0-9]*\(-rc\.[0-9]*\)\?"/version = "0.0.0"/' pyproject.toml + sed -i 's/version = "[0-9]*\.[0-9]*\.[0-9]*\(-rc\.[0-9]*\)\?"/version = "100.0.0"/' pyproject.toml cat pyproject.toml python3 -m pip install --upgrade build python3 -m build From fe3130dfbfea3dfffb65f2b691d463fbd59e9509 Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Fri, 1 Aug 2025 09:13:33 +0200 Subject: [PATCH 07/18] back to origin --- .github/workflows/CICD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 57b15f8c..c7eac0b6 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -69,7 +69,7 @@ jobs: # github_token: ${{ secrets.TOKEN }} - name: Build run: | - sed -i 's/version = "[0-9]*\.[0-9]*\.[0-9]*\(-rc\.[0-9]*\)\?"/version = "100.0.0"/' pyproject.toml + sed -i 's/version = "[0-9]*\.[0-9]*\.[0-9]*\(-rc\.[0-9]*\)\?"/version = "0.0.0"/' pyproject.toml cat pyproject.toml python3 -m pip install --upgrade build python3 -m build From f0ba5dc3d2d8c189c67bdd1aecfdd4ae482af4ff Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Fri, 1 Aug 2025 15:07:36 +0200 Subject: [PATCH 08/18] feat(Actions): new test workflows --- .github/workflows/CICD.yml | 119 ------------------------------- .github/workflows/prepare_pr.yml | 11 --- .github/workflows/test.yml | 14 ++++ .github/workflows/test_pr.yml | 12 ++++ 4 files changed, 26 insertions(+), 130 deletions(-) delete mode 100644 .github/workflows/CICD.yml delete mode 100644 .github/workflows/prepare_pr.yml create mode 100644 .github/workflows/test.yml create mode 100644 .github/workflows/test_pr.yml diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml deleted file mode 100644 index c7eac0b6..00000000 --- a/.github/workflows/CICD.yml +++ /dev/null @@ -1,119 +0,0 @@ -name: CICD - -on: - pull_request: - -jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-latest] - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - name: Test - run: | - pip install -r requirements.txt - # pip install pytest - # pytest - - release: - runs-on: ubuntu-latest - needs: [test] - steps: - - name: Create Release - uses: actions/github-script@v7 - with: - script: | - const refs = await github.rest.git.listMatchingRefs({ - owner: context.repo.owner, - repo: context.repo.repo, - ref: "tags/${{ github.head_ref }}-tag" - }) - console.log(refs) - if(refs.data.length > 0) { - console.log("Tag already exists, skipping release") - return - } - github.rest.repos.createRelease({ - owner: context.repo.owner, - repo: context.repo.repo, - tag_name: "${{ github.head_ref }}-tag", - name: "${{ github.head_ref }}", - prerelease: true, - target_commitish: "${{ github.head_ref }}" - }) - env: - GH_TOKEN: ${{ github.token }} - - build: - runs-on: ubuntu-latest - needs: release - # if: github.ref == 'refs/heads/next' || github.ref == 'refs/heads/master' - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: ${{ secrets.TOKEN }} - - uses: actions/setup-python@v5 - with: - python-version: "3.12" - # - name: Python Semantic Release - # uses: python-semantic-release/python-semantic-release@master - # id: semantic-release - # with: - # github_token: ${{ secrets.TOKEN }} - - name: Build - run: | - sed -i 's/version = "[0-9]*\.[0-9]*\.[0-9]*\(-rc\.[0-9]*\)\?"/version = "0.0.0"/' pyproject.toml - cat pyproject.toml - python3 -m pip install --upgrade build - python3 -m build - - name: Upload GH - run: | - git config --global --add safe.directory $GITHUB_WORKSPACE - files="dist/*.whl" - for file in $files - do - echo $file - counter=0 - for i in 1 2 3 4 5; do gh release upload --clobber --repo $GITHUB_REPOSITORY ${{ github.head_ref }}-tag $file && break || counter=$[$counter +1] && sleep 30; done - echo $counter - if [ "$counter" -eq "5" ]; then exit 1; fi - done - env: - GITHUB_TOKEN: ${{ github.token }} - # - name: Upload PYPI - # if: steps.semantic-release.outputs.released == 'true' - # run: | - # python3 -m pip install twine==6.0.1 - # python3 -m twine upload --repository pypi dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }} - # - name: Setup NODE - # uses: actions/setup-node@v3 - # with: - # registry-url: "https://registry.npmjs.org" - # node-version: "20.x" - # - name: Upload NPM - # if: steps.semantic-release.outputs.released == 'true' - # run: | - # pwd - # cd ${{ github.workspace }} - # npm i - # npm run json - # jq '.version="${{steps.semantic-release.outputs.version}}"' package.json > temp && mv temp package.json - # cat package.json - # npm publish - # env: - # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - # - name: Merge master -> next - # if: github.ref == 'refs/heads/master' - # uses: devmasx/merge-branch@master - # with: - # type: now - # from_branch: master - # target_branch: next - # github_token: ${{ secrets.TOKEN }} diff --git a/.github/workflows/prepare_pr.yml b/.github/workflows/prepare_pr.yml deleted file mode 100644 index 77f8181d..00000000 --- a/.github/workflows/prepare_pr.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Prepare PR - -on: - pull_request: - branches: - - next - -jobs: - prepare: - uses: Geode-solutions/actions/.github/workflows/py-prepare-pr.yml@master - secrets: inherit diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..e8193173 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,14 @@ +name: Test + +on: + push: + branches-ignore: + - master + - next + +jobs: + test: + uses: Geode-solutions/actions/.github/workflows/py-test.yml@master + with: + repos: ${{ vars.REPOS }} + secrets: inherit diff --git a/.github/workflows/test_pr.yml b/.github/workflows/test_pr.yml new file mode 100644 index 00000000..177cb915 --- /dev/null +++ b/.github/workflows/test_pr.yml @@ -0,0 +1,12 @@ +name: Test PR + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +jobs: + test: + uses: Geode-solutions/actions/.github/workflows/py-test-pr.yml@master + with: + repos: ${{ vars.REPOS }} + secrets: inherit From e5acd4931a6c0aaac9d956cf50c0f7e3e3859229 Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Fri, 1 Aug 2025 16:31:36 +0200 Subject: [PATCH 09/18] merge request v0 --- .github/workflows/Branch-protection.yml | 11 ----------- .github/workflows/merge_request.yml | 9 +++++++++ .github/workflows/pr_update.yml | 11 +++++++++++ 3 files changed, 20 insertions(+), 11 deletions(-) delete mode 100644 .github/workflows/Branch-protection.yml create mode 100644 .github/workflows/merge_request.yml create mode 100644 .github/workflows/pr_update.yml diff --git a/.github/workflows/Branch-protection.yml b/.github/workflows/Branch-protection.yml deleted file mode 100644 index c18d3a6a..00000000 --- a/.github/workflows/Branch-protection.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Check branch origin - -on: - pull_request: - -jobs: - check-branch-protection: - uses: Geode-solutions/actions/.github/workflows/branch-protection.yml@master - with: - branch_from: 'next' - branch_to: 'master' diff --git a/.github/workflows/merge_request.yml b/.github/workflows/merge_request.yml new file mode 100644 index 00000000..9f61f543 --- /dev/null +++ b/.github/workflows/merge_request.yml @@ -0,0 +1,9 @@ +name: Merge request + +on: + workflow_dispatch: + +jobs: + release: + uses: Geode-solutions/actions/.github/workflows/py-merge-request.yml@master + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/pr_update.yml b/.github/workflows/pr_update.yml new file mode 100644 index 00000000..9743601e --- /dev/null +++ b/.github/workflows/pr_update.yml @@ -0,0 +1,11 @@ +name: Pull request + +on: + pull_request: + types: [opened, reopened] + branches: + - master + +jobs: + update-branch: + uses: Geode-solutions/actions/.github/workflows/update-branch.yml@master \ No newline at end of file From 8db649d3f0b9f756319e5591b5b27c72443c3292 Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Mon, 4 Aug 2025 16:14:19 +0200 Subject: [PATCH 10/18] add merge-request --- .github/workflows/deploy.yml | 10 ++++ .github/workflows/prepare_deploy.yml | 9 +++ requirements.in | 25 ++++----- requirements.txt | 83 ++++------------------------ 4 files changed, 40 insertions(+), 87 deletions(-) create mode 100644 .github/workflows/deploy.yml create mode 100644 .github/workflows/prepare_deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..b5e99a4d --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,10 @@ +name: Deploy + +on: + workflow_dispatch: + +jobs: + deploy: + uses: Geode-solutions/actions/.github/workflows/py-deploy.yml@master + secrets: inherit + \ No newline at end of file diff --git a/.github/workflows/prepare_deploy.yml b/.github/workflows/prepare_deploy.yml new file mode 100644 index 00000000..4c8536cf --- /dev/null +++ b/.github/workflows/prepare_deploy.yml @@ -0,0 +1,9 @@ +name: Prepare deploy + +on: + workflow_dispatch: + +jobs: + prepare: + uses: Geode-solutions/actions/.github/workflows/py-prepare-deploy.yml@master + secrets: inherit diff --git a/requirements.in b/requirements.in index a9f7d46d..d26ad0fa 100644 --- a/requirements.in +++ b/requirements.in @@ -1,15 +1,10 @@ -OpenGeode-core -OpenGeode-IO -OpenGeode-Inspector -OpenGeode-Geosciences -OpenGeode-GeosciencesIO -Geode-Viewables -geode-numerics -geode-simplex -geode-explicit -geode-implicit -geode-common -fastjsonschema -Flask[async] -Flask-Cors -werkzeug \ No newline at end of file +OpenGeode-core==15.21.2 +OpenGeode-IO==7.2.1 +OpenGeode-Inspector==6.6.1 +OpenGeode-Geosciences==9.0.0 +OpenGeode-GeosciencesIO==5.4.2 +Geode-Viewables==3.1.4 +fastjsonschema==2.16.2 +Flask[async]==3.0.3 +Flask-Cors==6.0.1 +werkzeug==3.0.3 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 4260add6..277143c5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,60 +2,24 @@ # This file is autogenerated by pip-compile with Python 3.12 # by the following command: # -# pip-compile requirements.in +# pip-compile --output-file=requirements.txt requirements.in # -asgiref==3.8.1 +asgiref==3.9.1 # via flask -attrs==25.3.0 - # via - # jsonschema - # referencing blinker==1.9.0 # via flask click==8.2.1 # via flask -fastjsonschema==2.21.1 -# via -r requirements.in -flask[async]==3.1.1 +fastjsonschema==2.16.2 + # via -r requirements.in +flask[async]==3.*,>=3.0.3 # via # -r requirements.in # flask-cors flask-cors==6.0.1 # via -r requirements.in -geode-background==9.2.9 - # via - # geode-explicit - # geode-implicit - # geode-simplex geode-common==33.8.8 - # via - # -r requirements.in - # geode-background - # geode-conversion - # geode-explicit - # geode-implicit - # geode-numerics - # geode-simplex - # geode-viewables -geode-conversion==6.3.3 - # via - # geode-explicit - # geode-implicit -geode-explicit==6.2.3 - # via - # -r requirements.in - # geode-implicit -geode-implicit==3.9.4 - # via -r requirements.in -geode-numerics==6.2.2 - # via - # -r requirements.in - # geode-implicit - # geode-simplex -geode-simplex==9.4.2 - # via - # -r requirements.in - # geode-implicit + # via geode-viewables geode-viewables==3.1.4 # via -r requirements.in itsdangerous==2.2.0 @@ -64,19 +28,12 @@ jinja2==3.1.6 # via flask markupsafe==3.0.2 # via - # flask # jinja2 # werkzeug opengeode-core==15.21.2 # via # -r requirements.in - # geode-background # geode-common - # geode-conversion - # geode-explicit - # geode-implicit - # geode-numerics - # geode-simplex # geode-viewables # opengeode-geosciences # opengeode-geosciencesio @@ -85,37 +42,19 @@ opengeode-core==15.21.2 opengeode-geosciences==9.0.0 # via # -r requirements.in - # geode-implicit # geode-viewables # opengeode-geosciencesio opengeode-geosciencesio==5.4.2 - # via - # -r requirements.in - # geode-implicit + # via -r requirements.in opengeode-inspector==6.6.1 + # via -r requirements.in +opengeode-io==7.*,>=7.2.1 # via # -r requirements.in - # geode-explicit - # geode-implicit - # geode-simplex -opengeode-io==7.2.1 - # via - # -r requirements.in - # geode-implicit # geode-viewables # opengeode-geosciencesio -referencing==0.36.2 - # via - # jsonschema - # jsonschema-specifications -rpds-py==0.25.1 - # via - # jsonschema - # referencing -typing-extensions==4.14.0 - # via referencing -werkzeug==3.1.3 +werkzeug==3.0.3 # via # -r requirements.in # flask - # flask-cors \ No newline at end of file + # flask-cors From 7c57ae59aa5a072b243a2f0653ab7ca87e932634 Mon Sep 17 00:00:00 2001 From: BotellaA <3213882+BotellaA@users.noreply.github.com> Date: Mon, 4 Aug 2025 14:17:09 +0000 Subject: [PATCH 11/18] Apply prepare changes --- requirements.txt | 62 +++++++++++++++++++++++- src/opengeodeweb_back/utils_functions.py | 30 ++++++------ tests/test_utils_functions.py | 1 - 3 files changed, 75 insertions(+), 18 deletions(-) diff --git a/requirements.txt b/requirements.txt index 8b137891..06c13bfd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,61 @@ - +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --pre requirements.in +# +asgiref==3.9.1 + # via flask +blinker==1.9.0 + # via flask +click==8.2.1 + # via flask +fastjsonschema==2.16.2 + # via -r requirements.in +flask[async]==3.0.3 + # via + # -r requirements.in + # flask + # flask-cors +flask-cors==6.0.1 + # via -r requirements.in +geode-common==33.8.8 + # via geode-viewables +geode-viewables==3.1.4 + # via -r requirements.in +itsdangerous==2.2.0 + # via flask +jinja2==3.1.6 + # via flask +markupsafe==3.0.2 + # via + # jinja2 + # werkzeug +opengeode-core==15.21.2 + # via + # -r requirements.in + # geode-common + # geode-viewables + # opengeode-geosciences + # opengeode-geosciencesio + # opengeode-inspector + # opengeode-io +opengeode-geosciences==9.0.0 + # via + # -r requirements.in + # geode-viewables + # opengeode-geosciencesio +opengeode-geosciencesio==5.4.2 + # via -r requirements.in +opengeode-inspector==6.6.1 + # via -r requirements.in +opengeode-io==7.2.1 + # via + # -r requirements.in + # geode-viewables + # opengeode-geosciencesio +werkzeug==3.0.3 + # via + # -r requirements.in + # flask + # flask-cors diff --git a/src/opengeodeweb_back/utils_functions.py b/src/opengeodeweb_back/utils_functions.py index e07733df..fc1aa143 100644 --- a/src/opengeodeweb_back/utils_functions.py +++ b/src/opengeodeweb_back/utils_functions.py @@ -154,11 +154,8 @@ def create_unique_data_folder() -> tuple[str, str]: def save_all_viewables_and_return_info( - geode_object, - data, generated_id, - data_path, - additional_files=None - ): + geode_object, data, generated_id, data_path, additional_files=None +): saved_native_file_path = geode_functions.save( geode_object, data, @@ -185,22 +182,21 @@ def save_all_viewables_and_return_info( "input_files": additional_files or [], } -def generate_native_viewable_and_light_viewable_from_object( - geode_object, - data - ): + +def generate_native_viewable_and_light_viewable_from_object(geode_object, data): generated_id, data_path = create_unique_data_folder() - return save_all_viewables_and_return_info(geode_object, data, generated_id, data_path) + return save_all_viewables_and_return_info( + geode_object, data, generated_id, data_path + ) -def generate_native_viewable_and_light_viewable_from_file( - geode_object, - input_filename - ): +def generate_native_viewable_and_light_viewable_from_file(geode_object, input_filename): generated_id, data_path = create_unique_data_folder() full_input_filename = geode_functions.upload_file_path(input_filename) - copied_full_path = os.path.join(data_path, werkzeug.utils.secure_filename(input_filename)) + copied_full_path = os.path.join( + data_path, werkzeug.utils.secure_filename(input_filename) + ) shutil.copy2(full_input_filename, copied_full_path) additional_files_copied = [] @@ -208,7 +204,9 @@ def generate_native_viewable_and_light_viewable_from_file( for additional_file in additional.mandatory_files + additional.optional_files: if additional_file.is_missing: continue - source_path = os.path.join(os.path.dirname(full_input_filename), additional_file.filename) + source_path = os.path.join( + os.path.dirname(full_input_filename), additional_file.filename + ) if not os.path.exists(source_path): continue dest_path = os.path.join(data_path, additional_file.filename) diff --git a/tests/test_utils_functions.py b/tests/test_utils_functions.py index 5285a404..52282717 100644 --- a/tests/test_utils_functions.py +++ b/tests/test_utils_functions.py @@ -85,7 +85,6 @@ def test_create_unique_data_folder(client): assert not os.path.exists(data_path) - def test_save_all_viewables_and_return_info(client): app = client.application with app.app_context(): From 27de5e811bdaf19c8af109619f8c37e270ed82c0 Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Mon, 4 Aug 2025 16:20:57 +0200 Subject: [PATCH 12/18] update requirements --- requirements.in | 2 +- requirements.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.in b/requirements.in index d26ad0fa..de30601b 100644 --- a/requirements.in +++ b/requirements.in @@ -1,4 +1,4 @@ -OpenGeode-core==15.21.2 +OpenGeode-core==15.24.1 OpenGeode-IO==7.2.1 OpenGeode-Inspector==6.6.1 OpenGeode-Geosciences==9.0.0 diff --git a/requirements.txt b/requirements.txt index 06c13bfd..82a7af1c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.12 # by the following command: # -# pip-compile --pre requirements.in +# pip-compile # asgiref==3.9.1 # via flask @@ -31,7 +31,7 @@ markupsafe==3.0.2 # via # jinja2 # werkzeug -opengeode-core==15.21.2 +opengeode-core==15.24.1 # via # -r requirements.in # geode-common From 103c8d417214417b18b947d8575ff61c07a58a71 Mon Sep 17 00:00:00 2001 From: BotellaA <3213882+BotellaA@users.noreply.github.com> Date: Mon, 4 Aug 2025 14:21:31 +0000 Subject: [PATCH 13/18] Apply prepare changes --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 82a7af1c..cdbe4d76 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.12 # by the following command: # -# pip-compile +# pip-compile --pre requirements.in # asgiref==3.9.1 # via flask @@ -19,7 +19,7 @@ flask[async]==3.0.3 # flask-cors flask-cors==6.0.1 # via -r requirements.in -geode-common==33.8.8 +geode-common==33.9.0 # via geode-viewables geode-viewables==3.1.4 # via -r requirements.in From 5477eb8d223a45eca3fe806cbdc3437ea7a3812c Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Mon, 4 Aug 2025 16:25:07 +0200 Subject: [PATCH 14/18] update --- requirements.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.in b/requirements.in index de30601b..36949c0a 100644 --- a/requirements.in +++ b/requirements.in @@ -1,8 +1,8 @@ OpenGeode-core==15.24.1 -OpenGeode-IO==7.2.1 -OpenGeode-Inspector==6.6.1 -OpenGeode-Geosciences==9.0.0 -OpenGeode-GeosciencesIO==5.4.2 +OpenGeode-IO==7.3.1 +OpenGeode-Inspector==6.7.0 +OpenGeode-Geosciences==9.2.1 +OpenGeode-GeosciencesIO==5.7.1 Geode-Viewables==3.1.4 fastjsonschema==2.16.2 Flask[async]==3.0.3 From ac5cae10363b930bd0a2130bf8831c3fbbf27e2d Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Mon, 4 Aug 2025 16:25:26 +0200 Subject: [PATCH 15/18] update --- requirements.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.in b/requirements.in index 36949c0a..53896aba 100644 --- a/requirements.in +++ b/requirements.in @@ -3,7 +3,7 @@ OpenGeode-IO==7.3.1 OpenGeode-Inspector==6.7.0 OpenGeode-Geosciences==9.2.1 OpenGeode-GeosciencesIO==5.7.1 -Geode-Viewables==3.1.4 +Geode-Viewables==3.2.0 fastjsonschema==2.16.2 Flask[async]==3.0.3 Flask-Cors==6.0.1 From 33ab12eacf463b66e81c0a99e1c3ff8372c75b21 Mon Sep 17 00:00:00 2001 From: BotellaA <3213882+BotellaA@users.noreply.github.com> Date: Mon, 4 Aug 2025 14:25:34 +0000 Subject: [PATCH 16/18] Apply prepare changes --- requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index cdbe4d76..110a58ea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -40,16 +40,16 @@ opengeode-core==15.24.1 # opengeode-geosciencesio # opengeode-inspector # opengeode-io -opengeode-geosciences==9.0.0 +opengeode-geosciences==9.2.1 # via # -r requirements.in # geode-viewables # opengeode-geosciencesio -opengeode-geosciencesio==5.4.2 +opengeode-geosciencesio==5.7.1 # via -r requirements.in -opengeode-inspector==6.6.1 +opengeode-inspector==6.7.0 # via -r requirements.in -opengeode-io==7.2.1 +opengeode-io==7.3.1 # via # -r requirements.in # geode-viewables From 07fa0fcae070fa4512280f8dd071da97aa806c75 Mon Sep 17 00:00:00 2001 From: JulienChampagnol <91873154+JulienChampagnol@users.noreply.github.com> Date: Mon, 4 Aug 2025 14:26:58 +0000 Subject: [PATCH 17/18] Apply prepare changes --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 110a58ea..7b5af813 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,7 +21,7 @@ flask-cors==6.0.1 # via -r requirements.in geode-common==33.9.0 # via geode-viewables -geode-viewables==3.1.4 +geode-viewables==3.2.0 # via -r requirements.in itsdangerous==2.2.0 # via flask From b52726c431e261038ef7f34e608aac43c5c4efcb Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Mon, 4 Aug 2025 16:30:17 +0200 Subject: [PATCH 18/18] deploy npm --- .github/workflows/deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b5e99a4d..35ffc1c3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,5 +6,7 @@ on: jobs: deploy: uses: Geode-solutions/actions/.github/workflows/py-deploy.yml@master + with: + npm: true secrets: inherit \ No newline at end of file