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
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+32-1Lines changed: 32 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,4 +54,35 @@ Additional core capabilities should be implemented as needed either as a new cre
54
54
55
55
The project uses `pixi` as a software stack environment manager and task runner. `pixi` should be used to manage any "system" dependencies (e.g., Python, Rust toolchain, `libnetcdf`) and to run common tasks such as building, testing, linting, and formatting. See the `pixi.toml` file for details. Cargo should be used for managing Rust dependencies and building the Rust code.
56
56
57
-
If you need to run commands in the terminal, please format them for `nushell` using the `nu` language.
57
+
If you need to run commands in the terminal, please format them for `nushell` using the `nu` language.
58
+
59
+
## Testing
60
+
61
+
The project includes a comprehensive suite of tests to ensure the correctness and reliability of the code. Tests are organized into unit tests, integration tests, and end-to-end tests.
62
+
63
+
### Running Tests
64
+
65
+
To run the tests, use the following command:
66
+
67
+
```bash
68
+
cargo test
69
+
```
70
+
71
+
This will execute all tests in the project. You can also run specific tests by providing the test name:
72
+
73
+
```bash
74
+
cargo test<test_name>
75
+
```
76
+
77
+
### Writing Tests
78
+
79
+
When writing tests, follow these guidelines:
80
+
81
+
- Place unit tests in the same file as the code they test, within a `#[cfg(test)]` mod.
82
+
- Use descriptive names for test functions to clearly indicate their purpose.
83
+
- Include tests for edge cases and error conditions.
84
+
- Use the `assert_eq!` and `assert!` macros to verify expected behavior.
85
+
86
+
Refer to the Rust documentation for more information on testing: [Rust Testing Documentation](https://doc.rust-lang.org/book/ch11-00-testing.html).
87
+
88
+
To check coverage please use `cargo tarpaulin`. Please ensure that new code is adequately covered (>80% coverage) by tests. Do not implement new features without corresponding tests. Tests should not be trivial and should try to ensure that both the API and function logic are correct.
0 commit comments