IAP GITLAB

Skip to content
Snippets Groups Projects
CONTRIBUTING.md 3.87 KiB
Newer Older
# Guidelines for code development, structure, formating etc.

The CORSIKA Project very much welcomes contributions. Here we outlined
how you can find the right place to contribute, and how to do that.
Ralf Ulrich's avatar
Ralf Ulrich committed
Connect to https://gitlab.iap.kit.edu and corsika-devel@lists.kit.edu (self-register at https://www.lists.kit.edu/sympa/subscribe/corsika-devel) to get in touch with the project.
ralfulrich's avatar
ralfulrich committed
The CORSIKA Project decides on the [GUIDELINES](CONTRIBUTING.md) and can decide to
change/improve them.
Ralf Ulrich's avatar
Ralf Ulrich committed
# How to contribute

ralfulrich's avatar
ralfulrich committed
  - We organize all development via gitlab `Issues` that may be feature requests,
ralfulrich's avatar
ralfulrich committed
    ideas, discussions, or bugs fix requests. 
Ralf Ulrich's avatar
Ralf Ulrich committed
  - New issues can be created, or existing issues
ralfulrich's avatar
ralfulrich committed
    picked up or contributed to. 
  - Issues are discussed in meetings or via  corsika-devel@lists.kit.edu  
    within the CORSIKA Project.
Ralf Ulrich's avatar
Ralf Ulrich committed
  - Issues are assigned to milestones. 
  - The work on issues is performed in `branches` that can be best
    created directly via the gitlab web interface. 
  - Proposed code to close one issue (located in a specific git
ralfulrich's avatar
ralfulrich committed
    branch) is reviewed, discussed, and eventually merged
ralfulrich's avatar
ralfulrich committed
    into the master branch via a merge-request (MR) to close the issue.
Ralf Ulrich's avatar
Ralf Ulrich committed
  - all merge request will undergo a code review, and must be approved before merge, in order to ensure high code qualtiy: [Code Approval Procedure](https://gitlab.iap.kit.edu/AirShowerPhysics/corsika/-/wikis/Code-Approval-Procedure)
## Code formatting

We rely on `clang-format` for code formatting. This has the tremendous
advantage that definitely all code follows the same formatting rules,
and nobody at any point needs to invest time and effort into code
formatting. We provide a script `do-clang-format.sh`, which can be
very useful. But we urge everybody to integrate `clang-format` already
on the level of your source code editor. See [the official
page](https://clang.llvm.org/docs/ClangFormat.html) for information
ralfulrich's avatar
ralfulrich committed
about `clang-format` and its editor integrations. At least: run
`do-clang-format.sh` prior to any `git add/commit` command. Code with
improper formatting will not be accepted for merging. It will trigger automatic warnings by the continuous integration (CI) system.

The definition of source code format is written down in the file
[.clang-format](.clang-format) and can be changed, if the CORSIKA
Project agrees on it. To see what is possible, check
e.g. [link1](https://clangformat.com/) or
[link2](https://zed0.co.uk/clang-format-configurator/).

ralfulrich's avatar
ralfulrich committed

ralfulrich's avatar
ralfulrich committed
## Coding rules, conventions and guidelines

Ralf Ulrich's avatar
Ralf Ulrich committed
Please read the [Coding wiki page](https://gitlab.iap.kit.edu/AirShowerPhysics/corsika/-/wikis/Coding-Conventions-and-Guidelines).
Ralf Ulrich's avatar
Ralf Ulrich committed

Ralf Ulrich's avatar
Ralf Ulrich committed

Ralf Ulrich's avatar
Ralf Ulrich committed
## Release versioning scheme
ralfulrich's avatar
ralfulrich committed
Releases of CORSIKA 8 are thought to be the baseline for larger scale
validation, and full production.  The releases are numbered as x.y.z,
starting with x=8, which will not be changed for CORSIKA 8. The y index is
updated for new releases that normally contain improved or
enhanced physics performance, and also interface
ralfulrich's avatar
ralfulrich committed
changes to accomodate improvements. The z index can be updated more
frequently for bug fixes or new features. Changes in z will not
ralfulrich's avatar
ralfulrich committed
contain interface changes, thus, production code will remain
fully compatible within changes of z.  Special releases of CORSIKA will
also have a release names.


# How to become scientific author of the CORSIKA Project

The CORSIKA Project decides on who becomes scientific author. The
ralfulrich's avatar
ralfulrich committed
following conditions are sufficient, but not all of them are
required all the time:
ralfulrich's avatar
ralfulrich committed
  - responsibility for a particular functionality or software/management part 
  - have read and follow these [GUIDELINES](CONTRIBUTING.md)
  - active in the CORSIKA Project, that means responsive to
Ralf Ulrich's avatar
Ralf Ulrich committed
    discussions and problems in corsika-devel@list.kit.edu or on https//gitlab.iap.kit.edu, 
ralfulrich's avatar
ralfulrich committed
    of relevant *Issues*, or in (phone) meetings
  - agreement to the [COLLABORATION_AGREEMENT](COLLABORATION_AGREEMENT.md) 
  - the members of the CORSIKA Project must agree