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

remove post files after a restart #30

Merged
merged 3 commits into from
Feb 16, 2017

Conversation

josep-m-carbonell
Copy link
Member

remove post files after a restart, so lists are rebuild correctly

@josep-m-carbonell
Copy link
Member Author

The pull request #28 was an error, nothing was applied. Here the correct commit for this feature.

@@ -645,3 +653,48 @@ def __remove_list_files(self):
os.remove(f)
except WindowsError:
pass

#
def __remove_post_results_files(self, step_label):
Copy link
Member

Choose a reason for hiding this comment

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

Why you are using the double underline "__" for this method? The naming convention of Python here says that it would do the name mangling to the class name which I'm not sure is what you intended.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes you are right, it must be only a single underline for an internal method. I was following the notation or style found in the script. Maybe some of the internal methods have to be revised too. @jcotela

Copy link
Member

Choose a reason for hiding this comment

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

Well, I deliberately used double leading underscore for internal stuff (things that, if I was in C, I would declare as private functions). If you prefer to avoid name mangling, this is something I would be open to discuss.

I agree that this kind of magical python stuff should not be used without a good reason, however.

Copy link
Member

@RiccardoRossi RiccardoRossi Feb 16, 2017

Choose a reason for hiding this comment

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

i think that __ is for builtings, like __ init __()

if you want to show something is private it is 1 underscore at the beginning.

still, my proposal would be to accept it for now...

Riccardo

Copy link
Member Author

@josep-m-carbonell josep-m-carbonell Feb 16, 2017

Choose a reason for hiding this comment

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

The double underline __ is not something new in this file. If it is not desired it would be better to correct it in all methods after this merge. Because this is mainly a file of @jcotela, maybe he can change it carefully later on.

Copy link
Member

Choose a reason for hiding this comment

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

I agree with @josep-m-carbonell that we shouldn't stop this commit until we agree on a naming convention. I'm giving my OK and creating a new issue (#42) to continue the discussion.

Copy link
Member Author

@josep-m-carbonell josep-m-carbonell Feb 16, 2017

Choose a reason for hiding this comment

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

Thank you Jordi 👍

Copy link
Member

@jcotela jcotela left a comment

Choose a reason for hiding this comment

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

👍

@josep-m-carbonell josep-m-carbonell merged commit 5409ce5 into master Feb 16, 2017
@josep-m-carbonell josep-m-carbonell deleted the feature-gid-output-delete-post-files branch February 16, 2017 14:51
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.

None yet

4 participants