Image-Py / imagepy

Image process framework based on plugin like imagej, it is esay to glue with scipy.ndimage, scikit-image, opencv, simpleitk, mayavi...and any libraries based on numpy
http://imagepy.org
BSD 4-Clause "Original" or "Old" License
1.29k stars 330 forks source link

Testing and CI #12

Open jakirkham opened 6 years ago

jakirkham commented 6 years ago

Would be good to have some unit tests and regression tests. Also would be good to setup CI. Probably Travis CI for Linux would be a good start. Happy to provide more pointers if needed.

yxdragon commented 6 years ago

hi @jakirkham can you tell me what is CI? I had seach some information, but...

jakirkham commented 6 years ago

Sure. Hope this helps. Please feel free to ask more questions if any of it is unclear.

CI is short for Continuous Integration. If that is not any clearer, it is a service that builds the code from scratch in a clean environment (e.g. VM) and tests it. This includes getting any dependencies, handling compilation (not relevant here FWICT), running the full test suite, possibly other checks (e.g. style checks), etc. If all the test passes, the commit will be given passing status. If any test fails, the commit will be given a failing status. GitHub nicely shows this as a green checkmark or red X.

This process is incredibly helpful as it makes it easier to catch regressions before they enter the codebase (by testing PRs) and allows one to correct them before merging. Also it provides some guarantee to end users that the code works reliably in a standard way. There are CIs for every major OS. So this really helps when testing on a platform you may not personally have access to (e.g. macOS or Windows in some cases).

Some relevant links are included below for more info. Common CIs to use with OSS include Travis CI (macOS and Linux), CircleCI (Linux), and AppVeyor (Windows). These provide some free tier for OSS, which is typically what people use. However there are paid tiers with other features. There are plenty more if one of these doesn't fit your needs. GitHub has a short list. Also sometimes people will set up their own CI internally and connect it with GitHub.

ref: https://aws.amazon.com/devops/continuous-integration/ ref: https://en.wikipedia.org/wiki/Continuous_integration ref: https://martinfowler.com/articles/continuousIntegration.html (a longer historical anecdote)

yxdragon commented 6 years ago

@jakirkham Thanks, I konw, but ImagePy is not a algrithm lib, almost any plugins have matter with ui. Did you have some advice to do CI with ui? ImagePy just can test if it is loaded successfully now.

ImagePy is a ui-frame which can integrate any numpy based function. If someone wrote a algrithm, I think he should push it to scikit-image, or push it in pypi. Then use ImagePy to wrap it, then no-programer could use it.

I saw you are a member of jupyter. I want to build a web-based ui at first. but I found jupyter is not power enough on interaction (may be I do not understand jupyter deeply), and I am not good at javascript, so I choose wx. but I want do build a web imagepy someday.

yxdragon commented 6 years ago

@jakirkham Hi, It's you, when I try to upload imagepy on conda-forge, I know what is CI, so I thought someone had told me CI, when I check the issue, I found it's you! Thanks for your help. And I will think if it is possible to build a CI framework to publish or download imagepy plugins.