Closed Andrew-S-Rosen closed 1 year ago
I've just started adding black formatting and flake8 linting, along with pre-commit. Most of the linting issues still need to be fixed though.
For testing, I need to rethink how this is organized. Right now, it's just a bunch of pytests. Some tests take a bit more time and require a GPU (for training, or testing GPU MD), whereas others are unnecessarily slow. Ideally, we split it in two parts: the first part (mostly unit tests) which is fast to execute (couple minutes tops) and does not require special hardware; this can run via github actions. The second part should be allowed to use the GPU and may take slightly longer to run (up to an hour). Ideally, I'd set this up to run on a cluster since github runners don't have GPU resources.
Thanks for the info! That's what I was expecting as well, so that's good to know. I think your proposal makes a lot of sense. You can have the latter run on an as-needed basis. If they are crucial to run for PRs, then you could always do some monkeypatching, but it's always nice to avoid that when possible. But anyway, this is all good to know for when I make changes --- I'm doing this all locally on my Linux machine.
If you're up to it, when you do split the test suite, it would be helpful to make a dedicated section in the docs for how to contribute. For instance, how to install Psiflow in editable mode with the test dependencies, how to run the test suite locally, etc.
Just wanted to inquire if there are any specifics with regards to development. For instance, does the project use a given formatter/linter (doesn't seem like black or isort, for instance)? And is there a preferred way to run the test suite? It doesn't look like it runs on GitHub Actions since CI isn't set up, so I assume
pytest
locally is sufficient?