To maintain high-quality code, the DAMASK repository runs a number of tests on any newly pushed content.

Syntax Check#

For immediate feedback, any new or modified files are checked before a push to git.damask.mpie.de is accepted. This is done via a pre-receive hook.

  1. Python files are checked for invalid code, unused variables, etc. using Prospector.

  2. Fortran source files that constitute the DAMASK core are checked for compilation errors by invoking gfortran with -fsyntax-only (grid solver and MSC Marc).


To skip these checks, prefix the final commit message with [skip sc].

Test Suite#

Extended testing is performed on each push using GitLab Continuous Integration (CI). All tests specified in .gitlab-ci.yml are executed on a dedicated test machine. The associated CI pipeline gives feedback on whether any tests failed.


To skip these tests, prefix the final commit message with [skip ci].

If the test suite, which is hosted in the PRIVATE repository, itself needs to be modified to match (new) functionality in a specific branch of the main DAMASK repository, the submodules feature of git allows to couple that branch (assumed to be currently checked out) with a matching commit in the PRIVATE repository. The necessary steps are:

  1. Initialize (i.e. clone) the PRIVATE repository.

    git submodule update --init
  2. Check out the PRIVATE base branch (typically development) from which to start modifications.

    cd PRIVATE
    git checkout development
  3. Create a new branch for your modifications in the PRIVATE repository; commit and push when done.

    git checkout -b {new branch}
    git add {updated content}
    git commit
    git push
  4. Lastly, commit the current commit ID of the PRIVATE submodule

    cd ..
    git commit PRIVATE

    such that this commit ID gets stored in the current branch of the DAMASK repository and will be used by the GitLab Continuous Integration facility (once the branch is pushed).