rextendr icon indicating copy to clipboard operation
rextendr copied to clipboard

Flesh out `principles.md`

Open malcolmbarrett opened this issue 4 years ago • 3 comments

#94 adds principles.md to make explicit important internal coding conventions used in rextendr. That PR limited the contents of principles.md to user communication and errors. However, there are probably other conventions (or emerging conventions waiting to be codified) that would do well to be included.

Two particularly good examples of documents like this are in usethis and targets. These are both very well designed packages, and I think the principled approach to design helped get them there.

  • [x] Communicating with users
  • [x] Throwing errors
  • [ ] to_toml()
  • [ ] Working with paths, pretty_rel_path()
  • [ ] Testing, including helper functions + snapshot testing

malcolmbarrett avatar Mar 31 '21 22:03 malcolmbarrett

I suggest writing about to_toml() and its use cases. I strongly encourage using it every time we write a *.toml file. I believe it supports the majority of use cases that arise in Rust projects (it does not fully support TOML standard though).

Ilia-Kosenkov avatar Apr 05 '21 14:04 Ilia-Kosenkov

It seems like it might be good to document how to handle paths, e.g. when to use pretty_rel_path(). That's something usethis is quite explicit about in its principles.md.

malcolmbarrett avatar Apr 15 '21 21:04 malcolmbarrett

Also, per #102, describe snapshot testing.

clauswilke avatar Apr 16 '21 14:04 clauswilke