-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Temporary directory autoremoval (#148)
This PR adds the option `keep_tmpdirs` to the `workflow` block. If set to `False`, then the workflow, once finished, will delete all the `outdirs` from the calculations it performed. `keep_tmpdirs` is `True` by default. This PR also changes the default value of `from_scratch` from `False` to `True`, because I think this is better choice for the default. Unrelatedly, this PR also moves some old test routines from `koopmans/` into `tests/`, which means they are now run as part of the test suite.
- Loading branch information
Showing
17 changed files
with
73 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,6 @@ coverage: | |
project: off | ||
patch: off | ||
changes: off | ||
|
||
ignore: | ||
- "koopmans/testing" |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule q-e
updated
from 3fb637 to 564a7b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
''' | ||
Tests for koopmans.io | ||
''' | ||
|
||
from ase.build import molecule | ||
from koopmans import utils | ||
from koopmans.workflows import SinglepointWorkflow | ||
from koopmans.io import write, read | ||
|
||
|
||
def test_write_then_read_json(tmpdir): | ||
with utils.chdir(tmpdir): | ||
atoms = molecule('H2O', vacuum=10, tags=['0', '1', '1']) | ||
workflow_out = SinglepointWorkflow(atoms, parameters={'pseudo_library': 'sg15'}, name='test') | ||
write(workflow_out, 'test.json') | ||
workflow_in = read('test.json') | ||
assert workflow_out == workflow_in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from pathlib import Path | ||
from koopmans import utils | ||
from koopmans.qei_to_json import qei_to_json | ||
|
||
|
||
def test_pwi_to_json(tmpdir, datadir): | ||
with utils.chdir(tmpdir): | ||
qei_to_json(datadir / 'qei_to_json' / 'example.pwi', 'example.json') | ||
|
||
|
||
def test_cpi_to_json(tmpdir, datadir): | ||
with utils.chdir(tmpdir): | ||
qei_to_json(datadir / 'qei_to_json' / 'example.cpi', 'example.json') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters