Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
31 changes: 31 additions & 0 deletions .github/workflows/build-doc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# SPDX-FileCopyrightText: 2025 aas-core3.1-java AUTHORS
#
# SPDX-License-Identifier: MIT

name: Build Documentation

on:
push:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'corretto'

- name: Create javadoc
run: mvn javadoc:javadoc

- name: Deploy to gh-pages 🚀
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: target/site/apidocs/
40 changes: 40 additions & 0 deletions .github/workflows/ci-for-dev-scripts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# SPDX-FileCopyrightText: 2025 aas-core3.1-java AUTHORS
#
# SPDX-License-Identifier: MIT

name: CI-for-dev-scripts

on:
push:
branches: [ master, main ]
tags: [ "**" ]
paths:
- dev_scripts/**
pull_request:
branches: [ "**" ]
paths:
- dev_scripts/**

jobs:
Execute-continuous-integration:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']

steps:
- uses: actions/checkout@v7

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install --group dev_scripts/pyproject.toml:dev -e dev_scripts

- name: Run checks
run: |
python3 dev_scripts/continuous_integration_of_dev_scripts/precommit.py
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# SPDX-FileCopyrightText: 2025 aas-core3.1-java AUTHORS
#
# SPDX-License-Identifier: MIT

name: CI

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

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'corretto'
cache: maven

- name: Check version info
run: |
pushd ./dev_scripts
pip3 install "."
popd
python3 ./dev_scripts/check_docs_package_version.py --validate

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Create javadoc
run: mvn javadoc:javadoc
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# SPDX-FileCopyrightText: 2025 aas-core3.1-java AUTHORS
#
# SPDX-License-Identifier: MIT

name: Publish package to the Maven Central Repository

on:
release:
types: [created]

jobs:
publish:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'corretto'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Publish package
run: mvn deploy -P release
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,39 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

# IntelliJ IDEA
.idea/
*.iws
*.iml
*.ipr

# Eclipse
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

# NetBeans
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

# VS Code
.vscode/

# Mac OS
.DS_Store
2 changes: 2 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Marko Ristin (marko@ristin.ch, marko.ristin@gmail.com, rist@zhaw.ch) for Zurich University of Applied Sciences (ZHAW)
Markus Böhm (Markus.Boehm@conplement.de) for conplement AG
Tobias Langer (Tobias.Langer@conplement.de) for conplement AG
121 changes: 121 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Contributing

## Issues

Please report bugs or feature requests by [creating GitHub issues].

[creating GitHub issues]: https://github.com/aas-core-works/aas-core3.1-java/issues/new/choose

## In Code

If you want to contribute in code, pull requests are welcome!

Please do [create a new issue] before you dive into coding.
It can well be that we already started working on the feature, or that there are upstream or downstream complexities involved which you might not be aware of.

[create a new issue]: https://github.com/aas-core-works/aas-core3.1-java/issues/new/choose

### SDK Code Generation

The biggest part of the code has been automatically generated by [aas-core-codegen].
It probably makes most sense to change the generator rather than add new functionality.
However, this needs to be decided on a case-by-case basis.

[aas-core-codegen]: https://github.com/aas-core-works/aas-core-codegen

### Semantic Patching for `dk.brics.automaton`

The regular expression engine in the standard Java library runs into stack overflow on some of the regular expressions required by the meta-model.
We therefore had to resort to the external library `dk.brics.automaton` for some of the regular expressions.

Once the code is generated by `aas-core-codegen` (see above), you have to semantically patch it to use `dk.brics.automaton`.

Please see [dev_scripts/semantic-patching/README.md](dev_scripts/semantic-patching/README.md) for more information.

### Test Code Generation

The code of the unit tests has been automatically generated using the Python scripts in the `dev_scripts/` directory.

To re-generate the test code, first create a virtual environment in `dev_scripts/`:

```
python -m venv venv
```

Activate the virtual environment (in Windows):

```
venv\Scripts\activate
```

or in Linux:
```
source venv/bin/activate
```

Then install the dependencies:

```
pip3 install -e .
```

Now you can run the generation scripts:

```
python dev_scripts/update_all.py
```

### Test Data

The test data is automatically generated by [aas-core3.1-testgen], and copied to this repository on every change.

[aas-core3.1-testgen]: https://github.com/aas-core-works/aas-core3.1-testgen

### Build

To build the project, run:

```bash
mvn build
```

### Pre-commit Checks

To lint, check, and test your project, you can use the `mvn verify` subcommand.
Maven will install all necessary dependencies automatically:

```bash
mvn verify
```

## Pull Requests

**Feature branches**.
We develop using the feature branches, see [this section of the Git book].

[this section of the Git book]: https://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows

If you are a member of the development team, create a feature branch directly within the repository.

Otherwise, if you are a non-member contributor, fork the repository and create the feature branch in your forked repository. See [this GitHub tutorial] for more guidance.

[this GitHub tutorial]: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork

**Branch Prefix**.
Please prefix the branch with your Github user name (*e.g.,* `mristin/Add-some-feature`).

**Continuous Integration**.
GitHub will run the continuous integration (CI) automatically through GitHub actions.
The CI includes building the solution, running the test, inspecting the code *etc.*

### Commit Messages

The commit messages follow the guidelines from https://chris.beams.io/posts/git-commit:

* Separate subject from body with a blank line,
* Limit the subject line to 50 characters,
* Capitalize the subject line,
* Do not end the subject line with a period,
* Use the imperative mood in the subject line,
* Wrap the body at 72 characters, and
* Use the body to explain *what* and *why* (instead of *how*).
4 changes: 3 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2025 aas-core3.1-java AUTHORS
Copyright (c) 2026 aas-core3.1-java 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 All @@ -19,3 +19,5 @@ 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.

Please see the file AUTHORS for the full list of the authors of aas-core3.1-java.
Loading
Loading