-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
story/VOGRE-7 #15
base: develop
Are you sure you want to change the base?
story/VOGRE-7 #15
Conversation
…ngo inlinecss) and added collectstatic
…to fix import for text tor repository
…ory text import for importing and repository text for details
.env_app-example
Outdated
BASE_URL=http://localhost:8000/ | ||
QUADRIGA_ENDPOINT= | ||
QUADRIGA_COLLECTION_ID= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is something that needs to be set for each project. Every project can have a different collection it submits quadruples to.
annotations/middleware.py
Outdated
|
||
# Cache the last check time to reduce query frequency | ||
last_check_time = None | ||
check_interval = timedelta(minutes=5) # Adjust the interval as needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to be configurable through settings
annotations/models.py
Outdated
this field is to prevent duplicate submissions. | ||
""" | ||
STATUS_CHOICES = [ | ||
('not_ready', 'Not Ready'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the first value here should be defined in constants, so the constants can be used elsewhere (see below)
annotations/models.py
Outdated
if self.status != 'submitted': # Avoid overriding submitted status | ||
self.status = 'ready_to_submit' | ||
else: | ||
self.status = 'not_ready' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in line 920 and 922 the constants defined above should be sued
annotations/utils.py
Outdated
}, | ||
"context": { | ||
"creator": user.username, | ||
"creationTime": timezone.now().strftime('%Y-%m-%d'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be the time an appellation was created
annotations/utils.py
Outdated
"context": { | ||
"creator": user.username, | ||
"creationTime": timezone.now().strftime('%Y-%m-%d'), | ||
"creationPlace": "phoenix", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's leave that empty for now
annotations/utils.py
Outdated
"creator": user.username, | ||
"creationTime": timezone.now().strftime('%Y-%m-%d'), | ||
"creationPlace": "phoenix", | ||
"sourceUri": concept.authority if hasattr(concept, 'authority') else "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be the the uri of the text that has been annotated, so for now let's use the the url of the annotated text
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the above comments apply to all contexts
} | ||
} | ||
|
||
def generate_graph_data(relationset, user): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the same function as above?
return Response({'error': 'You are not authorized to submit this RelationSet.'}, | ||
status=status.HTTP_403_FORBIDDEN) | ||
|
||
if relationset.status != 'ready_to_submit': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use constant here
Also, there are conflicts |
…for time interval, added constants for status in RelationSet Model
…instead of a settings default
…ved creation place for now
Guidelines for Pull Requests
If you haven't yet read our code review guidelines, please do so, You can find them here.
Please confirm the following by adding an x for each item (turn
[ ]
into[x]
).Please provide a brief description of your ticket
Get rid of celery and submit quaduples on request
Description
Currently, quadruples are submitted via Celery on a cron job. Celery should be completely removed. Instead a project should have a button that will submit quadrupes to Quadriga. This ticket includes multiple tasks:
Quadruples need to have a flag (if they don’t already) that indicates if they ahve been submitted or not
Quaduples need to be submitted to the new Quadriga 2.0
Only quadruples with complete relationships (in which concepts have been resolved and added to conceptpower) should be submitted.
VOGRE-7
Are there any other pull requests that this one depends on?
Anything else the reviewer needs to know?
... describe here ...