Skip to content

Commit

Permalink
Language fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnikaLau committed Nov 29, 2023
1 parent a2a5f03 commit e32840d
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions code_management/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ has_children: false
{:toc}
</details>

If you're new to coding or already working on it, remember two important things: always **use version control** and **add automatic tests**.
These steps will help you and anyone you work with to make things easier. Also, try out tools that can make coding easier for you.
Whether you're new to coding or already working on it, there are two important things to remember: always **use version control** and **add automatic testing**. These steps will make things easier for you and everyone you work with. Also, try out tools that can make coding easier for you.

## Version Control with Git
**Git** is a popular tool for managing source code. C2SM repositories are hosted on GitHub, which uses Git as its version control system.
Expand All @@ -35,11 +34,11 @@ A Git repository is a container for a software project. It stores the complete h

#### 2. Commit

A commit is a fundamental concept in Git, representing a snapshot of the codebase at a specific point in time. Each commit is identified by a unique SHA-1 hash, contains a descriptive message explaining the changes, and references the previous commit, forming a version history.
A commit is a fundamental concept in Git, representing a snapshot of the codebase at a particular point in time. Each commit is identified by a unique SHA-1 hash, contains a descriptive message explaining the changes, and references the previous commit, forming a version history.

#### 3. Branch
#### 3. Branches

Branches allow developers to work on separate lines of development. The primary branch is usually named "master" or "main," while feature branches enable the development of new features or bug-fix branches for addressing issues without affecting the main codebase.
Branches allow developers to work on separate lines of development. The primary branch is usually called 'master' or 'main', while feature branches enable the development of new features or bug-fix branches for addressing issues without affecting the main codebase.

#### 4. Merge

Expand All @@ -60,13 +59,13 @@ The specific tests you need will depend on your project and its requirements. He
These tests are for testing individual components or functions of your code to ensure they work correctly in isolation.
Find an [example for unit tests](https://github.com/C2SM/spack-c2sm/blob/main/test/unit_test.py) in our spack-c2sm repository.
### 2. Integrations Tests
These tests are to check how different parts of your code work together and communicate.
These tests are to check how different parts of your code work together and communicate with each other.
Find an [example for integration tests](https://github.com/C2SM/spack-c2sm/blob/main/test/integration_test.py) in our spack-c2sm repository.
### 3. System Tests
These tests are performed to ensure that all the components and modules of a software system work together as intended and that the system meets its specified requirements and functions correctly in its operational environment.
Find an [example for system tests](https://github.com/C2SM/spack-c2sm/blob/main/test/system_test.py) in our spack-c2sm repository.
### 4. Tolerance tests
These tests are used for the development of ICON, specifically when code is ported from CPU to GPU. The results when running on CPU and GPU are not bit identical, therefore a tolerance range is accepted when comparing a test case to the CPU reference. The accepted tolerance range is created by running an ensemble of the same test case with different perturbations. MeteoSwiss has development [probtest](https://github.com/MeteoSwiss/probtest) for handling everything related to tolerance tests with ICON. If you have a DKRZ account and are working with ICON-NWP, you can also check out the manual for [Generating tolerances for non-standard tests](https://gitlab.dkrz.de/icon/wiki/-/wikis/GPU-development/Validating-with-probtest-without-buildbot-references-(Generating-tolerances-for-non-standard-tests)).
These tests are used in the development of ICON, specifically when code is ported from CPU to GPU. The results when running on CPU and GPU are not bit identical, therefore a tolerance range is accepted when comparing a test case to the CPU reference. The accepted tolerance range is created by running an ensemble of the same test case with different perturbations. MeteoSwiss has developed [probtest](https://github.com/MeteoSwiss/probtest) for handling everything related to tolerance tests with ICON. If you have a DKRZ account and are working with ICON-NWP, you can also check out the manual for [Generating tolerances for non-standard tests](https://gitlab.dkrz.de/icon/wiki/-/wikis/GPU-development/Validating-with-probtest-without-buildbot-references-(Generating-tolerances-for-non-standard-tests)).
### 5. Git Hooks & GitHub Actions
Git Hooks are local scripts in Git that make sure things get done right when you work on your code. GitHub Actions, on the other hand, are integrated with GitHub and allow you to automate code management workflows. They can be run automatically on GitHub whenever something is committed.

Expand All @@ -79,7 +78,7 @@ Two popular tools for coding are [Visual Studio (VS) Code](https://code.visualst
1. [Download](https://code.visualstudio.com/download) and install VS Code on your computer.
2. Install extensions:
- Open VS Code.
- Look for the "Extensions" icon in the sidebar (it looks like four small squares).
- Look for the 'Extensions' icon in the sidebar (it looks like four small squares).
- Install the extensions you need for your coding work. We recommend:
- Python: for Python development support
- GitLens: to improve Git functionality
Expand Down

0 comments on commit e32840d

Please sign in to comment.