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

Bypass cleanup of temporary dirs if needed #389

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

fraimondo
Copy link
Contributor

@fraimondo fraimondo commented Nov 6, 2024

  • implement the posibility of not cleaning up temporary dirs, to allow for fine-grained debugging
  • tests added/passed
  • add an entry for the latest changes

This PR adds a cleanup parameter to the WorkDirManager, which allows to disable cleaning up temporary directories. While this does not add any important feature to the user, it allows to keep temporary files in case developers want to trace potential issues, mosly when using external tools.

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

Attention: Patch coverage is 20.00000% with 8 lines in your changes missing coverage. Please review.

Project coverage is 87.39%. Comparing base (36a61da) to head (a64253d).

Files with missing lines Patch % Lines
junifer/pipeline/workdir_manager.py 20.00% 4 Missing and 4 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #389      +/-   ##
==========================================
- Coverage   87.52%   87.39%   -0.13%     
==========================================
  Files         129      129              
  Lines        5332     5341       +9     
  Branches      857      861       +4     
==========================================
+ Hits         4667     4668       +1     
- Misses        492      496       +4     
- Partials      173      177       +4     
Flag Coverage Δ
docs 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
junifer/pipeline/workdir_manager.py 75.94% <20.00%> (-8.34%) ⬇️

Copy link

github-actions bot commented Nov 6, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://juaml.github.io/junifer/pr-preview/pr-389/
on branch gh-pages at 2024-11-06 13:52 UTC

@@ -40,15 +40,20 @@ class WorkDirManager:
The path to the element directory.
root_tempdir : pathlib.Path or None
The path to the root temporary directory.
cleanup : bool
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cleanup : bool, optional

@@ -40,15 +40,20 @@ class WorkDirManager:
The path to the element directory.
root_tempdir : pathlib.Path or None
The path to the root temporary directory.
cleanup : bool
If false, the directories are not cleaned up after the object is
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

false -> False

@@ -40,15 +40,20 @@ class WorkDirManager:
The path to the element directory.
root_tempdir : pathlib.Path or None
The path to the root temporary directory.
cleanup : bool
If false, the directories are not cleaned up after the object is
destroyed. This is useful for debugging purposes. Default is True.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

. Default is True. -> purposes (default True).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants