Fix mock_run_vasp to accept args and test docs #151
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces two fixes related to the test system.
Fix
mock_run_vasp
to accept*args
and**kwargs
to match the signature ofrun_vasp
. Otherwise, if a job maker sets some of these arguments (for example, the coming MD maker will sethandler
), the test will fail.Fix doc on writing tests: changing the unit cell of the Si structure to avoid failing check_poscar. In
check_poscar
, theuser
poscar will use a lattice ofwhile the
ref
poscar will use whatever lattice provided in the test file. The current doc on test suggests to useA test will fail if the two do not match. Currently, I just update the doc to make the the same. But I believe there should be better ways to do it. For example, what if a new maker do not want to use Si as the test system? Basically, it seems the
user
poscar is hard-coded? I know it is copied from somewhere to a tmpdir (cwd), but I don't know where the copy happens.Additional dependencies introduced (if any)
None
TODO (if any)
None
Checklist
Work-in-progress pull requests are encouraged, but please put [WIP] in the pull request
title.
Before a pull request can be merged, the following items must be checked:
The easiest way to handle this is to run the following in the correct sequence on
your local machine. Start with running black on your new code. This will
automatically reformat your code to PEP8 conventions and removes most issues. Then run
pycodestyle, followed by flake8.
Run pydocstyle on your code.
type check your code.