Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing scripts & plugins #133

Open
JarrettSJohnson opened this issue Apr 26, 2023 · 4 comments
Open

Testing scripts & plugins #133

JarrettSJohnson opened this issue Apr 26, 2023 · 4 comments

Comments

@JarrettSJohnson
Copy link
Contributor

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 for pymol-testing)?
  3. any sharable code that would be nice to have from pymol-testing (to cut redundancy if possible)? Using pymol-testing as a submodule here could be an option to share some of those functions.
@speleo3
Copy link
Contributor

speleo3 commented Apr 26, 2023

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().

@pslacerda
Copy link
Member

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.

@pslacerda
Copy link
Member

pslacerda commented Jun 9, 2024

Oops, I rather say to choose some current/old plugins/scripts to test and have it as example.

@pslacerda
Copy link
Member

pslacerda commented Jun 9, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants