Skip to content

fix: Create scratch_dir in builder.py and bump version to 0.0.4.dev1 #50

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

Merged
merged 3 commits into from
Dec 10, 2018

Conversation

jfuss
Copy link
Contributor

@jfuss jfuss commented Dec 10, 2018

Issue #, if available:

Description of changes:
Create the scratch directory in the builder so each workflow can safely assume the directory is available to use.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@sanathkr sanathkr 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. Minor test comments for windows compat

@@ -1 +1 @@
six~=1.11.0
six~=1.11
Copy link
Contributor

Choose a reason for hiding this comment

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

thanks!

@@ -19,6 +19,7 @@ def setUp(self):

self.source_dir = tempfile.mkdtemp()
self.artifacts_dir = tempfile.mkdtemp()
self.scratch_dir = "/tmp/scratch"
Copy link
Contributor

Choose a reason for hiding this comment

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

windows

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would expect that to fail in appveyor through.

@@ -19,6 +19,7 @@ def setUp(self):

self.source_dir = tempfile.mkdtemp()
self.artifacts_dir = tempfile.mkdtemp()
self.scratch_dir = "/tmp/scratch"
Copy link
Contributor

Choose a reason for hiding this comment

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

windows?

You should really use a tempfile here instead of /tmp/scratch because the test will be creating this directory.

You can use something like os.path.join(tempfile.mkdtemp(), "scratch") to save yourself the headache of finding a temp filename yourself

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't think of this. I first thought of doing tempfile.mkdtemp() but that creates the directory, which is why I did what I did. Will update.

@jfuss jfuss merged commit eb40e78 into aws:develop Dec 10, 2018
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