Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create temp directory into output directory and download there #73

Merged
merged 5 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions fusion_report/common/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,11 @@ def get_mitelman(self, return_err: List[str]) -> None:

@staticmethod
def clean():
"""Remove all files except *db."""
for temp in glob.glob("*/"):
shutil.rmtree(temp)
for temp in glob.glob("*[!.db]"):
if not os.path.isdir(temp):
os.remove(temp)
"""Remove all files except *db and move to output dir."""
for temp in glob.glob("*.db"):
shutil.copy(temp, "../")
os.chdir("../")
shutil.rmtree("tmp_dir")

@staticmethod
def timestamp():
Expand Down
5 changes: 4 additions & 1 deletion fusion_report/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ def validate(self, params: Namespace) -> None:
def download_all(self, params: Namespace) -> None:
"""Download all databases."""
return_err: List[str] = []
os.chdir(params.output)
tmp_dir = os.path.join(params.output, "tmp_dir")
if not os.path.exists(tmp_dir):
os.mkdir(tmp_dir)
os.chdir(tmp_dir)

# MITELMAN
Net.get_mitelman(self, return_err)
Expand Down
2 changes: 0 additions & 2 deletions fusion_report/modules/index_summary/index_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ def tool_detection(self) -> List[List[Any]]:
counts["together"] = 0
running_tools_count: int = len(running_tools)
for fusion in self.manager.fusions:
print(fusion.name)
fusion_tools = fusion.tools.keys()
for tool in fusion_tools:
print(tool)
counts[tool] += 1
# intersection
if len(fusion_tools) == running_tools_count:
Expand Down
Loading