-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/parklab/refinery-platform …
…into scottx611x/django_1.6_upgrade
- Loading branch information
Showing
9 changed files
with
72 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# AWS tags, | ||
# as per https://github.com/parklab/refinery-platform/issues/839 | ||
# Other groups may want to remove this file and use it as a | ||
# suggestion for their own tagging scheme. | ||
department: dbmi | ||
environment: dev | ||
project: scc | ||
product: refinery | ||
subproduct: platform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env python | ||
|
||
""" | ||
Tags local module. | ||
""" | ||
|
||
import glob | ||
import os # for os.popen | ||
|
||
import yaml | ||
|
||
# Get the local user's email address | ||
email = os.popen("git config --get user.email").read().rstrip() | ||
|
||
|
||
def load(): | ||
""" | ||
Tags come from the YAML files in the aws-tags directory, | ||
additionally, the tag `owner` if it is not set by those YAML | ||
files, will be set to the email address of the local git | ||
user. | ||
""" | ||
|
||
tags = {} | ||
for filename in sorted(glob.glob("aws-tags/*")): | ||
with open(filename) as f: | ||
tags.update(yaml.load(f)) | ||
if 'owner' not in tags: | ||
tags['owner'] = email | ||
|
||
return [{'Key': k, 'Value': v} for k, v in tags.items()] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters