Radiation-Transport / iWW-GVR

A tool to manipulate MCNP weight window (WW) and to generate Global Variance Reduction (GVR) parameters
Other
7 stars 7 forks source link

maintainable == testable #8

Open dvp2015 opened 3 years ago

dvp2015 commented 3 years ago

We've started to learn the package. Looks like it has great functionality, but implementation, let's say, is questionable. I'd like to put some efforts and make this code maintainable and reusable in other applications.

To do this, I adopted the package to the instance of Py3.8 with Paraview installed. The reason of my version choice is that the recent version of Paraview works with py3.8. With the minimal changes the code works fine with py3.8 and most recent versions of the dependencies. The changes are proposed in the pull request "Use py3.8".

However, the words "works fine" for now mean just that the program runs, loops through the menus, reads and writes something with nice progressbars. But I'm not sure that the results are actually correct. To check this I need some test data to start with. Like input weight/meshtal files, scenario of actions and expected output files.

Could you provide me with the some initial set of the test data?

As far as I see, it is still possible to separate core functionality from user interaction interface and apply automatic tests to the core. The core could be used on its own in Jupyter or in batch procedures, for instance. But it's testability, that is even more important for now, than extendability and reuse.

dvp2015 commented 3 years ago

Created pull request to introduce testing framework in the project.