Skip to content

Commit 6daa75c

Browse files
committed
Merge branch 'develop' into update/api_V3.1
2 parents 54473f0 + a53e228 commit 6daa75c

97 files changed

Lines changed: 3722 additions & 5907 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: ci
33
on: [push, pull_request]
44

55
env:
6-
X_PYTHON_MIN_VERSION: "3.9"
6+
X_PYTHON_MIN_VERSION: "3.10"
77
X_PYTHON_MAX_VERSION: "3.12"
88

99
jobs:
@@ -22,7 +22,7 @@ jobs:
2222
- name: Install Python dependencies
2323
run: |
2424
python -m pip install --upgrade pip
25-
pip install -r ./check_python_versions_requirements.txt
25+
python -m pip install -r ./check_python_versions_requirements.txt
2626
- name: Check Supported Python Versions
2727
run: |
2828
python check_python_versions_supported.py \
@@ -45,7 +45,7 @@ jobs:
4545
runs-on: ubuntu-latest
4646
strategy:
4747
matrix:
48-
python-version: ["3.9", "3.12"]
48+
python-version: ["3.10", "3.12"]
4949
env:
5050
COUCHDB_ADMIN_PASSWORD: "yo0Quai3"
5151
# (2024-10-11, s-heppner)
@@ -85,17 +85,17 @@ jobs:
8585
- name: Install Python dependencies
8686
run: |
8787
python -m pip install --upgrade pip
88-
pip install .[dev]
88+
python -m pip install .[dev]
8989
- name: Setup test config and CouchDB database server
9090
run: |
9191
python test/_helper/setup_testdb.py -u "admin" -p "$COUCHDB_ADMIN_PASSWORD"
9292
- name: Test with coverage + unittest
9393
run: |
94-
coverage run --source=basyx -m unittest
94+
python -m coverage run --source=basyx -m unittest
9595
- name: Report test coverage
9696
if: ${{ always() }}
9797
run: |
98-
coverage report -m
98+
python -m coverage report -m
9999
100100
sdk-static-analysis:
101101
# This job runs static code analysis, namely pycodestyle and mypy
@@ -112,13 +112,13 @@ jobs:
112112
- name: Install Python dependencies
113113
run: |
114114
python -m pip install --upgrade pip
115-
pip install .[dev]
115+
python -m pip install .[dev]
116116
- name: Check typing with MyPy
117117
run: |
118-
mypy basyx test
118+
python -m mypy basyx test
119119
- name: Check code style with PyCodestyle
120120
run: |
121-
pycodestyle --count --max-line-length 120 basyx test
121+
python -m pycodestyle --count --max-line-length 120 basyx test
122122
123123
sdk-readme-codeblocks:
124124
# This job runs the same static code analysis (mypy and pycodestyle) on the codeblocks in our docstrings.
@@ -135,16 +135,17 @@ jobs:
135135
- name: Install Python dependencies
136136
run: |
137137
python -m pip install --upgrade pip
138-
pip install .[dev]
138+
python -m pip install .[dev]
139139
- name: Check typing with MyPy
140+
shell: bash
140141
run: |
141-
mypy <(codeblocks python README.md)
142+
python -m mypy <(python -m codeblocks python README.md)
142143
- name: Check code style with PyCodestyle
143144
run: |
144-
codeblocks --wrap python README.md | pycodestyle --count --max-line-length 120 -
145+
python -m codeblocks --wrap python README.md | python -m pycodestyle --count --max-line-length 120 -
145146
- name: Run readme codeblocks with Python
146147
run: |
147-
codeblocks python README.md | python
148+
python -m codeblocks python README.md | python
148149
149150
sdk-docs:
150151
# This job checks, if the automatically generated documentation using sphinx can be compiled
@@ -161,7 +162,7 @@ jobs:
161162
- name: Install Python dependencies
162163
run: |
163164
python -m pip install --upgrade pip
164-
pip install .[docs]
165+
python -m pip install .[docs]
165166
- name: Check documentation for errors
166167
run: |
167168
SPHINXOPTS="-a -E -n -W --keep-going" make -C docs html
@@ -181,7 +182,7 @@ jobs:
181182
- name: Install dependencies
182183
run: |
183184
python -m pip install --upgrade pip
184-
pip install build
185+
python -m pip install build
185186
- name: Create source and wheel dist
186187
run: |
187188
python -m build
@@ -208,7 +209,7 @@ jobs:
208209
runs-on: ubuntu-latest
209210
strategy:
210211
matrix:
211-
python-version: ["3.9", "3.12"]
212+
python-version: ["3.10", "3.12"]
212213
defaults:
213214
run:
214215
working-directory: ./compliance_tool
@@ -223,15 +224,15 @@ jobs:
223224
# install the local sdk in editable mode so it does not get overwritten
224225
run: |
225226
python -m pip install --upgrade pip
226-
pip install -e ../sdk[dev]
227-
pip install .[dev]
227+
python -m pip install ../sdk
228+
python -m pip install .[dev]
228229
- name: Test with coverage + unittest
229230
run: |
230-
coverage run --source=aas_compliance_tool -m unittest
231+
python -m coverage run --source=aas_compliance_tool -m unittest
231232
- name: Report test coverage
232233
if: ${{ always() }}
233234
run: |
234-
coverage report -m
235+
python -m coverage report -m
235236
236237
compliance-tool-static-analysis:
237238
# This job runs static code analysis, namely pycodestyle and mypy
@@ -250,14 +251,14 @@ jobs:
250251
# install the local sdk in editable mode so it does not get overwritten
251252
run: |
252253
python -m pip install --upgrade pip
253-
pip install -e ../sdk[dev]
254-
pip install .[dev]
254+
python -m pip install ../sdk
255+
python -m pip install .[dev]
255256
- name: Check typing with MyPy
256257
run: |
257-
mypy aas_compliance_tool test
258+
python -m mypy aas_compliance_tool test
258259
- name: Check code style with PyCodestyle
259260
run: |
260-
pycodestyle --count --max-line-length 120 aas_compliance_tool test
261+
python -m pycodestyle --count --max-line-length 120 aas_compliance_tool test
261262
262263
compliance-tool-package:
263264
# This job checks if we can build our compliance_tool package
@@ -275,7 +276,7 @@ jobs:
275276
- name: Install dependencies
276277
run: |
277278
python -m pip install --upgrade pip
278-
pip install build
279+
python -m pip install build
279280
- name: Create source and wheel dist
280281
run: |
281282
python -m build
@@ -291,7 +292,7 @@ jobs:
291292

292293
defaults:
293294
run:
294-
working-directory: ./server/app
295+
working-directory: ./server
295296
steps:
296297
- uses: actions/checkout@v4
297298
- name: Set up Python ${{ env.X_PYTHON_MIN_VERSION }}
@@ -301,26 +302,26 @@ jobs:
301302
- name: Install Python dependencies
302303
run: |
303304
python -m pip install --upgrade pip
304-
pip install ../../sdk
305-
pip install .[dev]
305+
python -m pip install ../sdk
306+
python -m pip install .[dev]
306307
- name: Check typing with MyPy
307308
run: |
308-
mypy .
309+
python -m mypy app test
309310
- name: Check code style with PyCodestyle
310311
run: |
311-
pycodestyle --count --max-line-length 120 .
312+
python -m pycodestyle --count --max-line-length 120 app test
312313
313-
server-package:
314+
server-repository-docker:
314315
# This job checks if we can build our server package
315316
runs-on: ubuntu-latest
316317
defaults:
317318
run:
318-
working-directory: ./server
319+
working-directory: ./server/docker/repository
319320
steps:
320321
- uses: actions/checkout@v4
321322
- name: Build the Docker image
322323
run: |
323-
docker build -t basyx-python-server -f Dockerfile ..
324+
docker build -t basyx-python-server -f Dockerfile ../../..
324325
- name: Run container
325326
run: |
326327
docker run -d --name basyx-python-server basyx-python-server

.github/workflows/release.yml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
sdk-publish:
9-
# This job publishes the SDK package to PyPI
9+
# This job publishes the package to PyPI
1010
runs-on: ubuntu-latest
1111
defaults:
1212
run:
@@ -58,3 +58,43 @@ jobs:
5858
uses: pypa/gh-action-pypi-publish@release/v1
5959
with:
6060
password: ${{ secrets.PYPI_ORG_TOKEN }}
61+
62+
server-publish:
63+
# This job publishes the server docker image to DockerHub
64+
runs-on: ubuntu-latest
65+
defaults:
66+
run:
67+
working-directory: ./server
68+
steps:
69+
- name: Checkout Repository
70+
uses: actions/checkout@v4
71+
72+
- name: Extract Docker image metadata
73+
id: meta
74+
uses: docker/metadata-action@v5
75+
with:
76+
images: eclipsebasyx/basyx-python-server
77+
# This fetches the latest git tag and adds an additional "latest" to it, so e.g. `2.1.0,latest`
78+
tags: |
79+
type=semver,pattern={{version}}
80+
type=raw,value=latest
81+
labels: |
82+
org.opencontainers.image.title=BaSyx Python Server
83+
org.opencontainers.image.description=Eclipse BaSyx Python SDK - HTTP Server
84+
org.opencontainers.image.source=https://github.com/eclipse-basyx/basyx-python-sdk/tree/main/server
85+
org.opencontainers.image.licenses=MIT
86+
87+
- name: Log in to Docker Hub
88+
uses: docker/login-action@v4
89+
with:
90+
username: ${{ secrets.DOCKER_HUB_USER }}
91+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
92+
93+
- name: Build and Push Docker Image
94+
uses: docker/build-push-action@v6
95+
with:
96+
context: .
97+
file: ./server/Dockerfile # Todo: Update paths
98+
push: true
99+
tags: ${{ steps.meta.outputs.tags }}
100+
labels: ${{ steps.meta.outputs.labels }}

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ htmlcov/
2121
docs/build/
2222
.hypothesis/
2323

24-
# customized config files
24+
# Customized config files
2525
sdk/test/test_config.ini
2626
# Schema files needed for testing
2727
sdk/test/adapter/schemas
@@ -31,5 +31,6 @@ sdk/basyx/version.py
3131
compliance_tool/aas_compliance_tool/version.py
3232
server/app/version.py
3333

34-
# ignore the content of the server storage
34+
# Ignore the content of the server storage
35+
server/input/
3536
server/storage/

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019-2022 the Eclipse BaSyx Authors
3+
Copyright (c) 2019-2026 the Eclipse BaSyx Authors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Eclipse BaSyx Python SDK
22

3-
(formerly known as PyI40AAS – Python Industry 4.0 Asset Administration Shell)
4-
53
The Eclipse BaSyx Python project focuses on providing a Python implementation of the Asset Administration Shell (AAS)
6-
for Industry 4.0 Systems.
7-
These are the currently implemented specifications:
4+
for Industry 4.0 Systems.
5+
6+
**Please note that the SDK version number is independent of the supported AAS versions!**
7+
8+
These are the implemented AAS specifications of the [current SDK release](https://github.com/eclipse-basyx/basyx-python-sdk/releases/latest), which can be also found on [PyPI](https://pypi.org/project/basyx-python-sdk/):
89

910
| Specification | Version |
1011
|---------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
@@ -14,6 +15,9 @@ These are the currently implemented specifications:
1415
| Part 3a: Data Specification IEC 61360 | [v3.0 (01003-a-3-0)](https://industrialdigitaltwin.org/wp-content/uploads/2023/04/IDTA-01003-a-3-0_SpecificationAssetAdministrationShell_Part3a_DataSpecification_IEC61360.pdf) |
1516
| Part 5: Package File Format (AASX) | [v3.0 (01005-3-0)](https://industrialdigitaltwin.org/wp-content/uploads/2023/04/IDTA-01005-3-0_SpecificationAssetAdministrationShell_Part5_AASXPackageFileFormat.pdf) |
1617

18+
If you need support to an older version of the specifications, please refer to our [prior releases](https://github.com/eclipse-basyx/basyx-python-sdk/releases).
19+
Each of them has a similar table at the top of the release notes.
20+
1721
## Features
1822
This repository is structured into separate packages.
1923
The `sdk` directory provides the AAS metamodel as Python objects and fundamental functionalities to handle AAS.

0 commit comments

Comments
 (0)