Skip to content

Commit 13993db

Browse files
committed
Updated deps to latest, updated python to 3.13
1 parent 37ba7b6 commit 13993db

5 files changed

Lines changed: 73 additions & 68 deletions

File tree

Containerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM docker.io/python:3.9-bookworm
1+
FROM docker.io/python:3.13-bookworm
22

33
WORKDIR /src/
44
COPY ./ .
55
RUN pip install -r requirements.txt
66
RUN git config --system --add safe.directory /src
77

8-
ENTRYPOINT [ "gunicorn", "selections:app", "--bind=0.0.0.0:8080"]
8+
ENTRYPOINT [ "gunicorn", "selections:app", "--bind=0.0.0.0:8080"]

requirements.txt

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
1-
alabaster==0.7.12
2-
alembic==0.9.9
3-
astroid==2.4.1
4-
Beaker==1.11.0
5-
blinker==1.4
6-
certifi==2020.4.5.1
7-
cffi==1.14.0
8-
chardet==3.0.4
9-
click==7.1.2
10-
cryptography==3.3.2
11-
dnspython==1.16.0
12-
Flask==1.1.2
13-
Flask-Migrate==2.1.1
14-
Flask-pyoidc==1.2.0
15-
Flask-SQLAlchemy==2.3.2
16-
future==0.18.2
17-
gunicorn==19.7.1
18-
idna==2.9
19-
isort==4.3.21
20-
itsdangerous==1.1.0
21-
Jinja2==2.11.3
22-
lazy-object-proxy==1.4.3
23-
lxml==4.6.3
24-
Mako==1.1.2
25-
MarkupSafe==1.1.1
26-
mccabe==0.6.1
27-
oic==0.11.0.1
28-
Pillow==8.1.1
29-
pyasn1==0.4.8
30-
pyasn1-modules==0.2.8
31-
pycparser==2.20
32-
pycryptodomex==3.9.7
1+
alabaster==1.0.0
2+
alembic==1.16.5
3+
astroid==3.3.11
4+
Beaker==1.13.0
5+
blinker==1.9.0
6+
certifi==2025.8.3
7+
cffi==2.0.0
8+
chardet==5.2.0
9+
click==8.2.1
10+
cryptography==45.0.7
11+
dnspython==2.8.0
12+
Flask==3.1.2
13+
Flask-Migrate==4.1.0
14+
Flask-pyoidc==3.14.3
15+
Flask-SQLAlchemy==3.1.1
16+
future==1.0.0
17+
gunicorn==23.0.0
18+
idna==3.10
19+
isort==6.0.1
20+
itsdangerous==2.2.0
21+
Jinja2==3.1.6
22+
lazy-object-proxy==1.12.0
23+
lxml==6.0.1
24+
Mako==1.3.10
25+
MarkupSafe==3.0.2
26+
mccabe==0.7.0
27+
oic==1.6.1
28+
Pillow==11.3.0
29+
pyasn1==0.6.1
30+
pyasn1-modules==0.4.2
31+
pycparser==2.23
32+
pycryptodomex==3.23.0
3333
pyjwkest==1.4.2
34-
pylint==2.5.2
35-
pylint-quotes==0.2.1
36-
PyMySQL==0.8.0
37-
pyOpenSSL==19.1.0
38-
python-dateutil==2.8.1
39-
python-docx==0.8.6
34+
pylint==3.3.8
35+
pylint-quotes==0.2.3
36+
PyMySQL==1.1.2
37+
pyOpenSSL==25.2.0
38+
python-dateutil==2.9.0.post0
39+
python-docx==1.2.0
4040
python-editor==1.0.4
41-
python-resize-image==1.1.11
42-
requests==2.23.0
43-
sentry-sdk==0.14.3
44-
six==1.14.0
45-
SQLAlchemy==1.3.17
46-
toml==0.10.1
47-
urllib3==1.25.9
48-
Werkzeug==1.0.1
49-
wrapt==1.12.1
50-
boto3==1.35.49
41+
python-resize-image==1.1.20
42+
requests==2.32.5
43+
sentry-sdk==2.38.0
44+
six==1.17.0
45+
SQLAlchemy==2.0.43
46+
toml==0.10.2
47+
urllib3==2.5.0
48+
Werkzeug==3.1.3
49+
wrapt==1.17.3
50+
boto3==1.40.32

selections/__init__.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from flask import Flask
66
from flask_migrate import Migrate
77
from flask_pyoidc.flask_pyoidc import OIDCAuthentication
8+
from flask_pyoidc.provider_configuration import ProviderConfiguration, ClientMetadata
89
from flask_sqlalchemy import SQLAlchemy
910
import sentry_sdk
1011
from sentry_sdk.integrations.flask import FlaskIntegration
@@ -20,8 +21,12 @@
2021
else:
2122
app.config.from_pyfile(os.path.join(os.getcwd(), 'config.env.py'))
2223

23-
auth = OIDCAuthentication(app, issuer=app.config['OIDC_ISSUER'],
24-
client_registration_info=app.config['OIDC_CLIENT_CONFIG'])
24+
#auth = OIDCAuthentication(app, issuer=app.config['OIDC_ISSUER'],
25+
# client_registration_info=app.config['OIDC_CLIENT_CONFIG'])
26+
27+
client_metadata = ClientMetadata(app.config["OIDC_CLIENT_CONFIG"])
28+
provider_config = ProviderConfiguration(issuer=app.config["OIDC_ISSUER"], client_registration_info=client_metadata)
29+
auth = OIDCAuthentication({'default': provider_config}, app)
2530

2631
# Sentry
2732
sentry_sdk.init(
@@ -55,7 +60,7 @@
5560

5661

5762
@app.route('/')
58-
@auth.oidc_auth
63+
@auth.oidc_auth("default")
5964
@before_request
6065
def main(info=None):
6166
is_evals = '/eboard-evaluations' in info['group_list']

selections/blueprints/application.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
@app.route('/application/<app_id>')
12-
@auth.oidc_auth
12+
@auth.oidc_auth("default")
1313
@before_request
1414
def get_application(app_id, info=None):
1515
applicant_info = Applicant.query.filter_by(id=app_id).first()
@@ -33,7 +33,7 @@ def get_application(app_id, info=None):
3333
fields=fields)
3434

3535
@app.route('/application/content/<app_id>')
36-
@auth.oidc_auth
36+
@auth.oidc_auth("default")
3737
def get_application_pdf(app_id):
3838
applicant_info = Applicant.query.filter_by(id=app_id).first()
3939
resp = s3.get_object(Bucket=app.config['S3_BUCKET_NAME'], Key='/'+applicant_info.rit_id+'.pdf')
@@ -42,7 +42,7 @@ def get_application_pdf(app_id):
4242

4343

4444
@app.route('/application', methods=['POST'])
45-
@auth.oidc_auth
45+
@auth.oidc_auth("default")
4646
def create_application():
4747
applicant_rit_id = request.form.get('rit_id')
4848
applicant = Applicant(
@@ -60,7 +60,7 @@ def create_application():
6060

6161

6262
@app.route('/application/import', methods=['POST'])
63-
@auth.oidc_auth
63+
@auth.oidc_auth("default")
6464
#@before_request
6565
def import_application():
6666
word_file = request.files['file']
@@ -115,7 +115,7 @@ def import_application():
115115

116116

117117
@app.route('/application/delete/<app_id>', methods=['GET'])
118-
@auth.oidc_auth
118+
@auth.oidc_auth("default")
119119
@before_request
120120
def delete_application(app_id, info=None):
121121
is_evals = '/eboard-evaluations' in info['group_list']
@@ -136,7 +136,7 @@ def delete_application(app_id, info=None):
136136

137137

138138
@app.route('/application/create')
139-
@auth.oidc_auth
139+
@auth.oidc_auth("default")
140140
@before_request
141141
def get_application_creation(info=None):
142142
is_evals = '/eboard-evaluations' in info['group_list']
@@ -149,7 +149,7 @@ def get_application_creation(info=None):
149149

150150

151151
@app.route('/application/<app_id>', methods=['POST'])
152-
@auth.oidc_auth
152+
@auth.oidc_auth("default")
153153
@before_request
154154
def submit_application(app_id, info=None):
155155
member = Members.query.filter_by(username=info['uid']).first()
@@ -193,12 +193,12 @@ def submit_application(app_id, info=None):
193193

194194

195195
@app.route('/application/review/<app_id>', methods=['GET'])
196-
@auth.oidc_auth
196+
@auth.oidc_auth("default")
197197
@before_request
198198
def review_application(app_id, info=None):
199199
applicant_info = Applicant.query.filter_by(id=app_id).first()
200200
evaluated = bool(Submission.query.filter_by(application=app_id, medium='Phone').all())
201-
scores = Submission.query.filter_by(application=app_id).all()
201+
scores = Submission.query.filter_by(application=app_id).all()
202202
return render_template(
203203
'review_app.html',
204204
info=info,
@@ -209,7 +209,7 @@ def review_application(app_id, info=None):
209209

210210

211211
@app.route('/application/phone/<app_id>', methods=['GET'])
212-
@auth.oidc_auth
212+
@auth.oidc_auth("default")
213213
@before_request
214214
def get_phone_application(app_id, info=None):
215215
applicant_info = Applicant.query.filter_by(id=app_id).first()
@@ -232,7 +232,7 @@ def get_phone_application(app_id, info=None):
232232

233233

234234
@app.route('/application/phone/<app_id>', methods=['POST'])
235-
@auth.oidc_auth
235+
@auth.oidc_auth("default")
236236
@before_request
237237
def promote_application(app_id, info=None):
238238
score = request.form.get('score')

selections/blueprints/teams.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
@app.route('/teams')
9-
@auth.oidc_auth
9+
@auth.oidc_auth("default")
1010
@before_request
1111
def get_teams(info=None):
1212
is_evals = '/eboard-evaluations' in info['group_list']
@@ -34,7 +34,7 @@ def get_teams(info=None):
3434

3535

3636
@app.route('/teams', methods=['POST'])
37-
@auth.oidc_auth
37+
@auth.oidc_auth("default")
3838
@before_request
3939
def create_team(info=None):
4040
is_evals = '/eboard-evaluations' in info['group_list']
@@ -69,7 +69,7 @@ def create_team(info=None):
6969

7070

7171
@app.route('/teams/<team_id>', methods=['POST'])
72-
@auth.oidc_auth
72+
@auth.oidc_auth("default")
7373
@before_request
7474
def add_to_team(team_id, info=None):
7575
is_evals = '/eboard-evaluations' in info['group_list']
@@ -102,7 +102,7 @@ def add_to_team(team_id, info=None):
102102

103103

104104
@app.route('/teams/remove/<username>', methods=['GET'])
105-
@auth.oidc_auth
105+
@auth.oidc_auth("default")
106106
@before_request
107107
def remove_from_team(username, info=None):
108108
is_evals = '/eboard-evaluations' in info['group_list']

0 commit comments

Comments
 (0)