@@ -37,9 +37,10 @@ pak::pak(dependencies = "Config/Needs/build")
3737
3838- Load package for development: ` pkgload::load_all() `
3939- Run tests: ` testthat::test_local(reporter = "check") `
40+ - Run tests for a single file ` test-foo.R ` : ` testthat::test_local(filter = "foo", reporter = "check") `
4041- Build package: ` devtools::build() `
4142- Check package: ` devtools::check() `
42- - Update documentation: ` devtools::document() `
43+ - Update ` .Rd ` documentation: ` devtools::document() `
4344- Format code: ` air format . `
4445
4546## Code Style and Documentation
@@ -48,6 +49,7 @@ pak::pak(dependencies = "Config/Needs/build")
4849
4950- IMPORTANT: PR titles end up in ` NEWS.md ` grouped by conventional commit label. PRs and commits use the conventional commit style with backticks for code references such as ` function_call() `
5051- PRs are generally squashed, a clean history within a PR is not necessary
52+ - Before resuming work on a PR, always merge the current base branch (typically ` main ` )
5153
5254### Comment Style
5355
@@ -59,15 +61,18 @@ pak::pak(dependencies = "Config/Needs/build")
5961### R Code Conventions
6062
6163- Follow the [ tidyverse style guide] ( https://style.tidyverse.org ) and the [ tidyverse design guide] ( https://design.tidyverse.org )
62- - Use ` snake_case ` for new functions
64+ - Use ` snake_case ` for new functions and all arguments
6365- Use explicit package prefixes (e.g., ` withr::local_db_connection() ` ) for clarity
6466- Maintain consistent indentation (2 spaces) and spacing patterns
6567- Use meaningful variable names that reflect context
6668- Run ` air format . ` before committing changes to ensure consistent formatting
69+ - Never change deprecated functions
70+ - Avoid ` .Call() ` outside ` *_impl() ` in ` aaa-auto.R `
6771
6872### Documentation
6973
7074- Use roxygen2 with Markdown syntax for all function documentation
75+ - Use explicit ` @description ` and ` @details ` sections, aim for a complete description and move only excess details to ` @details `
7176- Use math notation for formulas: ` \eqn{...} ` for inline, ` \deqn{...} ` for display equations
7277- Keep each sentence on its own line in roxygen2 comments for better readability
7378- Document all arguments and return values
@@ -88,8 +93,16 @@ All new functions must include:
8893- Proper documentation, including arguments and return values
8994- A concept so that it exists in the pkgdown reference index
9095- An "experimental" badge via ` r lifecycle::badge("experimental") `
96+ - All arguments in ` snake_case ` , with documentation and suitable defaults
97+ - An ellipsis guarded with ` check_dots_empty() ` separating mandatory and optional arguments
98+ - Argument validation using built-in ` check_*() ` functions or ` igraph_arg_match() `
9199
92- If exporting a new function from the C library, ensure it is autogenerated and add tests for the ` _impl ` function.
100+ If exporting a new function from the C library:
101+
102+ - Ensure it is autogenerated
103+ - Add tests for the ` _impl ` function
104+ - Name all arguments in all calls to the ` _impl ` function
105+ - For graph constructors, prefer ` GATTR ` and ` GATTR-PARAM ` in Stimulus over manually assigning attributes
93106
94107## File Structure and Organization
95108
@@ -111,9 +124,11 @@ See `tools/README.md` for guidelines on code generation using the Stimulus frame
111124
112125### Build Artifacts
113126
114- Do not commit: ` *.dd ` , ` *. d` , ` *.o ` , ` *.so ` files in ` src/ ` , and ` tests/testthat/testthat-problems.rds ` .
127+ Do not commit: ` *.d ` , ` *.o ` , ` *.so ` files in ` src/ ` , and ` tests/testthat/testthat-problems.rds ` .
115128These are build artifacts that are regenerated automatically (see ` src/README.md ` for details on dependency tracking).
116129
130+ Careful with changes to ` *.dd ` , keep system headers out, only expect changes if new source files are added or their local dependencies change.
131+
117132## Testing
118133
119134- Add test cases for all new functionality
0 commit comments