Skip to content

Commit 47550b7

Browse files
Heroku ready (#276)
* Get heroku ready * Add yml file * Remove unneeded files * Remove deploy files * Remove check for services being ready * Update logs * Update logging * Updating tc root * Logging for photos * Logging for setting an image * More logging * Images to aws * Remove hash test * Storing images in s3 and tests * Adding secrets * Tests * Add runtime * Fix deploy * Install boto3 * Fix images * Remove end2end
1 parent 705a57d commit 47550b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+154
-607
lines changed

.editorconfig

-31
This file was deleted.

.github/workflows/ci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ jobs:
4848

4949
- name: test
5050
run: make test
51+
env:
52+
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
53+
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
5154

5255
- name: codecov
5356
run: bash <(curl -s https://codecov.io/bash)

.pyup.yml

-1
This file was deleted.

Makefile

+6-5
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ lint:
2424
test:
2525
pytest --cov=tcsocket
2626

27-
.PHONY: testcov
28-
testcov: test
29-
coverage html
27+
.PHONY: build
28+
build:
29+
docker build tcsocket/ -t tcsocket
3030

31-
.PHONY: all
32-
all: testcov lint
31+
.PHONY: prod-push
32+
prod-push:
33+
git push heroku `git rev-parse --abbrev-ref HEAD`:master

activate.dev.sh

-8
This file was deleted.

client.py

+11-40
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python3.6
21
import asyncio
32
import json
43
import os
@@ -109,10 +108,7 @@ async def company_options(*, public_key, **kwargs):
109108
'last_name': 'Howell',
110109
'town': 'Edinburgh',
111110
'country': 'United Kingdom',
112-
'location': {
113-
'latitude': None,
114-
'longitude': None
115-
},
111+
'location': {'latitude': None, 'longitude': None},
116112
'photo': 'http://unsplash.com/photos/vltMzn0jqsA/download',
117113
'extra_attributes': [
118114
{
@@ -121,55 +117,30 @@ async def company_options(*, public_key, **kwargs):
121117
'type': 'text_extended',
122118
'sort_index': 0,
123119
'value': 'The returned group is itself an iterator that shares the underlying iterable with groupby(). '
124-
'Because the source is shared, when the groupby() object is advanced, the previous group is no '
125-
'longer visible. So, if that data is needed later, it should be stored as a list:',
126-
'id': 195
120+
'Because the source is shared, when the groupby() object is advanced, the previous group is no '
121+
'longer visible. So, if that data is needed later, it should be stored as a list:',
122+
'id': 195,
127123
},
128124
{
129125
'machine_name': None,
130126
'name': 'Teaching Experience',
131127
'type': 'text_short',
132128
'sort_index': 0,
133129
'value': 'Harvard',
134-
'id': 196
130+
'id': 196,
135131
},
136132
],
137133
'skills': [
138-
{
139-
'qual_level': 'A Level',
140-
'subject': 'Mathematics',
141-
'qual_level_ranking': 18.0,
142-
'category': 'Maths'
143-
},
144-
{
145-
'qual_level': 'GCSE',
146-
'subject': 'Mathematics',
147-
'qual_level_ranking': 16.0,
148-
'category': 'Maths'
149-
},
150-
{
151-
'qual_level': 'GCSE',
152-
'subject': 'Algebra',
153-
'qual_level_ranking': 16.0,
154-
'category': 'Maths'
155-
},
156-
{
157-
'qual_level': 'KS3',
158-
'subject': 'Language',
159-
'qual_level_ranking': 13.0,
160-
'category': 'English'
161-
},
162-
{
163-
'qual_level': 'Degree',
164-
'subject': 'Mathematics',
165-
'qual_level_ranking': 21.0,
166-
'category': 'Maths'
167-
},
134+
{'qual_level': 'A Level', 'subject': 'Mathematics', 'qual_level_ranking': 18.0, 'category': 'Maths'},
135+
{'qual_level': 'GCSE', 'subject': 'Mathematics', 'qual_level_ranking': 16.0, 'category': 'Maths'},
136+
{'qual_level': 'GCSE', 'subject': 'Algebra', 'qual_level_ranking': 16.0, 'category': 'Maths'},
137+
{'qual_level': 'KS3', 'subject': 'Language', 'qual_level_ranking': 13.0, 'category': 'English'},
138+
{'qual_level': 'Degree', 'subject': 'Mathematics', 'qual_level_ranking': 21.0, 'category': 'Maths'},
168139
],
169140
'labels': [],
170141
'last_updated': '2017-01-08T12:20:46.244Z',
171142
'created': '2015-01-19',
172-
'release_timestamp': '2017-01-08T12:27:07.541165Z'
143+
'release_timestamp': '2017-01-08T12:27:07.541165Z',
173144
}
174145

175146

deploy/compose

-15
This file was deleted.

deploy/create-machine

-22
This file was deleted.

deploy/deploy

-4
This file was deleted.

docker-compose.beta.yml

-17
This file was deleted.

docker-compose.override.yml

-15
This file was deleted.

docker-compose.prod.yml

-17
This file was deleted.

docker-compose.yml

-76
This file was deleted.

heroku.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build:
2+
docker:
3+
web: tcsocket/Dockerfile
4+
worker: tcsocket/Dockerfile

nginx/dev/Dockerfile

-2
This file was deleted.

nginx/dev/nginx.conf

-49
This file was deleted.

nginx/prod/Dockerfile

-5
This file was deleted.

0 commit comments

Comments
 (0)