fastai/fast_template

Adding Automated Tests

hamelsmu opened this issue · 5 comments

I would love to add automated tests to ensure that the conversion pipeline happens properly, but I need a place to put dummy notebooks and word docs. Let me know if you have suggestions, I know we wanted to leave these files out of the repo initially to avoid confusion.

Let me know if you have any suggestions on this and I will write the tests, this is what I have in mind for the tests:

  • test that notebooks/word docs can be converted to .md without error
  • test that the Jekyll build happens without error (I could use the same version of Jekyll as GitHub pages)

Where would the tests themselves be though? If it adds more Python, then maybe rename _action_files to something like scripts, add a test subfolder there, and put test notebooks and word files in the test folder?

I would put the tests as actions that attempt to build the page but not publish them, just to see if there are any errors. Given #20, it would only be in the advanced repo

Update: Here is what the "integration" test looks like its basically a build but you don't save the build. I suppose we could add unit tests etc but would need to think more about what those look like

Just struck me that you can actually just create a github repo, say fastai/fast_tempalte_tests, and put a test ipynb and word docs there. Then, in the gh action, you just download that file, put it in the _notebooks folder, and run the full pipeline. That way it doesn't add any complexity for users at all.

Closing this issue b/c moved questions to this fastai - nbdev forum post