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

Adding Infra and Readme #9

Closed
wants to merge 2 commits into from
Closed

Adding Infra and Readme #9

wants to merge 2 commits into from

Conversation

Bento007
Copy link
Contributor

  • 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.
@Bento007 Bento007 self-assigned this Jan 28, 2020
@Bento007
Copy link
Contributor Author

I will rename consumer to browser

Copy link
Contributor

@maniarathi maniarathi left a 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.

}
}

#TODO make policy
Copy link
Contributor

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.

@@ -0,0 +1,22 @@
#make bucket
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

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:
Copy link
Contributor

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.

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 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__)
Copy link
Contributor

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


Clone the repo and install dependencies:
```
git clona git@github.com:chanzuckerberg/dcp-prototype.git
Copy link
Contributor

Choose a reason for hiding this comment

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

s/clona/clone

@@ -0,0 +1,30 @@
# Consumer Prototype
Copy link
Contributor

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.


Also install [terraform from Hashicorp](https://www.terraform.io/) from your favourite package manager.

# deploy infra
Copy link
Contributor

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
Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

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

favourite? :)

@ryanking
Copy link

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?

@mweiden
Copy link
Contributor

mweiden commented Jan 28, 2020

@Bento007 this might be a good chance for you to check in with @ryanking, learn more about core infra's toolchain, and evaluate it for use on DCP 2.0.

@mckinsel
Copy link
Contributor

@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.

@mckinsel
Copy link
Contributor

Hey @Bento007 , if this is /browser where should Colin be putting his frontend code?

@ryanking
Copy link

@mckinsel yeah our docs are pretty light. I scheduled time with @Bento007 to give an overview

@Bento007 Bento007 closed this Jan 31, 2020
@Bento007 Bento007 deleted the tsmith/consumer-deploy branch February 20, 2020 23:30
pablo-gar added a commit that referenced this pull request Sep 1, 2022
# 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
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.

5 participants