-
Notifications
You must be signed in to change notification settings - Fork 12
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
Adding Infra and Readme #9
Conversation
Bento007
commented
Jan 28, 2020
- Adding instruction to create an AWS S3 bucket to store the
- Adding requirements-dev.txt
- Adding Directory for consumer code
- Adding terraform to build the consumer bucket
- Adding a terraform framework to further build out our terraform.
- Adding instruction to create an AWS S3 bucket to store the - Adding requirements-dev.txt - Adding Directory for consumer code - Adding terraform to build the consumer bucket - Adding a terraform framework to further build out our terraform.
I will rename consumer to browser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please run a linter on these files.. looks like there are a number of formatting issues potentially.
infra/consumer/main.tf
Outdated
} | ||
} | ||
|
||
#TODO make policy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to start good practices, every time we have a TODO, could you please create a ticket in the repo that is tracked and then link the ticket in the TODO itself?
So format would look like:
# TODO(https://github.com/chanzuckerberg/dcp-prototype/pull/9): Make policy.
infra/consumer/main.tf
Outdated
@@ -0,0 +1,22 @@ | |||
#make bucket |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this commented out? As a good practice, let's try to avoid commented out code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's not code. It's just a comment.
@@ -0,0 +1,70 @@ | |||
#!/usr/bin/env python | |||
|
|||
import os |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think ordering of the imports is incorrect. Did you run a linter on this?
profile_setting=profile_setting, | ||
)) | ||
|
||
with open(os.path.join(infra_root, args.component, "variables.tf"), "w") as fp: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try to use descriptive names instead of a few letters representing the object.
fp
-> terraform_file_pointer
for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see no problem with this, name since the name is not used outside of this context and the function is short. fp
is also commonly used in many languages to mean file pointer.
infra_root = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
|
||
parser = argparse.ArgumentParser(description=__doc__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please import each module using the full pathname location of the module:
from argparse import ArgumentParser
Reference to style guide: http://google.github.io/styleguide/pyguide.html#23-packages
dcp-prototype/consumer/README.md
Outdated
|
||
Clone the repo and install dependencies: | ||
``` | ||
git clona git@github.com:chanzuckerberg/dcp-prototype.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/clona/clone
dcp-prototype/consumer/README.md
Outdated
@@ -0,0 +1,30 @@ | |||
# Consumer Prototype |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per our offline conversation, please avoid using consumer/contributor and instead use the module name itself.
dcp-prototype/consumer/README.md
Outdated
|
||
Also install [terraform from Hashicorp](https://www.terraform.io/) from your favourite package manager. | ||
|
||
# deploy infra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep it neat, please. s/deploy infra/Deploy Infrastructure. Or the like.
@@ -127,3 +127,7 @@ dmypy.json | |||
|
|||
# Pyre type checker | |||
.pyre/ | |||
backend.tf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a separate section for terraform?
# Terraform
backend.tf
providers.tf
variables.tf
.terraform
pip install -r requirements.txt | ||
``` | ||
|
||
Also install [terraform from Hashicorp](https://www.terraform.io/) from your favourite package manager. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
favourite? :)
A lot of the stuff you are doing here is already handled (for free) by fogg. Is there a reason you are not using it? |
@ryanking perhaps you could point to some examples or sketch out how this could be done with fogg? The fogg docs say "update fogg.json", which is a little "draw the rest of the owl" as far as instructions go. |
Hey @Bento007 , if this is |
# This is the 1st commit message: Add high level tissue dimension to integrated corpus # This is the commit message #2: fix bug # This is the commit message #3: Change tissue layout # This is the commit message #4: Add to summary cubes # This is the commit message #5: fix bug # This is the commit message #6: Modify placeholder function # This is the commit message #7: Fix bug # This is the commit message #8: Fix bug # This is the commit message #9: Add extra dimension to validation # This is the commit message #10: Update query, update unitest # This is the commit message #11: Refractor query builder