JohnAdders / climate_narrative

CBES/NGFS scenario analysis narrative tool to support smaller firms
MIT License
4 stars 7 forks source link

fix links not opening in new tab #234

Closed krzmip closed 2 years ago

krzmip commented 2 years ago

fixed several links that missed target="_blank" to open in the new tab (see #231 ) added a test that checks the links in the yaml files to ensure such links are not introduced in future

also, updated report tests to the v6

JohnAdders commented 2 years ago

should the html, rtt files in tests\testthat be in git? can you remove?

John

JohnAdders commented 2 years ago

maybe add to .gitignore

krzmip commented 2 years ago

The rtf/html files are used by one of the tests ("test_reports.R"). In this test I set up a mock session, produce several reports and compare them against the expected ones. The goal of this test is to detect any changes in the contents or anything breaking the report production process. However, there are 2 problems:

  1. it turns out that these tests are not executed by github in each check (not sure why, maybe there are some constraints on how much time or memory can be used by such tests). They can be run manually by runTests function, but this is clearly inferior to automated testing
  2. from the practical point of view maintaining this tests requires some effort (manually produce and save those reports after each content change). It may be less of a concern now as the content should be relatively stable Therefore the test is not as useful as I initially thought, maybe it can be removed. If we want to keep the test but do not store rtf/html files we may save their content in other format (e.g. Rdata file) or even only save and compare some fragments and/or hash value). Anyway, I am open to know your thoughts
JohnAdders commented 2 years ago

ok thanks, let's leave them in for now