gimseng / 99-ML-Learning-Projects

A list of 99 machine learning projects for anyone interested to learn from coding and building projects
MIT License
577 stars 174 forks source link

Create unit test / CI #15

Open gimseng opened 3 years ago

gimseng commented 3 years ago

Perform CI (purest) for code reviews. I am not entirely sure about how to do that for Jupyter notebook (.ipynb) but was reading around the internet and it seems like catching the error when converting it to .py file is the way to go.

gimseng commented 3 years ago

Also pep8 lint test. Actually there's been a discussion on how to do that for Jupyter notebook. See https://stackoverflow.com/questions/26126853/verifying-pep8-in-ipython-notebook-code

gimseng commented 3 years ago

[x] Create flake8 (pep8) lint test whenever pull-request occurs. This applies to all .py file. See #30 [ ] Create flake8 for Jupyter notebook

gimseng commented 3 years ago

I think since we are not building a package or library, it doesn’t make send to do too much testing. At this point pep8 linting and if the codes run without error, that should be a good starting point.

gimseng commented 3 years ago

Finally found the solution to deal with module, testing and version control with notebooks. The nbdev package of fast.ai provides such a solution. See https://www.fast.ai/2019/12/02/nbdev/

It also generates documentations so that you can read the notebook like a HTML page with figs and etc. I guess that's how fast.ai courses are built.

We could potentially use this tool to build up a static markdown page as a textbook-like page.

gimseng commented 3 years ago

There are two other solutions that are closely related to the above development: https://github.com/jupyterlab/jupyterlab-git and https://www.reviewnb.com

Might be interesting to think about version control with this as well

gimseng commented 3 years ago

Finally, we can imagine going all colab. If notebooks can work out to be the main way to go and we use colab as our prefer 'IDE', nbdev + colab is a possible way to standardise everything.

See https://forums.fast.ai/t/using-nbdev-with-google-colab/61755/12