Skip to content
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

Remove Publication Title from description in study_parser.py #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions pyidr/study_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,25 +405,18 @@ def __str__(self):

def generate_description(self, component):
"""Generate the description of the study/experiment/screen"""
publication_title = ""
if component["Study Publication Title"]:
# Only display the first publication
publication_title = (
"Publication Title\n%(Study Publication Title)s" %
component).split('\t')[0] + "\n\n"
if "Type" in component:
key = "%s Description" % component["Type"]
else:
key = "Study Description"
component_title = (
"%s\n%s" % (key, component[key]))
component_title = component[key]
if "Study Version History" in component:
history = ("\n\nVersion History\n%s" %
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are looking into removing publication title from the description, a question is whether this heading should be kept at all for the relevant studies or if the value of this field should be more simply appended with 1-2 newlines

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by "this heading" do you mean "Study Version History"? I'm happy to remove that heading too if it's not needed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I meant Study Version History but deferring to you, @khaledk2 and @francesw on what makes the most sense both in terms of UI and searchability.

component["Study Version History"])
else:
history = ""

return publication_title + component_title + history
return component_title + history

def generate_annotation(self, component):
"""Generate the map annotation of the study/experiment/screen"""
Expand Down