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

Fix output directory creation #409

Merged
merged 4 commits into from
Jan 29, 2018
Merged

Conversation

desilinguist
Copy link
Member

@desilinguist desilinguist commented Jan 26, 2018

  • We had a bug in the code where _locate_file() was being called and we were depending on its return value to decide whether to create the output directories or not. However _locate_file() raises an exception when the file doesn't already exist, so this was a total waste of time.
  • I fixed the code so that we actually catch the exception for non-existent output directories and then use that to create the directories if needed.
  • For the tests, I simply removed the pre-test manual creation of the output directory from test_output.py such that the automatic directory creation will be tested.

@coveralls
Copy link

coveralls commented Jan 26, 2018

Coverage Status

Coverage increased (+0.2%) to 92.684% when pulling 9d0c8a9 on fix-output-directory-creation into 322749b on master.

@desilinguist
Copy link
Member Author

Ugh, stupid coveralls! :(

@desilinguist
Copy link
Member Author

desilinguist commented Jan 26, 2018

@aoifecahill @Lguyogiro @benbuleong @jbiggsets This is now ready for review. Please actually try an experiment on your local machines with directories to make sure.

Copy link
Contributor

@Lguyogiro Lguyogiro left a comment

Choose a reason for hiding this comment

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

Looks good, and worked for me.

@desilinguist
Copy link
Member Author

@benbuleong since you filled the original issue, can you please review this? @aoifecahill if you could test it too, it'd be great!

@benbuleong
Copy link
Member

benbuleong commented Jan 29, 2018

@desilinguist : Sure, I will review it by EOD

Copy link
Collaborator

@aoifecahill aoifecahill left a comment

Choose a reason for hiding this comment

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

Thanks, I tried it out and it worked for me :)

@desilinguist desilinguist merged commit dc9644c into master Jan 29, 2018
@desilinguist desilinguist deleted the fix-output-directory-creation branch January 29, 2018 21:50
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

6 participants