Skip to content

Commit 7507b74

Browse files
committed
fix typos, better doc string format in atomate/qchem/fireworks/core.py
1 parent a8e737e commit 7507b74

34 files changed

+246
-290
lines changed

atomate/common/firetasks/glue_tasks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ def setup_copy(
344344
(e.g., rename 'INCAR' to 'INCAR.precondition')
345345
continue_on_missing(bool): Whether to continue copying when a file
346346
in filenames is missing. Defaults to False.
347-
from_path_dict (dict): dict specification of the path. If specified must contain atleast
348-
the key "path" that specifies the path to the from_dir.
347+
from_path_dict (dict): dict specification of the path. If specified must contain at
348+
least the key "path" that specifies the path to the from_dir.
349349
"""
350350
from_path_dict = from_path_dict or {}
351351
from_dir = env_chk(from_dir, fw_spec, strict=False) or from_path_dict.get(

atomate/feff/firetasks/glue_tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class CopyFeffOutputs(CopyFiles):
1818
search for the most recent calc_loc with the matching name.
1919
calc_dir (str): path to dir that contains VASP output files.
2020
filesystem (str): remote filesystem. e.g. username@host
21-
exclude_files (list): list fo filenames to be excluded when copying.
21+
exclude_files (list): list of filenames to be excluded when copying.
2222
"""
2323

2424
optional_params = ["calc_loc", "calc_dir", "filesystem", "exclude_files"]

atomate/feff/firetasks/parse_outputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class AddPathsToFilepadTask(FiretaskBase):
103103
Optional_params:
104104
labels (list): list of labels to tag the inserted files. Useful for querying later.
105105
filepad_file (str): path to the filepad connection settings file.
106-
compress (bool): wether or not to compress the file contents before insertion.
106+
compress (bool): Whether or not to compress the file contents before insertion.
107107
metadata (dict): metadata.
108108
"""
109109

atomate/feff/firetasks/tests/test_tasks.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ def setUp(self):
2727
def test_copy_feff_outputs_task(self):
2828
t = CopyFeffOutputs(calc_dir=os.path.join(module_dir, "..", "..", "test_files"))
2929
t.run_task({})
30-
ans = ["Co2O2.cif", "feff_eels.inp", "feo_781777.json"]
30+
answer = ["Co2O2.cif", "feff_eels.inp", "feo_781777.json"]
3131
files = glob("*")
32-
self.assertEqual(sorted(ans), sorted(files))
32+
self.assertEqual(sorted(answer), sorted(files))
3333

3434
def test_write_paths_task(self):
3535
exafs = MPEXAFSSet(0, self.struct, edge="K", radius=10)
3636
t = WriteEXAFSPaths(feff_input_set=exafs, paths=[[249, 0], [85, 0]])
3737
paths = Paths(exafs.atoms, [[249, 0], [85, 0]])
38-
paths.write_file("paths_ans.dat")
38+
paths.write_file("paths_answer.dat")
3939
t.run_task({})
40-
with open("paths_ans.dat") as ans, open("paths.dat") as tmp:
41-
self.assertEqual(ans.readlines(), tmp.readlines())
40+
with open("paths_answer.dat") as answer, open("paths.dat") as tmp:
41+
self.assertEqual(answer.readlines(), tmp.readlines())
4242

4343

4444
if __name__ == "__main__":

atomate/feff/fireworks/tests/test_fireworks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ def test_exafs_paths_fw(self):
2424
fw = EXAFSPathsFW(0, self.struct, [[249, 0], [85, 0]])
2525
fw_dict = fw.as_dict()
2626
self.assertEqual(len(fw_dict["spec"]["_tasks"]), 5)
27-
ans = [
27+
answer = [
2828
"{{atomate.feff.firetasks.glue_tasks.CopyFeffOutputs}}",
2929
"{{atomate.feff.firetasks.write_inputs.WriteFeffFromIOSet}}",
3030
"{{atomate.feff.firetasks.write_inputs.WriteEXAFSPaths}}",
3131
"{{atomate.feff.firetasks.run_calc.RunFeffDirect}}",
3232
"{{atomate.feff.firetasks.parse_outputs.AddPathsToFilepadTask}}",
3333
]
34-
self.assertEqual(ans, [ft["_fw_name"] for ft in fw_dict["spec"]["_tasks"]])
34+
self.assertEqual(answer, [ft["_fw_name"] for ft in fw_dict["spec"]["_tasks"]])
3535

3636

3737
if __name__ == "__main__":

atomate/feff/workflows/tests/test_exafs_scattering_paths.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def setUp(self):
2929

3030
def test_wflow_composition(self):
3131
self.assertEqual(len(self.wf_dict["fws"]), 2)
32-
ans = sorted(["FeO-EXAFS-K-0", "FeO-EXAFS Paths"])
33-
self.assertEqual(ans, sorted(ft["name"] for ft in self.wf_dict["fws"]))
32+
answer = sorted(["FeO-EXAFS-K-0", "FeO-EXAFS Paths"])
33+
self.assertEqual(answer, sorted(ft["name"] for ft in self.wf_dict["fws"]))
3434

3535
def test_feff_input_sets(self):
3636
ans_fis_fw1 = {

atomate/lammps/drones.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def assimilate(
6868
path (str): path to the run folder
6969
input_filename (str): just the name of the input file
7070
log_filename (str): lammps log file name
71-
is_forcefield (bool): whether or not ot parse forcefield info
71+
is_forcefield (bool): whether or not to parse forcefield info
7272
data_filename (str): name of the data file
7373
dump_files ([str]): list of dump file names
7474

atomate/lammps/firetasks/glue_tasks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ class CopyPackmolOutputs(CopyFiles):
1818
search for the most recent calc_loc with the matching name.
1919
calc_dir (str): path to dir that contains VASP output files.
2020
filesystem (str): remote filesystem. e.g. username@host
21-
exclude_files (list): list fo filenames to be excluded when copying.
22-
NOte: by default nothing is excluded.
21+
exclude_files (list): list of filenames to be excluded when copying.
22+
Note: by default nothing is excluded.
2323
"""
2424

2525
optional_params = ["calc_loc", "calc_dir", "filesystem", "exclude_files"]

atomate/lammps/workflows/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def get_wf_basic(
3131
Args:
3232
input_file (str): path to lammps input file.
3333
Note: It could be a template file too, then the user_settings must be set.
34-
user_settings ([dict] or dict): list of settings dict. if the input_file is a tempalte file
34+
user_settings ([dict] or dict): list of settings dict. if the input_file is a template file
3535
then each dict contains the key value pairs for the template file.
3636
lammps_data (string/LammpsData/LammpsForceFieldData): path to the data file or
3737
an appropriate object.
@@ -110,7 +110,7 @@ def get_packmol_wf(
110110
111111
Args:
112112
input_file (str): path to lammps input(or template) file.
113-
user_settings ([dict] or dict): list of settings dict. if the input_file is a tempalte file
113+
user_settings ([dict] or dict): list of settings dict. if the input_file is a template file
114114
then each dict contains the key value pairs for the template file.
115115
constituent_molecules ([Molecules]): list of pymatgen Molecule objects
116116
packing_config ([dict]): list of configuration dictionaries, one for each constituent molecule.

atomate/qchem/drones.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def __init__(self, runs=None, additional_fields=None):
6363
"""
6464
Initialize a QChem drone to parse qchem calculations
6565
Args:
66-
runs (list): Naming scheme for multiple calcuations in one folder
66+
runs (list): Naming scheme for multiple calculations in one folder
6767
additional_fields (dict): dictionary of additional fields to add to output document
6868
"""
6969
self.runs = runs or list(
@@ -151,7 +151,7 @@ def generate_doc(self, dir_name, qcinput_files, qcoutput_files, multirun):
151151
d["schema"] = {"code": "atomate", "version": QChemDrone.__version__}
152152
d["dir_name"] = fullpath
153153

154-
# If a saved "orig" input file is present, parse it incase the error handler made changes
154+
# If a saved "orig" input file is present, parse it in case the error handler made changes
155155
# to the initial input molecule or rem params, which we might want to filter for later
156156
if len(qcinput_files) > len(qcoutput_files):
157157
orig_input = QCInput.from_file(

0 commit comments

Comments
 (0)