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

ENH: add public and professional summary when f_prum #657

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
27 changes: 19 additions & 8 deletions regolith/helpers/u_finishprumhelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,27 @@ def db_updater(self):
print("Please rerun the helper specifying the complete ID.")
return
found_projectum.update({'status':'finished'})
if rc.pub_sum:
found_projectum['public_summary'] = rc.pub_sum
elif found_projectum.get('public_summary') is not None:

if found_projectum['professional_summary']:
dragonyanglong marked this conversation as resolved.
Show resolved Hide resolved
if rc.pro_sum:
raise RuntimeError(
"ERROR: please input the professional summary either in field --pro_sum or manually type in the yaml file.")
elif rc.pro_sum:
found_projectum['public_summary'] = rc.pro_sum
else:
raise RuntimeError(
"ERROR: please rerun with a professional summary in field --pro_sum and public summary in --pub_sum")
if rc.pro_sum:
found_projectum['professional_summary'] = rc.pro_sum
elif found_projectum['professional_summary'] is not None:
"ERROR: please input the professional summary either in field --pro_sum or manually type in the yaml file.")

if found_projectum['public_summary']:
if rc.pub_sum:
raise RuntimeError(
"ERROR: please input the public summary either in field --pub_sum or manually type in the yaml file.")
elif rc.pub_sum:
found_projectum['public_summary'] = rc.pub_sum
else:
raise RuntimeError(
"ERROR: please rerun with a professional summary in field --pro_sum and public summary in --pub_sum")
"ERROR: please input the public summary either in field --pub_sum or manually type in the yaml file.")

if rc.end_date:
found_projectum.update({'end_date': date_parser.parse(rc.end_date).date()})
else:
Expand Down