Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/build-test-docs.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

name: Build-test docs

on:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

name: CI

on:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

# Based on https://github.com/actions/starter-workflows/blob/main/ci/python-publish.yml
name: Publish to Pypi

Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

name: Reuse

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
Reuse:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install reuse
run: |
python3 -m pip install --upgrade pip
pip3 install reuse==6.3.0

- name: Check the REUSE compliance
run: reuse lint
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

# aas core meta model data

dev_scripts/code_gen/meta_model.py
Expand Down
3 changes: 3 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Marko Ristin (marko@ristin.ch, marko.ristin@gmail.com, rist@zhaw.ch) for Zurich University of Applied Sciences (ZHAW)
Tobias Langer (tobias.langer@conplement.de) for conplement AG
Aaron Zielstorff (aaron.zielstorff@iese.fraunhofer.de) for Fraunhofer Institute for Experimental Software Engineering (IESE)
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2026 aas-core-works
Copyright (c) 2026 aas-core3.2-python AUTHORS

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
156 changes: 156 additions & 0 deletions LICENSES/CC-BY-4.0.txt

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions LICENSES/MIT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
MIT License

Copyright (c) <year> <copyright holders>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
53 changes: 53 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

version = 1

# Prose and metadata where a header would end up in the rendered output
# (e.g., README shown on PyPI, the documentation) or which can not carry
# a comment.
[[annotations]]
path = [
"AUTHORS",
"README.rst",
"docs/**/*.rst",
"docs/**/*.md",
"aas_core3_2/py.typed",
"dev/dev_scripts/.python-version",
]
precedence = "aggregate"
SPDX-FileCopyrightText = "2026 aas-core3.2-python AUTHORS"
SPDX-License-Identifier = "MIT"

# The snippets are inserted verbatim into the generated code by aas-core-codegen,
# so they must not carry a header of their own.
[[annotations]]
path = "dev/dev_scripts/codegen/snippets/**"
precedence = "aggregate"
SPDX-FileCopyrightText = "2026 aas-core3.2-python AUTHORS"
SPDX-License-Identifier = "MIT"

# Test data and the recorded test outputs are generated and compared
# byte-by-byte, and JSON can not carry a comment.
[[annotations]]
path = "dev/test_data/**"
precedence = "aggregate"
SPDX-FileCopyrightText = "2026 aas-core3.2-python AUTHORS"
SPDX-License-Identifier = "MIT"

# The meta-model and the code generated from it transcribe the AAS
# specification: the docstrings and the doc comments derived from them quote
# the definitions of the classes, attributes and constraints. That text keeps
# the license of the specification, next to the MIT license of our own code.
# The specifications published by IDTA are licensed under CC BY 4.0.
[[annotations]]
path = [
"aas_core3_2/constants.py",
"aas_core3_2/types.py",
"aas_core3_2/verification.py",
"dev/dev_scripts/codegen/meta_model.py",
]
precedence = "aggregate"
SPDX-FileCopyrightText = "Industrial Digital Twin Association e. V."
SPDX-License-Identifier = "CC-BY-4.0"
4 changes: 4 additions & 0 deletions aas_core3_2/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

"""Manipulate, verify and de/serialize Asset Administration Shells v3.2."""

# Synchronize with pyproject.toml and changelog.rst!
Expand Down
4 changes: 4 additions & 0 deletions aas_core3_2/common.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

"""Provide common functions shared among the modules."""

# This code has been automatically generated by aas-core-codegen.
Expand Down
4 changes: 4 additions & 0 deletions aas_core3_2/constants.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

"""Provide constant values of the meta-model."""

# This code has been automatically generated by aas-core-codegen.
Expand Down
4 changes: 4 additions & 0 deletions aas_core3_2/jsonization.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

"""
Provide de/serialization of meta-model classes to/from JSON.

Expand Down
4 changes: 4 additions & 0 deletions aas_core3_2/jsonvalueverification.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

"""
Verify that a value is JSON-able.

Expand Down
4 changes: 4 additions & 0 deletions aas_core3_2/reporting.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

"""
Report where in the data an error lies.

Expand Down
4 changes: 4 additions & 0 deletions aas_core3_2/stringification.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

"""De-serialize enumerations from string representations."""

# This code has been automatically generated by aas-core-codegen.
Expand Down
4 changes: 4 additions & 0 deletions aas_core3_2/types.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

"""
--- WORK IN PROGRESS ---
Provide an implementation of the Asset Administration Shell (AAS) V3.2.
Expand Down
4 changes: 4 additions & 0 deletions aas_core3_2/verification.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

"""
Verify that the instances of the meta-model satisfy the invariants.

Expand Down
4 changes: 4 additions & 0 deletions aas_core3_2/xmlcommon.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

"""
Provide the primitives which the modules reading and writing XML share.

Expand Down
4 changes: 4 additions & 0 deletions aas_core3_2/xmlization.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

"""
Read and write model instances as XML.

Expand Down
4 changes: 4 additions & 0 deletions aas_core3_2/xmlrpc.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

"""
Read and write the JSON-able values as a subset of XML-RPC.

Expand Down
4 changes: 4 additions & 0 deletions dev/continuous_integration/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

"""Provide scripts for the continuous integration."""
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

"""Check that meta-data in ``pyproject.toml`` and ``__init__.py`` are consistent."""

import importlib
Expand Down
4 changes: 4 additions & 0 deletions dev/continuous_integration/common.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

"""Provide the settings shared among the continuous integration scripts."""

import os
Expand Down
4 changes: 4 additions & 0 deletions dev/continuous_integration/mypy.ini
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

[mypy]
22 changes: 22 additions & 0 deletions dev/continuous_integration/precommit.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env python3

# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

"""Run pre-commit checks on the repository."""

import argparse
Expand All @@ -23,6 +27,7 @@ class Step(enum.Enum):
TEST = "test"
DOCTEST = "doctest"
CHECK_INIT_AND_PYPROJECT_TOML_CONSISTENT = "check-init-and-pyproject-consistent"
REUSE = "reuse"


def call_and_report(
Expand Down Expand Up @@ -284,6 +289,23 @@ def main() -> int:
else:
print("Skipped checking that __init__.py and pyproject.toml are consistent.")

if Step.REUSE in selects and Step.REUSE not in skips:
# NOTE (aaronzi, 2026-11-08):
# reuse requires Python 3.10 or newer, so it is only installed there.
if sys.version_info < (3, 10):
print("Skipped checking the REUSE compliance (requires Python >= 3.10).")
else:
print("Checking the REUSE compliance...")
exit_code = call_and_report(
verb="check the REUSE compliance",
cmd=[sys.executable, "-m", "reuse", "lint"],
cwd=repo_root,
)
if exit_code != 0:
return 1
else:
print("Skipped checking the REUSE compliance.")

return 0


Expand Down
4 changes: 4 additions & 0 deletions dev/continuous_integration/ruff.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

target-version = "py39"

[lint]
Expand Down
4 changes: 4 additions & 0 deletions dev/dev_scripts/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

"""Provide scripts for the development of the SDK."""
4 changes: 4 additions & 0 deletions dev/dev_scripts/codegen/meta_model.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2024 aas-core-meta AUTHORS
#
# SPDX-License-Identifier: MIT

# Downloaded from: https://raw.githubusercontent.com/eclipse-aascw/aas-core-meta/543f3c05b88e61a4ec3ad90ec244055b5f9b65f0/aas_core_meta/v3_2.py
"""
--- WORK IN PROGRESS ---
Expand Down
4 changes: 4 additions & 0 deletions dev/dev_scripts/common.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

"""Provide the settings shared among the development scripts."""

import os
Expand Down
29 changes: 28 additions & 1 deletion dev/dev_scripts/download_aas_core_meta_model.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

"""Download the meta-model to this directory."""

import argparse
Expand All @@ -13,6 +17,22 @@
REPO: Final[str] = "aas-core-meta"
REF: Final[str] = "main"

# NOTE (aaronzi, 2026-11-08):
# The meta-model is copied verbatim from aas-core-meta, so we attribute it to
# its authors. We only prepend the header if the upstream file does not carry
# a license header itself, so that the header is not duplicated.
#
# REUSE-IgnoreStart
_META_MODEL_LICENSE_HEADER: Final[str] = """\
# SPDX-FileCopyrightText: 2024 aas-core-meta AUTHORS
#
# SPDX-License-Identifier: MIT

"""

_LICENSE_IDENTIFIER_TAG: Final[str] = "SPDX-License-Identifier:"
# REUSE-IgnoreEnd


def _latest_commit_sha_for_path(
owner: str, repo: str, ref: str, path: str, *, timeout: float = 15.0
Expand Down Expand Up @@ -84,7 +104,14 @@ def main() -> int:
/ "meta_model.py"
)

out_path.write_text(f"{banner}{content.rstrip()}\n\n{banner}", encoding="utf-8")
license_header = (
"" if _LICENSE_IDENTIFIER_TAG in content else _META_MODEL_LICENSE_HEADER
)

out_path.write_text(
f"{license_header}{banner}{content.rstrip()}\n\n{banner}",
encoding="utf-8",
)

print(f"Wrote {out_path} (from commit {sha[:12]}).")
return 0
Expand Down
4 changes: 4 additions & 0 deletions dev/dev_scripts/download_latest_test_data.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 aas-core3.2-python AUTHORS
#
# SPDX-License-Identifier: MIT

"""Download the latest test data released on aas-core-testdatagen."""

import argparse
Expand Down
Loading
Loading