Skip to content

Collaboration

The MTPPy2.0 package is managed in the gitlab repository MMTPy2.0, hosted at TU Chemnitz.

--8←

Workflow Principles

  1. Isolate your work, by working in a dedicated branch for your work
  2. After having reached a certain quality, place a merge request of the branch to develop, our working and integration branch
  3. Await Maintainer Feedback and Approval
  4. Repeat

Initial Checkout

  1. Clone the Repository First, clone the repository to your local machine using Git. Make sure you have the necessary access permissions (e.g., SSH key or access token) and navigate to the MTPPy2.0 directory
  2. git clone https://gitlab.hrz.tu-chemnitz.de/process-to-order-group/mtppy2.0.git
    cd mtppy2.0
    
  3. Set up your Development Environment (Virtual Environment)

The project uses uv for managing dependencies. To ensure everything works correctly, synchronize the virtual environment with the project dependencies. Run the following command to sync the environment:

uv sync --all-groups

  1. Test your installation

To verify that everything is set up correctly, run the pea_minimal application using uv run. This ensures the virtual environment is used automatically without needing to activate it manually

uv run python examples/pea_minimal.py
If everything is configured properly, the application should execute successfully.

Working on work items: use branches

0. Check your current status and branch

Whenever you are not sure what's going on, where you are or what you've changed, make use of:

git status

1. Create a task specific branch

The best practice in contributing is to assign yourself to a work item and create a branch, using the gitlab repository's Web-GUI.
Copy or remember the auto generated branch name.

2. Create a tracked branch locally

The following sequence of commands creates a local copy of the branch and links it as tracking branch with the repository.
Note, that the preparation with git pull (after you had created the branch in the Web-GUI) is essential for the automated tracking feature introduced with git 2.23+:

git pull
git switch <branch-name>
If you are pre git 2.23 you might want to do explicitly git checkout -b <branch-name> origin/<branch-name>. Sometimes, most often when you had used git fetch, the automated tracking fails (the output might be something like "Switched to a new branch", no hint about tracking information). Fix this situation with the command
git branch --set-upstream-to=origin/<branch-name> <branch-name>

3. Have fun, learn fast, commit often

While working on your feature use the standard commands for committing (locally)

git add <file1> <file2>  # Stage specific files
git commit -m "<your message>"
and publish it regularly to the repository
git push 
You might want to do explicitly express your branch git push origin/<branch-name>
Note: In case you experience an error during push, make sure that you've created your branch correctly. For further details revisit Contributing

  1. Merge back to develop Once you are done, go back to gitlab's Web-GUI, select the work item/issue and click button Create merge request with target develop

  2. Switch back to develop

    git switch develop
    git pull
    
    Note: Your changes are not present there until merge is completed by Maintainer