Skip to content

Commit

Permalink
protcur server update to latest flask convesntions
Browse files Browse the repository at this point in the history
analysis add missing attrs on Hybrid
  • Loading branch information
tgbugs committed Aug 27, 2023
1 parent 7ab9bfe commit b62ee1b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions protcur/protcur/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions protcur/protcur/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'<a href={url}>{route}</a> <br>'
return out

Expand Down Expand Up @@ -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


Expand Down

0 comments on commit b62ee1b

Please sign in to comment.