-
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
G3 226 add publication endpoint #62
Conversation
Test Coverage Report
|
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.
Looks good, just one minor change.
pyproject.toml
Outdated
@@ -1,6 +1,6 @@ | |||
[tool.poetry] | |||
name = "geneweaver-api" | |||
version = "0.4.0" | |||
version = "0.4.1.a01" |
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 will be version 0.5.0a0.
@@ -21,7 +21,7 @@ python = "^3.9" | |||
geneweaver-core = "^0.9.1" | |||
fastapi = {extras = ["all"], version = "^0.99.1"} | |||
uvicorn = {extras = ["standard"], version = "^0.24.0"} | |||
geneweaver-db = "^0.3.0" | |||
geneweaver-db = "^0.3.3" |
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.
👍
# check publication is not already in the DB | ||
pub = db_publication.by_pubmed_id(cursor, pubmed_id) | ||
if pub: | ||
return {"error": True, "message": message.RECORD_EXISTS} |
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.
If the publication exists, you can just return it. That would make the endpoint idempotent, which is desirable.
No description provided.