From 9b9706b8c5f23f4a5cbab28642bca9ddf5a15861 Mon Sep 17 00:00:00 2001 From: Yen-Chen Chen <yen-chen.chen@tum.de> Date: Wed, 26 Mar 2025 09:50:31 +0100 Subject: [PATCH 1/6] Add contribution guide --- CONTRIBUTING.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ REUSE.toml | 1 + 2 files changed, 67 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..a31277f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,66 @@ +# ICON Fortran-support library Contribution Guidelines + +## Introduction + +The ICON Fortran-support library is a collection of supported functionalities commonly shared in code development. Such as exception, initialization, and namelist handling. The library also contains basic functionalities implemented in C with Fortran interfaces. See `README.md` for a list of modules in the library. + +## Communication + +Use [issues](https://docs.gitlab.com/user/project/issues/) of the repository (fork) as a tool to communicate, track, and obtain information related to work items. Create an issue to report a bug you found, request a feature that needs to be implemented, or to discuss and coordinate with others on a particular topic. Issues can also be employed to address other work items, such as tracking the porting of a module to a different programming language or collecting information regarding an unexpected simulation result. + +> **Note:** Prefer GitLab communication over private emails or messages to ensure information is searchable and accessible to a larger audience. + +> **Note:** Avoid using [tasks](https://docs.gitlab.com/user/tasks/), as they add an extra level of hierarchy. To keep things simple, use issues only. + +### Creating Issues + +1. Present issues clearly and include all relevant information so others can easily understand them. + +2. Each issue should focus on **one actionable task** (e.g., one bug or feature request). If it becomes too lengthy or complex, break it into smaller issues and link them to the original one. + +3. Always assign an issue to someone and communicate this clearly. Mention developers as needed, but keep it to a minimum. + +4. Apply as many relevant [labels](https://docs.gitlab.com/user/project/labels) as possible. They help in classifying the issue (e.g. `bug`, `feature request`, `discussion`). Feel free to create new labels if the right ones don't exist. + +## Code Contributions + +### Coding style + +We use [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) and [`fprettify`](https://github.com/fortran-lang/fprettify) for C and Fortran code styling correspondingly. Install both packages if you wish to contribute to the code. + +We provide predefined CMake target `make format` for code formatting using `clang-format` and `fprettify`. Be sure to run `make format` before you commit to the repository. + +We also additionally use [`cmake-format`](https://github.com/cheshirekow/cmake_format) for CMake styling. Please also format the CMake files if you made changes in the CMake script. + +### General Coding Rules + +1. Avoid adding comments about future actions. For example, + ```fortran + ! Delete the subroutines below once the module is validated + ``` + If necessary, include a reference to an issue that provides the progress status (e.g., an issue on the validation of the aforementioned module). +2. Do not add commented-out code to the codebase, as it produces maintenance and development overhead. + +### Merge Requests + +1. Always **Choose a template** (`bugfix`/`feature`) before writing a merge request description. + +2. Follow that instructions in the merge request template and make sure you complete the `Mandatory steps before review` list before requesting a review. + +3. Make the merge request title concise (titles become the first line of the commit message when the merge requests are accepted. + +4. Please, adhere to the following recommendations for the merge requests descriptions, which will become part of the commit message when the merge request is accepted: + + - use simple English in the active form (e.g. this implements A, updates B); + + - avoid special Markdown symbols and prefer plain ASCII, the message should read well in the terminal; + + - keep it short (excluding details, descriptions are appended to the merge request commit message). + +5. The lists of co-authors in merge requests are generated automatically based on the authorship of the commits in the source branches. Please ensure that the commits in the source branch have the correct authorship with the correct email addresses (they can be [automatically-generated private commit emails](https://docs.gitlab.com/user/profile/#use-an-automatically-generated-private-commit-email)). If some commits have the wrong authorship, you can provide the list of co-authors using the following format: + ``` + Co-authored-by: First-Name Second-Name <email.address@example.de> + Co-authored-by: Another Name <another.address@example.com> + ``` + +6. Check whether yourself is listed in the `AUTHORS.txt` list. If not, add yourself in the alphabetic order. Your name will be included with when your merge request got merged. diff --git a/REUSE.toml b/REUSE.toml index 8b25267..116b972 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -15,6 +15,7 @@ version = 1 # Documentation and its source files: path = [ "AUTHORS.txt", + "CONTRIBUTING.md", "README.md", ] precedence = "aggregate" -- GitLab From c07583255dc743178a7b4ee26c7870f5b78fc695 Mon Sep 17 00:00:00 2001 From: Yen-Chen <yen-chen.chen@tum.de> Date: Mon, 31 Mar 2025 09:33:35 +0200 Subject: [PATCH 2/6] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1792c9b..7836c8f 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ make - Files unrelated to the library itself should have license CC0-1.0 ## How to contribute -Please open a merge request and select one of our templates: __[feature/bugfix]__. Detailed instructions on how to proceed are provided there. +Please checkout [Contribution Guidelines](./CONTRIBUTING.md). ## Contact This repository is mainly maintained by the following maintainers: -- GitLab From 69c3a350ae94284f6c31979655e3cc861a759b16 Mon Sep 17 00:00:00 2001 From: Yen-Chen <yen-chen.chen@tum.de> Date: Mon, 31 Mar 2025 09:40:35 +0200 Subject: [PATCH 3/6] Add version update guide --- CONTRIBUTING.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a31277f..b5d125b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -64,3 +64,11 @@ We also additionally use [`cmake-format`](https://github.com/cheshirekow/cmake_f ``` 6. Check whether yourself is listed in the `AUTHORS.txt` list. If not, add yourself in the alphabetic order. Your name will be included with when your merge request got merged. + +### Version (Commit) Update in ICON + +1. Always use commit from the `master` branch for merging back to the ICON repositories. However, you can use commits from other branches for local development. + +2. The `libfortran-support` versions will be irregularly updated directly in the `icon/icon` repository. + +3. All commits that merges back into the ICON repositories must contain a release tag. Please contact the maintainers if you cannot wait for the update from `icon/icon` the maintainers will issue a release tag. -- GitLab From a8ac123663bbeb0149782efe31c33418838dc1f5 Mon Sep 17 00:00:00 2001 From: Yen-Chen <yen-chen.chen@tum.de> Date: Mon, 31 Mar 2025 09:44:44 +0200 Subject: [PATCH 4/6] Improve grammar --- CONTRIBUTING.md | 8 ++++---- README.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b5d125b..d693d38 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -65,10 +65,10 @@ We also additionally use [`cmake-format`](https://github.com/cheshirekow/cmake_f 6. Check whether yourself is listed in the `AUTHORS.txt` list. If not, add yourself in the alphabetic order. Your name will be included with when your merge request got merged. -### Version (Commit) Update in ICON +### Versions (Commits) Update in ICON -1. Always use commit from the `master` branch for merging back to the ICON repositories. However, you can use commits from other branches for local development. +1. Always use commits from the `master` branch for updating new versions in the ICON repositories. However, you can use commits from other branches for your local development. -2. The `libfortran-support` versions will be irregularly updated directly in the `icon/icon` repository. +2. The `libfortran-support` versions will be irregularly updated directly to the `icon/icon` repository. -3. All commits that merges back into the ICON repositories must contain a release tag. Please contact the maintainers if you cannot wait for the update from `icon/icon` the maintainers will issue a release tag. +3. Each commit that merges back into the ICON repositories must contain a release tag. Please contact the maintainers if you cannot wait for the update from `icon/icon`. The maintainers will issue a release tag. diff --git a/README.md b/README.md index 7836c8f..0cff6a2 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ make - Files unrelated to the library itself should have license CC0-1.0 ## How to contribute -Please checkout [Contribution Guidelines](./CONTRIBUTING.md). +Please checkout the [Contribution Guidelines](./CONTRIBUTING.md). ## Contact This repository is mainly maintained by the following maintainers: -- GitLab From c6a23b5011c2ba5446b09e35e32c0efdb4208d96 Mon Sep 17 00:00:00 2001 From: Yen-Chen Chen <yen-chen.chen@tum.de> Date: Mon, 31 Mar 2025 13:03:38 +0000 Subject: [PATCH 5/6] Apply suggestions --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d693d38..cb76eae 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -63,7 +63,7 @@ We also additionally use [`cmake-format`](https://github.com/cheshirekow/cmake_f Co-authored-by: Another Name <another.address@example.com> ``` -6. Check whether yourself is listed in the `AUTHORS.txt` list. If not, add yourself in the alphabetic order. Your name will be included with when your merge request got merged. +6. Check whether you are listed in the `AUTHORS.txt` list. If not, add yourself in the alphabetic order. Your name will be included when your merge request gets merged. ### Versions (Commits) Update in ICON -- GitLab From ba285438951941defe4e7691451adf75bd7f59fd Mon Sep 17 00:00:00 2001 From: Yen-Chen <yen-chen.chen@tum.de> Date: Mon, 31 Mar 2025 15:02:35 +0200 Subject: [PATCH 6/6] Update Yen-Chen's email --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0cff6a2..615ee02 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ Please checkout the [Contribution Guidelines](./CONTRIBUTING.md). ## Contact This repository is mainly maintained by the following maintainers: -- __Yen-Chen Chen__ (yen-chen.chen@kit.edu) +- __Yen-Chen Chen__ (yen-chen.chen@tum.de) - __Mikael Stellio__ (mikael.stellio@c2sm.ethz.ch) - __Will Sawyer__ (william.sawyer@cscs.ch) -- GitLab