Contributing
Issues
Please report bugs or feature requests by creating GitHub issues.
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.
Code Generation
The code for the conversion model instance ⟷ Protocol Buffer 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.
To re-generate the conversion code, run dev_scripts/generate_pbization.py:
python dev_scripts/generate_pbization.py
The code for managing Protocol Buffers has been generated using protoc. You have to have protoc installed.
To re-generate the code for Protocol Buffer management, run:
python dev_scripts/run_protoc.py
Test Data
The test data is automatically generated by aas-core3.0-testgen, and copied to this repository on every change.
New Versions of the Meta-model
If there is a new patch version of the meta-model, you have to:
Update the Protocol Buffer definitions in
dev_scripts/proto(see alsodev_scripts/update_proto_definition.py),Re-generate the code for the management of Protocol Buffers (see above), and
Update the
aas-core-metacommit hash inrequirements-dev.txtand install the newest version, andRe-generate the conversion code (see above).
Pre-commit Checks
Before you can run pre-commit checks, you need to all the dependencies as well as the development dependencies. Run in your virtual environment:
pip3 install --editable .
pip3 install -r requirements-dev.txt
Now you can execute the checks (from the repository root):
python continuous_integration/precommit.py
Some of the checks, such as formatting, can be automatically fixed. If you want a self-healing checks, run:
python continuous_integration/precommit.py --overwrite
Pull Requests
Feature branches. We develop using the feature branches, see this section of the Git book.
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.
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 running the tests, inspecting the code, re-building the documentation 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).