Skip to content

Commit ef3f2e9

Browse files
committed
Add session, fix local setup step
1 parent 005546c commit ef3f2e9

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ env-update: environment.yml
1212
conda env update -n $(ENV_NAME) -f $<
1313

1414
env-setup:
15-
$(CONDA_ACTIVATE); pip install -e .
15+
$(CONDA_ACTIVATE); pip install -e . --no-deps
1616

1717
pytest:
1818
$(CONDA_ACTIVATE); \

biophi/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.0.1'
1+
__version__ = '1.0.2'

biophi/common/web/views.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from biophi.common.utils.scheduler import use_scheduler, TaskNotFoundError
1313
from biophi.common.utils.stats import get_stats, log_access
1414
from biophi.humanization.web.views import biophi_humanization
15+
from flask_session import Session
1516

1617
app = Flask(__name__)
1718

@@ -34,6 +35,9 @@
3435
MAILCHIMP_NEWSLETTER=os.environ.get('MAILCHIMP_NEWSLETTER'),
3536
))
3637

38+
session = Session()
39+
session.init_app(app)
40+
3741
app.jinja_env.globals.update(aa_name=aa_name)
3842
app.jinja_env.globals.update(seq3=seq3)
3943
app.jinja_env.globals.update(python_set=set)
@@ -48,7 +52,6 @@
4852
app.jinja_env.globals.update(min=min)
4953
app.jinja_env.globals.update(max=max)
5054

51-
5255
app.register_blueprint(biophi_humanization, url_prefix='/humanization')
5356

5457
use_scheduler('celery')

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ dependencies:
2020
- xlsxwriter
2121
- humanize
2222
- fairseq == 0.10.2
23+
- flask_session

0 commit comments

Comments
 (0)