Commit 8e33faa
committed
TopoStats classes - Grains
The `Grains` class now works with `TopoStats` classes, however...because `GrainCrops` was used in `TopoStats` and this work meant `TopoStats` was used by `Grains` we introduced a circular dependency which Python, reasonably, complains about. The solution has been to move the class definitions to their own modules `topostats.classes`, but that wasn't without some issues since there are static methods of the `Grains` class that were used _within_ `GrainCrop`. For now these have been moved to the `utils` module and I've started writing tests for them (as they didn't appear to have any).
As a consequence this commit has a lot of things moving around which _will_ make it a pain to review, but hopefully this will be worth it.
For now the whole test suite does _not_ pass all tests because the integration tests where the pipeline is run
end-to-end fails. No attempt has been made to correct this yet because ultimately we would like to simply update the `TopoStats` objects and pass them around and that will only be addressed once each processing step/class has been refactored to work with these.
Subsequent modules should be a little easier to refactor now that the circular dependencies have been broken.1 parent e91b7fa commit 8e33faa
File tree
10 files changed
+353
-1118
lines changed- tests
- topostats
10 files changed
+353
-1118
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
472 | 475 | | |
473 | 476 | | |
474 | 477 | | |
475 | | - | |
| 478 | + | |
476 | 479 | | |
477 | 480 | | |
478 | 481 | | |
| |||
514 | 517 | | |
515 | 518 | | |
516 | 519 | | |
517 | | - | |
| 520 | + | |
518 | 521 | | |
519 | 522 | | |
520 | 523 | | |
| |||
741 | 744 | | |
742 | 745 | | |
743 | 746 | | |
744 | | - | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
745 | 750 | | |
746 | 751 | | |
747 | 752 | | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
748 | 757 | | |
749 | 758 | | |
750 | 759 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments