You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -39,7 +39,7 @@ The source code of ABACUS is based on several modules. Under the ABACUS root dir
39
39
Before you submit an issue, please search the issue tracker, and maybe your problem has been discussed and fixed. You can [submit new issues](https://github.com/deepmodeling/abacus-develop/issues/new/choose) by filling our issue forms.
40
40
To help us reproduce and confirm a bug, please provide a test case and building environment in your issue.
41
41
42
-
## Comment Style for documentation
42
+
## Comment style for documentation
43
43
44
44
ABACUS uses Doxygen to generate docs directly from `.h` and `.cpp` code files.
45
45
@@ -117,11 +117,11 @@ We use GoogleTest as our test framework. Write your test under the corresponding
117
117
- Add a folder named `test` under the module.
118
118
- Append the content below to `CMakeLists.txt` of the module:
119
119
120
-
```cmake
121
-
IF (BUILD_TESTING)
122
-
add_subdirectory(test)
123
-
endif()
124
-
```
120
+
```cmake
121
+
IF (BUILD_TESTING)
122
+
add_subdirectory(test)
123
+
endif()
124
+
```
125
125
126
126
- Add a blank `CMakeLists.txt` under `module*/test`.
127
127
@@ -131,44 +131,41 @@ To add a unit test:
131
131
- Add your testing source code with suffix `*_test.cpp` in `test` directory.
132
132
- Append the content below to `CMakeLists.txt` of the module:
133
133
134
-
```cmake
135
-
AddTest(
136
-
TARGET <module_name>_<test_name> # this is the executable file name of the test
137
-
SOURCES <test_name>.cpp
134
+
```cmake
135
+
AddTest(
136
+
TARGET <module_name>_<test_name> # this is the executable file name of the test
137
+
SOURCES <test_name>.cpp
138
138
139
-
# OPTIONAL: if this test requires external libraries, add them with "LIBS" statement.
140
-
LIBS math_libs # `math_libs` includes all math libraries in ABACUS.
141
-
)
142
-
```
139
+
# OPTIONAL: if this test requires external libraries, add them with "LIBS" statement.
140
+
LIBS math_libs # `math_libs` includes all math libraries in ABACUS.
141
+
)
142
+
```
143
143
144
144
- Build with `-D BUILD_TESTING=1` flag. You can find built testing programs under `build/source/<module_name>/test`.
145
145
- Follow the installing procedure of CMake. The tests will move to `build/test`.
146
146
147
147
## Generating code coverage report
148
148
149
-
We use gcov and lcov to generate code coverage report, and only support gcc.
149
+
This feature requires using GCC compiler. We use `gcov` and `lcov` to generate code coverage report.
150
150
151
-
1. Add -DENABLE_COVERAGE=ON for cmake:
152
-
```
153
-
cmake -B build -DENABLE_COVERAGE=ON
154
-
```
151
+
1. Add `-DENABLE_COVERAGE=ON` for CMake configure command.
Now you can copy `build/lcov` to your local device, and view `build/lcov/html/all_targets/index.html`.
169
167
170
-
Now you can copy build/lcov to your local device, and view build/lcov/html/all_targets/index.html.
171
-
The current test coverage of ABACUS is reported in [Test Coverage](./community/contribution_guide.md#test-coverage).
168
+
We use [Codecov](https://codecov.io/) to host and visualize our [**code coverage report**](https://app.codecov.io/gh/deepmodeling/abacus-develop). Analysis is scheduled after a new version releases; this [action](https://github.com/deepmodeling/abacus-develop/actions/workflows/coverage.yml) can also be manually triggered.
172
169
173
170
## Submitting a Pull Request
174
171
@@ -219,7 +216,7 @@ To run a subset of unit test, use `ctest -R <test-match-pattern>` to perform tes
219
216
git pull --ff upstream develop
220
217
```
221
218
222
-
## Commit Message Guidelines
219
+
## Commit message guidelines
223
220
224
221
A well-formatted commit message leads a more readable history when we look through some changes, and helps us generate change log.
225
222
We follow up [The Conventional Commits specification](https://www.conventionalcommits.org) for commit message format.
Copy file name to clipboardExpand all lines: docs/community/contribution_guide.md
+3-7Lines changed: 3 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,17 +4,13 @@
4
4
5
5
We welcome contributions from the open source community. The technical guide is provided in [Contributing to ABACUS](../CONTRIBUTING.md). Here is the basic contribution process:
6
6
7
-
-**Find out issues to work on.**
8
-
We assume you already have a good idea on what to do, otherwise the [issue tracker](https://github.com/deepmodeling/abacus-develop/issues) and [discussion](https://github.com/deepmodeling/abacus-develop/discussions) panel provide good starting points to find out what to work on and to get familiar with the project.
7
+
-**Find out issues to work on.**
8
+
We assume you already have a good idea on what to do, otherwise the [issue tracker](https://github.com/deepmodeling/abacus-develop/issues) and [discussion](https://github.com/deepmodeling/abacus-develop/discussions) panel provide good starting points to find out what to work on and to get familiar with the project.
9
9
10
-
-**Approach the issue.**
10
+
-**Approach the issue.**
11
11
It is suggested to [submit new issues](https://github.com/deepmodeling/abacus-develop/issues/new/choose) before coding out changes to involve more discussions and suggestions from development team. Refer to the technical guide in [Contributing to ABACUS](../CONTRIBUTING.md) when needed.
12
12
13
13
-**Open a pull request.** The ABACUS developers review the pull request (PR) list regularly. If the work is not ready, convert it to draft until finished, then you can mark it as "Ready for review". It is suggested to open a new PR through forking a repo and creating a new branch on you Github account. A new PR should include as much information as possible in `description` when submmited. Unittests or CI tests are required for new PRs.
14
14
15
15
-**Iterate the pull request.**
16
16
All pull requests need to be tested through CI before reviewing. A pull request might need to be iterated several times before accepted, so splitting a long PR into parts reduces reviewing difficulty for us.
17
-
18
-
## Test Coverage
19
-
20
-
The current test coverage of ABACUS is reported with 50.9% line coverage and 69.8% function coverage. Efforts to increase test coverage is appreciated. For more details, developers are referred to [Code Coverage Report](./test-coverage.md).
0 commit comments