Skip to content

Commit

Permalink
Improved tmp_files removal and added ipython docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
gbayarri committed Jan 23, 2025
1 parent dee3762 commit 2237919
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 8 deletions.
5 changes: 4 additions & 1 deletion biobb_pmx/pmxbiobb/pmxanalyse.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ def launch(self) -> int:
self.copy_to_host()

self.tmp_files.extend(
[self.stage_io_dict.get("unique_dir", ""), list_a_dir, list_b_dir]
# [self.stage_io_dict.get("unique_dir", ""), list_a_dir, list_b_dir]
[list_a_dir, list_b_dir]
)
self.remove_tmp_files()

Expand All @@ -270,6 +271,8 @@ def pmxanalyse(
properties=properties,
).launch()

pmxanalyse.__doc__ = Pmxanalyse.__doc__


def main():
"""Command line execution of this building block. Please check the command line documentation."""
Expand Down
4 changes: 3 additions & 1 deletion biobb_pmx/pmxbiobb/pmxatom_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def launch(self) -> int:
# Copy files to host
self.copy_to_host()

self.tmp_files.append(self.stage_io_dict.get("unique_dir", ""))
# self.tmp_files.append(self.stage_io_dict.get("unique_dir", ""))
self.remove_tmp_files()

self.check_arguments(output_files_created=True, raise_exception=False)
Expand Down Expand Up @@ -309,6 +309,8 @@ def pmxatom_mapping(
**kwargs,
).launch()

pmxatom_mapping.__doc__ = Pmxatom_mapping.__doc__


def main():
"""Command line execution of this building block. Please check the command line documentation."""
Expand Down
5 changes: 4 additions & 1 deletion biobb_pmx/pmxbiobb/pmxcreate_top.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ def launch(self) -> int:
# Copy files to host
self.copy_to_host()

self.tmp_files.append(self.stage_io_dict.get("unique_dir", ""))
# self.tmp_files.append(self.stage_io_dict.get("unique_dir", ""))
self.tmp_files.extend([self.tmp_folder])
self.remove_tmp_files()

self.check_arguments(output_files_created=True, raise_exception=False)
Expand All @@ -214,6 +215,8 @@ def pmxcreate_top(
**kwargs,
).launch()

pmxcreate_top.__doc__ = Pmxcreate_top.__doc__


def main():
"""Command line execution of this building block. Please check the command line documentation."""
Expand Down
6 changes: 4 additions & 2 deletions biobb_pmx/pmxbiobb/pmxgentop.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ def launch(self) -> int:
out_log=self.out_log,
)

self.tmp_files.extend([self.stage_io_dict.get("unique_dir", ""), top_dir])
# self.remove_tmp_files()
self.tmp_files.extend([self.stage_io_dict.get("unique_dir", ""), top_dir, unique_dir_output_file])
self.remove_tmp_files()

self.check_arguments(output_files_created=True, raise_exception=False)
return self.return_code
Expand All @@ -265,6 +265,8 @@ def pmxgentop(
**kwargs,
).launch()

pmxgentop.__doc__ = Pmxgentop.__doc__


def main():
"""Command line execution of this building block. Please check the command line documentation."""
Expand Down
4 changes: 3 additions & 1 deletion biobb_pmx/pmxbiobb/pmxligand_hybrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def launch(self) -> int:
# Copy files to host
self.copy_to_host()

self.tmp_files.append(self.stage_io_dict.get("unique_dir", ""))
# self.tmp_files.append(self.stage_io_dict.get("unique_dir", ""))
self.remove_tmp_files()

self.check_arguments(output_files_created=True, raise_exception=False)
Expand Down Expand Up @@ -285,6 +285,8 @@ def pmxligand_hybrid(
properties=properties,
).launch()

pmxligand_hybrid.__doc__ = Pmxligand_hybrid.__doc__


def main():
"""Command line execution of this building block. Please check the command line documentation."""
Expand Down
5 changes: 4 additions & 1 deletion biobb_pmx/pmxbiobb/pmxmerge_ff.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ def launch(self) -> int:
# Copy files to host
self.copy_to_host()

self.tmp_files.append(self.stage_io_dict.get("unique_dir", ""))
# self.tmp_files.append(self.stage_io_dict.get("unique_dir", ""))
self.tmp_files.extend([self.tmp_folder])
self.remove_tmp_files()

self.check_arguments(output_files_created=True, raise_exception=False)
Expand All @@ -165,6 +166,8 @@ def pmxmerge_ff(
**kwargs,
).launch()

pmxmerge_ff.__doc__ = Pmxmerge_ff.__doc__


def main():
"""Command line execution of this building block. Please check the command line documentation."""
Expand Down
5 changes: 4 additions & 1 deletion biobb_pmx/pmxbiobb/pmxmutate.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ def launch(self) -> int:
# Copy files to host
self.copy_to_host()

self.tmp_files.append(self.stage_io_dict.get("unique_dir", ""))
# self.tmp_files.append(self.stage_io_dict.get("unique_dir", ""))
self.tmp_files.extend([mutations_dir])
self.remove_tmp_files()

self.check_arguments(output_files_created=True, raise_exception=False)
Expand All @@ -211,6 +212,8 @@ def pmxmutate(
**kwargs,
).launch()

pmxmutate.__doc__ = Pmxmutate.__doc__


def main():
"""Command line execution of this building block. Please check the command line documentation."""
Expand Down

0 comments on commit 2237919

Please sign in to comment.