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

Renaming remove_temp_files to remove_temp_dir_on_exit #1466

Merged
merged 4 commits into from
Sep 15, 2022

Conversation

germa89
Copy link
Collaborator

@germa89 germa89 commented Sep 7, 2022

Close #1387 by renaming remove_temp_files to remove_temp_dir_on_exit which I believe it is more accurate and self descriptive.

I have also implemented a warning.

@germa89 germa89 added Enhancement Improve any current implemented feature New Feature Request or proposal for a new feature labels Sep 7, 2022
@germa89 germa89 added this to the v0.64.0 milestone Sep 7, 2022
@germa89 germa89 self-assigned this Sep 7, 2022
@codecov
Copy link

codecov bot commented Sep 7, 2022

Codecov Report

Merging #1466 (8949acd) into main (b67b2ce) will increase coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1466      +/-   ##
==========================================
+ Coverage   80.32%   80.42%   +0.09%     
==========================================
  Files          43       43              
  Lines        6780     6773       -7     
==========================================
+ Hits         5446     5447       +1     
+ Misses       1334     1326       -8     

@germa89
Copy link
Collaborator Author

germa89 commented Sep 7, 2022

The option stack_level in:

warnings.warn(
                "The option ``remove_temp_files`` is being deprecated and it will be removed by PyMAPDL version 0.66.0.\n"
                "Please use ``remove_temp_dir_on_exit`` instead.",
                DeprecationWarning,
                stacklevel=2,
            )

is useful to make the warning shows in the main process and also to:

This makes the warning refer to deprecation()’s caller, rather than to the source of deprecation() itself (since the latter would defeat the purpose of the warning message).

Reference: https://docs.python.org/3/library/warnings.html#warnings.warn

@germa89
Copy link
Collaborator Author

germa89 commented Sep 7, 2022

The option stack_level in:

warnings.warn(
                "The option ``remove_temp_files`` is being deprecated and it will be removed by PyMAPDL version 0.66.0.\n"
                "Please use ``remove_temp_dir_on_exit`` instead.",
                DeprecationWarning,
                stacklevel=2,
            )

is useful to make the warning shows in the main process and also to:

This makes the warning refer to deprecation()’s caller, rather than to the source of deprecation() itself (since the latter would defeat the purpose of the warning message).

Reference: https://docs.python.org/3/library/warnings.html#warnings.warn

Pinging @pyansys/pyansys-core FYI.

Copy link
Collaborator Author

@germa89 germa89 left a comment

Choose a reason for hiding this comment

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

LGTM.

@germa89 germa89 merged commit f938e20 into main Sep 15, 2022
@germa89 germa89 deleted the feat/renaming-remove_temp_files-to-remove_temp_dir branch September 15, 2022 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improve any current implemented feature New Feature Request or proposal for a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Removing remove_temp_files option
1 participant