Skip to content

Commit 99d7525

Browse files
committed
Deploying to gh-pages from @ 51a6d71 🚀
1 parent 5a2cf8b commit 99d7525

115 files changed

Lines changed: 2203 additions & 1573 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

404.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AGENTS.html

Lines changed: 178 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AGENTS.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# R package development
2+
3+
## Key commands
4+
5+
# To run code
6+
Rscript -e "devtools::load_all(); code"
7+
8+
# To run all tests
9+
Rscript -e "devtools::test()"
10+
11+
# To run all tests for files starting with {name}
12+
Rscript -e "devtools::test(filter = '^{name}')"
13+
14+
# To run all tests for R/{name}.R
15+
Rscript -e "devtools::test_active_file('R/{name}.R')"
16+
17+
# To run a single test "blah" for R/{name}.R
18+
Rscript -e "devtools::test_active_file('R/{name}.R', desc = 'blah')"
19+
20+
# To redocument the package
21+
Rscript -e "devtools::document()"
22+
23+
# To check pkgdown documentation
24+
Rscript -e "pkgdown::check_pkgdown()"
25+
26+
# To check the package with R CMD check
27+
Rscript -e "devtools::check()"
28+
29+
## Code Style
30+
31+
- Always use `=` for assignment, never `<-`.
32+
- 2-space indentation, 120-character line limit.
33+
- `snake_case` for functions and variables, `CamelCase` for R6 classes.
34+
- When calling a function from imported package `foo` do not write
35+
`foo::bar()` but `bar()`
36+
- Double quotes for strings, explicit `TRUE`/`FALSE` (never `T`/`F`),
37+
explicit `1L` for integers.
38+
- Use implicit return values for functions.
39+
- Prefer `result = if (...) ... else ...` over
40+
`if (...) { result = ... } else { result = ... }` when the only
41+
difference between branches is the assigned value.
42+
- User-facing API (exported functions, public R6 methods) must have
43+
`checkmate` `assert_*()` argument checks. For internal code, match the
44+
existing level of defensiveness.
45+
- Use these mlr3misc utilities when appropriate: `map()`, `map_chr()`,
46+
`invoke()`, `calculate_hash()`, `str_collapse()`, `%nin%`, `%??%`.
47+
- Before implementing something, read similar existing files first to
48+
match the established patterns.
49+
50+
## File structure and naming
51+
52+
- Name the file as the most important contained function / class
53+
- No whitespaces, no special chart in filenames
54+
- Usually one large function / class, per file, but adding multiple
55+
smaller helpers is ok
56+
57+
## Collation order
58+
59+
- Derived classes must declare `#' @include ParentClass.R` in their
60+
roxygen header. This controls the `Collate:` field in DESCRIPTION so
61+
base classes load before derived classes.
62+
63+
## Core dependencies
64+
65+
- Use `checkmate` for arg-checks
66+
- Use `data.table` for efficient table structures
67+
- For OOP-stype use `R6`
68+
- Use `cli` to format messages, warnings, errors and prints
69+
70+
## Testing
71+
72+
- Tests for `R/{name}.R` go in `tests/testthat/test_{name}.R`.
73+
- All new code should have an accompanying test.
74+
- If there are existing tests, place new tests next to similar existing
75+
tests.
76+
- Strive to keep your tests minimal with few comments.
77+
- The full test suite takes a long time. Only run tests relevant to your
78+
changes with `devtools::test(filter = '^{name}')`.
79+
80+
## Documentation
81+
82+
- Every user-facing function should be exported and have roxygen2
83+
documentation.
84+
- Wrap roxygen comments at 120 characters.
85+
- Write one sentence per line.
86+
- If a sentence exceeds the limit, break at a comma or other appropriate
87+
point.
88+
- Internal functions should not have roxygen documentation.
89+
- Always re-document the package after changing a roxygen2 comment.
90+
- Don’t hand-edit generated artifacts: `man/`, or `NAMESPACE`.
91+
- Roxygen templates live in `man-roxygen/`
92+
- Bibliographic references go in `R/bibentries.R` and are cited with
93+
`` `r format_bib("key")` ``.
94+
95+
## `NEWS.md`
96+
97+
- Every user-facing change should be given a bullet in `NEWS.md`. Do not
98+
add bullets for small documentation changes or internal refactorings.
99+
- Each bullet should briefly describe the change to the end user and
100+
mention the related issue in parentheses.
101+
- A bullet can consist of multiple sentences but should not contain any
102+
new lines (i.e. DO NOT line wrap).
103+
- If the change is related to a function, put the name of the function
104+
early in the bullet.
105+
- Order bullets alphabetically by function name. Put all bullets that
106+
don’t mention function names at the beginning.
107+
108+
## GitHub
109+
110+
- If you use `gh` to retrieve information about an issue, always use
111+
`--comments` to read all the comments.
112+
113+
## Natural Language
114+
115+
- The following applies to all natural language text, so docs,
116+
commments, NEWS, etc, but not code
117+
- Use American english
118+
- Use the Oxford comma
119+
- Do not capitalize normal nouns or method names. “Bayesian” is
120+
capitalized, “random forest” is not.
121+
- Use cspell to check against typos, and add needed words to
122+
.cspell/project-words.txt if reasonable
123+
124+
## Further agents files
125+
126+
- Read and respect all files in the `.agents` folder

authors.html

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

authors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ Source:
3939

4040
Becker M, Schneider L, Richter J, Lang M, Bischl B, Pfisterer F, Binder
4141
M, Fischer S (2026). *mlr3mbo: Flexible Bayesian Optimization*. R
42-
package version 1.0.0, <https://mlr3mbo.mlr-org.com>.
42+
package version 1.1.0, <https://mlr3mbo.mlr-org.com>.
4343

4444
@Manual{,
4545
title = {mlr3mbo: Flexible Bayesian Optimization},
4646
author = {Marc Becker and Lennart Schneider and Jakob Richter and Michel Lang and Bernd Bischl and Florian Pfisterer and Martin Binder and Sebastian Fischer},
4747
year = {2026},
48-
note = {R package version 1.0.0},
48+
note = {R package version 1.1.0},
4949
url = {https://mlr3mbo.mlr-org.com},
5050
}

0 commit comments

Comments
 (0)