Skip to content

Commit 942db25

Browse files
authored
Merge pull request #264 from ComputerScienceHouse/3.8-build-node-10
Upgrading to python 3.8, nodejs 10.x and fixing docker build
2 parents d97415d + b25d524 commit 942db25

File tree

14 files changed

+32
-381
lines changed

14 files changed

+32
-381
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Dockerfile
2+
.gitignore

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ __pycache__/
99
# Distribution / packaging
1010
.Python
1111
env/
12+
venv/
1213
build/
1314
develop-eggs/
1415
dist/

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.3.1
1+
10

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,4 @@ min-public-methods = 2
9090
max-public-methods = 20
9191

9292
[EXCEPTIONS]
93-
overgeneral-exceptions = Exception
93+
overgeneral-exceptions = Exception

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: python
22
python:
3-
- "3.6"
3+
- "3.8"
44
services:
55
- "docker"
66

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.6-stretch
1+
FROM python:3.8-buster
22
MAINTAINER Devin Matte <matted@csh.rit.edu>
33

44
RUN mkdir /opt/conditional
@@ -8,15 +8,15 @@ ADD requirements.txt /opt/conditional
88
WORKDIR /opt/conditional
99

1010
RUN apt-get -yq update && \
11-
apt-get -yq install libsasl2-dev libldap2-dev libssl-dev && \
11+
apt-get -yq install libsasl2-dev libldap2-dev libssl-dev gcc g++ make && \
1212
pip install -r requirements.txt && \
1313
apt-get -yq clean all
1414

1515
ADD . /opt/conditional
1616

17-
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - && \
17+
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
1818
apt-get -yq update && \
19-
apt-get -yq install nodejs npm && \
19+
apt-get -yq install nodejs && \
2020
npm install && \
2121
npm run production && \
2222
rm -rf node_modules && \

conditional/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,4 @@ def route_errors(error, user_dict=None):
195195
**data), int(code)
196196

197197

198-
@app.cli.command()
199-
def zoo():
200-
from conditional.models.migrate import free_the_zoo
201-
free_the_zoo(app.config['ZOO_DATABASE_URI'])
202-
203-
204198
logger.info('conditional started')

conditional/blueprints/housing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def display_housing(user_dict=None):
2727
log.info('Display Housing Board')
2828

2929
housing = {}
30-
onfloors = [account for account in ldap_get_onfloor_members()]
30+
onfloors = ldap_get_onfloor_members()
3131
onfloor_freshmen = FreshmanAccount.query.filter(
3232
FreshmanAccount.room_number is not None
3333
)

conditional/blueprints/intro_evals.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ def get_fid_cm_count(member_id):
3737
FreshmanCommitteeAttendance.fid == member_id)
3838
if CommitteeMeeting.query.filter(CommitteeMeeting.id == a.meeting_id).first().approved])
3939

40-
members = [account for account in ldap_get_intro_members()]
40+
members = ldap_get_intro_members()
4141

4242
ie_members = []
4343

4444
# freshmen who don't have accounts
45-
fids = [f for f in FreshmanAccount.query.filter(
45+
fids = list(FreshmanAccount.query.filter(
4646
FreshmanAccount.eval_date > start_of_year(),
47-
FreshmanAccount.eval_date > datetime.now())]
47+
FreshmanAccount.eval_date > datetime.now()))
4848

4949
for fid in fids:
5050
h_meetings = [m.meeting_id for m in
@@ -104,7 +104,7 @@ def get_fid_cm_count(member_id):
104104

105105
if freshman_data is None:
106106
continue
107-
elif freshman_data.freshman_eval_result != "Pending" and internal:
107+
if freshman_data.freshman_eval_result != "Pending" and internal:
108108
continue
109109

110110
h_meetings = [m.meeting_id for m in get_hm(member, only_absent=True)]

conditional/blueprints/spring_evals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def display_spring_evals(internal=False, user_dict=None):
2323
log = logger.new(request=request, auth_dict=user_dict)
2424
log.info('Display Membership Evaluations Listing')
2525

26-
active_members = [account for account in ldap_get_active_members()]
26+
active_members = ldap_get_active_members()
2727

2828
sp_members = []
2929
for account in active_members:

0 commit comments

Comments
 (0)