From bdbfdcc38af199b92bf6b335f9decf14f521a8a2 Mon Sep 17 00:00:00 2001 From: s-heppner Date: Mon, 9 Feb 2026 14:54:15 +0100 Subject: [PATCH 1/3] Improve CI.yml definition (#453) Previously, we had some weird bugs with the CI pipeline sometimes failing (#400), but not always reproducible. Namely, sometimes the CI failed, due to `mypy` not finding the `sdk` types when running from the `compliance_tool` environment. Since currently, we are at a point where it is impossible to reproduce the failing CI (at least for me), I decided to clean up the job definitions a little bit and make some things more explicit. Namely, instead of calling scripts like `pip` or `mypy` from their PATH, we now explicitly call them via `python -m pip` and `python -m mypy`. This theoretically ensures, that it always uses the script we just installed with the dependencies and not something the VM already had in its path via `actions/setup-python@v5`. This should ensure that a script like `mypy` actually has all the necessary dependencies installed. Secondly, we had a `pip install -e ../sdk[dev]`, therefore installing the development dependencies of the `sdk` in the `compliance_tool` CI check. This is technically incorrect, since we use the `sdk` as external dependency and therefore shouldn't depend on the development dependencies. I therefore removed this. Lastly, the `sdk-readme-codeblocks` check uses `bash` syntax. In theory, the Ubuntu environment should use `bash` by default, but now it is made explicit. Fixes #400 (hopefully) --- .github/workflows/ci.yml | 53 ++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da22ee48..caab87d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip - pip install -r ./check_python_versions_requirements.txt + python -m pip install -r ./check_python_versions_requirements.txt - name: Check Supported Python Versions run: | python check_python_versions_supported.py \ @@ -85,17 +85,17 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip - pip install .[dev] + python -m pip install .[dev] - name: Setup test config and CouchDB database server run: | python test/_helper/setup_testdb.py -u "admin" -p "$COUCHDB_ADMIN_PASSWORD" - name: Test with coverage + unittest run: | - coverage run --source=basyx -m unittest + python -m coverage run --source=basyx -m unittest - name: Report test coverage if: ${{ always() }} run: | - coverage report -m + python -m coverage report -m sdk-static-analysis: # This job runs static code analysis, namely pycodestyle and mypy @@ -112,13 +112,13 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip - pip install .[dev] + python -m pip install .[dev] - name: Check typing with MyPy run: | - mypy basyx test + python -m mypy basyx test - name: Check code style with PyCodestyle run: | - pycodestyle --count --max-line-length 120 basyx test + python -m pycodestyle --count --max-line-length 120 basyx test sdk-readme-codeblocks: # This job runs the same static code analysis (mypy and pycodestyle) on the codeblocks in our docstrings. @@ -135,16 +135,17 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip - pip install .[dev] + python -m pip install .[dev] - name: Check typing with MyPy + shell: bash run: | - mypy <(codeblocks python README.md) + python -m mypy <(python -m codeblocks python README.md) - name: Check code style with PyCodestyle run: | - codeblocks --wrap python README.md | pycodestyle --count --max-line-length 120 - + python -m codeblocks --wrap python README.md | python -m pycodestyle --count --max-line-length 120 - - name: Run readme codeblocks with Python run: | - codeblocks python README.md | python + python -m codeblocks python README.md | python sdk-docs: # This job checks, if the automatically generated documentation using sphinx can be compiled @@ -161,7 +162,7 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip - pip install .[docs] + python -m pip install .[docs] - name: Check documentation for errors run: | SPHINXOPTS="-a -E -n -W --keep-going" make -C docs html @@ -181,7 +182,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install build + python -m pip install build - name: Create source and wheel dist run: | python -m build @@ -223,15 +224,15 @@ jobs: # install the local sdk in editable mode so it does not get overwritten run: | python -m pip install --upgrade pip - pip install -e ../sdk[dev] - pip install .[dev] + python -m pip install ../sdk + python -m pip install .[dev] - name: Test with coverage + unittest run: | - coverage run --source=aas_compliance_tool -m unittest + python -m coverage run --source=aas_compliance_tool -m unittest - name: Report test coverage if: ${{ always() }} run: | - coverage report -m + python -m coverage report -m compliance-tool-static-analysis: # This job runs static code analysis, namely pycodestyle and mypy @@ -250,14 +251,14 @@ jobs: # install the local sdk in editable mode so it does not get overwritten run: | python -m pip install --upgrade pip - pip install -e ../sdk[dev] - pip install .[dev] + python -m pip install ../sdk + python -m pip install .[dev] - name: Check typing with MyPy run: | - mypy aas_compliance_tool test + python -m mypy aas_compliance_tool test - name: Check code style with PyCodestyle run: | - pycodestyle --count --max-line-length 120 aas_compliance_tool test + python -m pycodestyle --count --max-line-length 120 aas_compliance_tool test compliance-tool-package: # This job checks if we can build our compliance_tool package @@ -275,7 +276,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install build + python -m pip install build - name: Create source and wheel dist run: | python -m build @@ -301,14 +302,14 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip - pip install ../../sdk - pip install .[dev] + python -m pip install ../../sdk + python -m pip install .[dev] - name: Check typing with MyPy run: | - mypy . + python -m mypy . - name: Check code style with PyCodestyle run: | - pycodestyle --count --max-line-length 120 . + python -m pycodestyle --count --max-line-length 120 . server-package: # This job checks if we can build our server package From 55333f6514cbf7255113b859a4c1f6e2904f0211 Mon Sep 17 00:00:00 2001 From: Sercan Sahin <125310380+Frosty2500@users.noreply.github.com> Date: Mon, 20 Apr 2026 15:21:17 +0200 Subject: [PATCH 2/3] release.yml: Implement CI for publishing server image on DockerHub (#375) This adds a `server-publish` configuration that publishes the server Docker image on DockerHub. The logic is in line with the basyx-java-server. --------- Co-authored-by: s-heppner --- .github/workflows/release.yml | 43 ++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 06491c0c..7c325d30 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: jobs: sdk-publish: - # This job publishes the SDK package to PyPI + # This job publishes the package to PyPI runs-on: ubuntu-latest defaults: run: @@ -58,3 +58,44 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_ORG_TOKEN }} + + server-publish: + # This job publishes the server docker image to DockerHub + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./server + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Extract Docker image metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: eclipsebasyx/basyx-python-server + # This fetches the latest git tag and adds an additional "latest" to it, so e.g. `2.1.0,latest` + tags: | + type=semver,pattern={{version}} + type=raw,value=latest + labels: | + org.opencontainers.image.title=BaSyx Python Server + org.opencontainers.image.description=Eclipse BaSyx Python SDK - HTTP Server + org.opencontainers.image.source=https://github.com/eclipse-basyx/basyx-python-sdk/tree/main/server + org.opencontainers.image.licenses=MIT + + - name: Log in to Docker Hub + uses: docker/login-action@v4 + with: + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} + + - name: Build and Push Docker Image + uses: docker/build-push-action@v6 + with: + context: . + file: ./server/Dockerfile # Todo: Update paths + push: true + platforms: linux/amd64,linux/arm64 # Todo: Check which platforms we should support + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} From c128a5202a77e548c7c5b69a9a63f2eaf113af52 Mon Sep 17 00:00:00 2001 From: s-heppner Date: Mon, 20 Apr 2026 15:37:21 +0200 Subject: [PATCH 3/3] Remove multiplatform support from DockerHub publishing for now (#481) Remove multiplatform support from DockerHub publishing for now --------- Co-authored-by: Sercan Sahin --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7c325d30..2f147c17 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -96,6 +96,5 @@ jobs: context: . file: ./server/Dockerfile # Todo: Update paths push: true - platforms: linux/amd64,linux/arm64 # Todo: Check which platforms we should support tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}