qmd-lab / closeread

https://closeread.dev
MIT License
128 stars 5 forks source link

Move tests to separate folder #115

Closed jimjam-slam closed 3 weeks ago

jimjam-slam commented 3 weeks ago

It feels like this is one of those rare cases when !important really is called for!

In terms of whether sticky blocks should be a demo or a test, I agree with your thoughts there. If we don't cordon off tests, among other things, it will bloat the docs with stuff that users might be kinda like wtf on. How about this approach for testing (just spitballing...):

  1. Put any test qmd files in docs/tests
  2. Add project.render["*.qmd", "!tests"] to _quarto.yml
  3. Create a new _quarto-tests.yml file with project.render["tests"]
  4. In both actions, add an additional step before quarto publish where we call quarto render --profile tests.

When the profile metadata gets merged in, hopefully the "tests" glob overwrites the "!tests" one?

Originally posted by @andrewpbray in https://github.com/qmd-lab/closeread/issues/82#issuecomment-2423405477