From b62ee1b3ac52a0074d1e61cd6a23e14cbe5a0820 Mon Sep 17 00:00:00 2001 From: Tom Gillespie Date: Sat, 26 Aug 2023 21:55:28 -0700 Subject: [PATCH] protcur server update to latest flask convesntions analysis add missing attrs on Hybrid --- protcur/protcur/analysis.py | 2 ++ protcur/protcur/server.py | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/protcur/protcur/analysis.py b/protcur/protcur/analysis.py index 1a849b3..e442a4b 100755 --- a/protcur/protcur/analysis.py +++ b/protcur/protcur/analysis.py @@ -223,6 +223,8 @@ class Hybrid(HypothesisHelper): _replies = {} _astParentIndex = {} _nonAstParentIndex = {} + _lift_reply_tags = tuple() + _splice_tags = tuple() def __new__(cls, anno, annos): """ namespace with the colon to make it simple to allow diff --git a/protcur/protcur/server.py b/protcur/protcur/server.py index 807aa6e..aa77adf 100755 --- a/protcur/protcur/server.py +++ b/protcur/protcur/server.py @@ -329,7 +329,8 @@ def route_controlled_tags(): def route_curation(): out = '' for route in 'papers', 'annotations', 'tags', 'ast', 'citations': - url = request.base_url + route + log.debug(request.base_url) + url = request.base_url + '/' + route out += f'{route}
' return out @@ -565,13 +566,15 @@ def sparc_tabulations_document(experiment): """ TODO not quite document level, more experiment level """ return 'TODO' - @app.before_first_request def sparc_runonce(): # populate existing iris # FIXME might still cause issue if someone types a new paper # into the url bar before updating the documents page hls = set(get_hypothesis_local(uri) for uri in SparcMI.uris) + with app.app_context(): + sparc_runonce() + return app