Remove legacy code#129
Conversation
|
What is your opinion on this? Should we remove the legacy code or not? @spossann |
Remove! |
And for the unit tests comparing results with the legacy code, do we simply remove the comparisons? For example: assert xp.allclose(val1, val_legacy_1)
assert xp.allclose(val2, val_legacy_2)
assert xp.allclose(val3, val_legacy_3) |
Yes, let's see if we can come up with better tests than comparing to legacy, or if we even can remove some tests. We can have an overview from the diff once legacy (and asserts such as above) are removed. |
Is everything in |
yes |
|
It seems he cache keys are not found: https://github.com/struphy-hub/struphy/actions/runs/19594704808/job/56117778007?pr=129eems There are indeed cache access redtrictions. Mainly, cache is for a specific branch only. However, the main branch and the parent branch are also searched. |
|
Are
|
No, |
… between struphy and psydac
Ok, but they have a dependency of I can restore |
…into 53-delete-all-legacy-code
…and commented code
|
All caches from |
Nice! This job didn't find any caches https://github.com/struphy-hub/struphy/actions/runs/19597024059/job/56122994683 So we can just restart it afterwards and it should be much faster. Edit: Much faster now! |
|
@spossann This feels so nice, right? |
Indeed! |
**Solves the following issue(s):** This PR deletes 30% of Struphy 🔥 Closes #53 [Before](https://github.com/struphy-hub/struphy/actions/runs/19582267477/job/56082877544): ``` github.com/AlDanial/cloc v 2.07 T=1.60 s (305.3 files/s, 153523.9 lines/s) ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Python 320 39591 44599 149587 YAML 54 447 278 4116 reStructuredText 81 1565 1354 2000 Markdown 6 242 0 661 INI 3 36 0 212 TOML 1 12 5 172 Dockerfile 5 40 61 163 Jupyter Notebook 1 0 158 79 Bourne Shell 8 47 176 72 make 3 25 38 61 Text 3 0 0 34 DOS Batch 1 8 1 26 CSS 2 3 3 9 HTML 1 0 0 4 ------------------------------------------------------------------------------- SUM: 489 42016 46673 157196 ------------------------------------------------------------------------------- ``` After: ``` github.com/AlDanial/cloc v 2.07 T=1.08 s (400.6 files/s, 173606.2 lines/s) ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Python 263 31506 36248 106950 YAML 54 447 278 4116 reStructuredText 81 1565 1354 2000 Markdown 6 242 0 661 INI 3 36 0 212 TOML 1 12 5 172 Dockerfile 5 40 61 163 Jupyter Notebook 1 0 158 79 Bourne Shell 7 43 176 61 make 3 25 38 61 Text 3 0 0 34 DOS Batch 1 8 1 26 CSS 2 3 3 9 HTML 1 0 0 4 ------------------------------------------------------------------------------- SUM: 431 33927 38322 114548 ------------------------------------------------------------------------------- ``` **Core changes:** - [x] Remove `src/struphy/eigenvalue_solvers/` - [x] Remove testing of legacy code Note: I tried to only remove the legacy struphy related lines in the tests, this means that there are still many lines remaining where psydac arrays are created, but not compared to anything. --------- Co-authored-by: Stefan Possanner <stefan.possanner@ipp.mpg.de>
Solves the following issue(s):
This PR deletes 30% of Struphy 🔥
Closes #53
Before:
After:
Core changes:
src/struphy/eigenvalue_solvers/Note: I tried to only remove the legacy struphy related lines in the tests, this means that there are still many lines remaining where psydac arrays are created, but not compared to anything.