Open JarrettSJohnson opened 1 year ago
I like your points. One point I could add is that I'm pretty happy with the minimal style of tests in pymol-psico. There is no shared infrastructure code. Every test function calls cmd.reinitialize()
.
It would be an heroic work in my opinion because all the plugins should be properly understood in order to achieve this. But I agree with minimalist tests like ones at pymol-psico
using pytest
.
Oops, I rather say to choose some current/old plugins/scripts to test and have it as example.
What is pymol-testing
?
What is the purpose of ./modules/
dir? It is still useful?
I think that plugins/scripts with multiple files like code, example and data file (like color_by_conservation
) should be moved to a its own directory. Single file plugins/scripts (code only) are keep as is at the same level of multi-file plugins. Is this structure coherent with the Plugin Manager discovery GUI?
Then tests can be placed in it's own directory like at pymol-psico
or inside each the multi-file plugin directories because both is discoverable by pytest
.
There is any difference between code at root and at plugins
directory?
As suggested in #132 , tests would be nice to have, but there's currently no foundation in place in this repository. Perhaps we should start looking into some. I'm creating a quick plugin that I plan on writing tests for but before submitting them, we should probably agree on what those would look like. Couple of points that pop up in my head are:
1) data files for test to be directly stored in this repo or downloadable from a script checked-in from this repo (in case of size concerns). 2) are we to use
pytest
(as we're currently trying forpymol-testing
)? 3) any sharable code that would be nice to have frompymol-testing
(to cut redundancy if possible)? Usingpymol-testing
as a submodule here could be an option to share some of those functions.