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
- Use `max` for maximal (graph theory term: a vertex is maximal if no other vertex dominates it) and `largest` for maximum (the biggest value in a set)
79
83
84
+
### New functions
85
+
86
+
All new functions must include:
87
+
88
+
- Examples
89
+
- Tests
90
+
- Proper documentation, including arguments and return values
91
+
- A concept so that it exists in the pkgdown reference index
92
+
- An "experimental" badge via `r lifecycle::badge("experimental")`
93
+
- All arguments in `snake_case`, with documentation and suitable defaults
94
+
- An ellipsis guarded with `check_dots_empty()` separating mandatory and optional arguments
95
+
- Argument validation using built-in `check_*()` functions or `igraph_arg_match()`
96
+
97
+
If exporting a new function from the C library:
98
+
99
+
- Ensure it is autogenerated
100
+
- Add tests for the `_impl` function
101
+
- Name all arguments in all calls to the `_impl` function
See `tools/README.md` for guidelines on code generation using the Stimulus framework.
97
120
121
+
### Build Artifacts
122
+
123
+
Do not commit: `*.d`, `*.o`, `*.so` files in `src/`, and `tests/testthat/testthat-problems.rds`.
124
+
These are build artifacts that are regenerated automatically (see `src/README.md` for details on dependency tracking).
125
+
126
+
Careful with changes to `*.dd`, keep system headers out, only expect changes if new source files are added or their local dependencies change.
127
+
98
128
## Testing
99
129
100
130
- Add test cases for all new functionality
101
131
- For newly created autogenerated functions, always add a test to `test-aaa-auto.R`
102
132
- Test file naming should mirror source file naming
133
+
- Implement both structured and snapshot tests. For the latter, ensure stability by setting a random seed and calling `local_igraph_options(print.id = FALSE)` if graph IDs are involved.
134
+
- When testing error behavior, prefer snapshot tests.
103
135
- Run tests frequently during development and at the end: `testthat::test_local(reporter = "check")`
136
+
- Run `devtools::check()` as a final step to ensure all checks pass.
0 commit comments