regolith.helpers package

Submodules

regolith.helpers.attestationshelper module

class regolith.helpers.attestationshelper.AttestationsHelper(rc)[source]

Bases: DbHelperBase

Helper for attestations

btype = 'attestation'
construct_global_ctx()[source]

Constructs the global context

db_updater()[source]
needed_colls = ['people', 'grants', 'proposals', 'expenses']
regolith.helpers.attestationshelper.daterange(date1, date2)[source]
regolith.helpers.attestationshelper.subparser(subpi)[source]

regolith.helpers.a_expensehelper module

Helper to add expenses.

class regolith.helpers.a_expensehelper.ExpenseAdderHelper(rc)[source]

Bases: DbHelperBase

btype = 'a_expense'
construct_global_ctx()[source]

Constructs the global context

db_updater()[source]
needed_colls = ['expenses', 'people', 'groups']
regolith.helpers.a_expensehelper.expense_constructor(key, begin_date, end_date, rc)[source]

constructs a document with default fields for an expense

Parameters:
  • key str – The key for (‘_id’) for this entry in the expenses collection

  • begin_date datetime.date – The date of the start of the travel/expense

  • end_date datetime.date – The date of the end of the travel/expense

  • rc runcontrol object

    The runcontrol object. Should contain:

    required: rc.business (bool) True if a business expense, false if a travel one. rc.grants (list) The list of grants that will be charged rc.purpose (str) The purpose of the trip/expense rc.payee (str) id of the payee rc.where (str) where submitted/reimbursed (e.g., which institution/person

    it was submitted to or which bank account it was reimbursed to

    required if rc.business: rc.amount (float) The amount of the expense if it is a business expense optional: rc.notes (list of strings) notes to add if there are any rc.status (str) the status of the expense (defaults to unsubmitted)

Return type:

The constructed expense document

regolith.helpers.a_expensehelper.subparser(subpi)[source]

regolith.helpers.a_grppub_readlisthelper module

Builder for Current and Pending Reports.

class regolith.helpers.a_grppub_readlisthelper.GrpPubReadListAdderHelper(rc)[source]

Bases: DbHelperBase

Build a helper

btype = 'a_grppub_readlist'
build_reading_list_from_citation_tag(tag, update_date)[source]
construct_global_ctx()[source]

Constructs the global context

db_updater()[source]
needed_colls = ['citations', 'reading_lists']
regolith.helpers.a_grppub_readlisthelper.subparser(subpi)[source]

regolith.helpers.a_manurevhelper module

Builder for manuscript reviews.

class regolith.helpers.a_manurevhelper.ManuRevAdderHelper(rc)[source]

Bases: DbHelperBase

btype = 'a_manurev'
construct_global_ctx()[source]

Constructs the global context

db_updater()[source]
needed_colls = ['refereeReports']
regolith.helpers.a_manurevhelper.subparser(subpi)[source]

regolith.helpers.a_presentationhelper module

Helper for adding a presentation to the presentation collection.

class regolith.helpers.a_presentationhelper.PresentationAdderHelper(rc)[source]

Bases: DbHelperBase

Helper for adding presentations”

btype = 'a_presentation'
construct_global_ctx()[source]

Constructs the global context

db_updater()[source]
needed_colls = ['presentations', 'groups', 'people', 'expenses']
regolith.helpers.a_presentationhelper.subparser(subpi)[source]

regolith.helpers.a_projectumhelper module

Helper for adding a projectum to the projecta collection.

Projecta are small bite-sized project quanta that typically will result in one manuscript.

class regolith.helpers.a_projectumhelper.ProjectumAdderHelper(rc)[source]

Bases: DbHelperBase

Helper for adding a projectum to the projecta collection.

Projecta are small bite-sized project quanta that typically will result in one manuscript.

btype = 'a_projectum'
construct_global_ctx()[source]

Constructs the global context

db_updater()[source]
insert_checklists(pdoc, now)[source]

Create manuscript checklist, one item as one milestone.

needed_colls = ['projecta', 'groups', 'people']
regolith.helpers.a_projectumhelper.subparser(subpi)[source]

regolith.helpers.a_proposalhelper module

Helper for adding a proposal to the proposals.yml collection.

class regolith.helpers.a_proposalhelper.ProposalAdderHelper(rc)[source]

Bases: DbHelperBase

Helper for adding a proposal to the proposals collection.

A proposal is a dictionary object describing a research or

project proposal submitted by the group.

btype = 'a_proposal'
construct_global_ctx()[source]

Constructs the global context

db_updater()[source]
needed_colls = ['proposals', 'people', 'groups']
regolith.helpers.a_proposalhelper.subparser(subpi)[source]

regolith.helpers.a_proprevhelper module

Builder for Current and Pending Reports.

class regolith.helpers.a_proprevhelper.PropRevAdderHelper(rc)[source]

Bases: DbHelperBase

Build a helper

btype = 'a_proprev'
construct_global_ctx()[source]

Constructs the global context

db_updater()[source]
needed_colls = ['proposalReviews']
regolith.helpers.a_proprevhelper.subparser(subpi)[source]

regolith.helpers.a_todohelper module

Helper for adding a to_do task to todos.yml

class regolith.helpers.a_todohelper.TodoAdderHelper(rc)[source]

Bases: DbHelperBase

Helper for adding a todo task to todos.yml

btype = 'a_todo'
construct_global_ctx()[source]

Constructs the global context

db_updater()[source]
needed_colls = ['todos', 'projecta']
regolith.helpers.a_todohelper.subparser(subpi)[source]

regolith.helpers.basehelper module

Builder Base Classes

class regolith.helpers.basehelper.DbHelperBase(rc)[source]

Bases: HelperBase

Base class for builders that update databases

class regolith.helpers.basehelper.HelperBase(rc)[source]

Bases: object

Base class for helpers

construct_global_ctx()[source]

Constructs the global context

hlp()[source]

run the helper, note this runs any of the commands listed in self.cmds

render(tname, fname, **kwargs)[source]

Render the template into a file using the kwargs and global context

Parameters:
  • tname (str) – Template name

  • fname (str) – Resulting file name

  • kwargs (dict) – Additional kwargs to the renderer

class regolith.helpers.basehelper.LatexHelperBase(rc)[source]

Bases: HelperBase

Base class for Latex builders

clean()[source]

Remove files created by latex

construct_global_ctx()[source]

Constructs the global context

pdf(base)[source]

Compiles latex files to PDF

run(cmd)[source]

Run command in build dir

class regolith.helpers.basehelper.SoutHelperBase(rc)[source]

Bases: HelperBase

Base class for builders that just print to sout

regolith.helpers.f_todohelper module

Helper for marking a task as finished in todos collection.

class regolith.helpers.f_todohelper.TodoFinisherHelper(rc)[source]

Bases: DbHelperBase

Helper for marking a task as finished in todos collection.

btype = 'f_todo'
construct_global_ctx()[source]

Constructs the global context

db_updater()[source]
needed_colls = ['todos']
regolith.helpers.f_todohelper.subparser(subpi)[source]

regolith.helpers.hellohelper module

Builder for Current and Pending Reports.

class regolith.helpers.hellohelper.HelloHelper(rc)[source]

Bases: SoutHelperBase

Build a helper

btype = 'hello'
construct_global_ctx()[source]

Constructs the global context

latex()[source]

Render latex template

needed_colls = ['test']
sout()[source]
regolith.helpers.hellohelper.subparser(subpi)[source]

regolith.helpers.l_abstracthelper module

class regolith.helpers.l_abstracthelper.AbstractListerHelper(rc)[source]

Bases: SoutHelperBase

Helper for finding and listing abstracts from the presentations.yml file

btype = 'l_abstract'
construct_global_ctx()[source]

Constructs the global context

needed_colls = ['presentations', 'people', 'contacts', 'institutions']
sout()[source]
regolith.helpers.l_abstracthelper.subparser(subpi)[source]

regolith.helpers.l_contactshelper module

Helper for finding and listing contacts from the contacts.yml database. Prints name, institution, and email (if applicable) of the contact.

class regolith.helpers.l_contactshelper.ContactsListerHelper(rc)[source]

Bases: SoutHelperBase

Helper for finding and listing contacts from the contacts.yml file

btype = 'l_contacts'
construct_global_ctx()[source]

Constructs the global context

needed_colls = ['contacts', 'institutions']
sout()[source]
regolith.helpers.l_contactshelper.subparser(subpi)[source]

regolith.helpers.l_currentappointmentshelper module

class regolith.helpers.l_currentappointmentshelper.CurrentAppointmentsListerHelper(rc)[source]

Bases: SoutHelperBase

Helper for managing appointments on grants and studying the burn of grants over time.

btype = 'currentappointments'
construct_global_ctx()[source]

Constructs the global context

needed_colls = ['people', 'grants', 'proposals']
sout()[source]
regolith.helpers.l_currentappointmentshelper.subparser(subpi)[source]

regolith.helpers.l_generalhelper module

Helper for listing filtered data from collections in the database.

class regolith.helpers.l_generalhelper.GeneralListerHelper(rc)[source]

Bases: SoutHelperBase

Helper for listing filtered data from collections in the database.

btype = 'lister'
construct_global_ctx()[source]

Constructs the global context

sout()[source]
regolith.helpers.l_generalhelper.subparser(subpi)[source]

regolith.helpers.l_grantshelper module

Helper for listing upcoming (and past) grants.

class regolith.helpers.l_grantshelper.GrantsListerHelper(rc)[source]

Bases: SoutHelperBase

Helper for listing upcoming (and past) grants.

btype = 'l_grants'
construct_global_ctx()[source]

Constructs the global context

needed_colls = ['grants', 'proposals']
sout()[source]
regolith.helpers.l_grantshelper.subparser(subpi)[source]

regolith.helpers.l_membershelper module

Helper for listing group members.

class regolith.helpers.l_membershelper.MembersListerHelper(rc)[source]

Bases: SoutHelperBase

Helper for listing group members.

btype = 'l_members'
construct_global_ctx()[source]

Constructs the global context

needed_colls = ['people', 'institutions', 'groups']
sout()[source]
regolith.helpers.l_membershelper.subparser(subpi)[source]

regolith.helpers.l_milestoneshelper module

Helper for listing upcoming (and past) projectum milestones.

Projecta are small bite-sized project quanta that typically will result in one manuscript.

class regolith.helpers.l_milestoneshelper.MilestonesListerHelper(rc)[source]

Bases: SoutHelperBase

Helper for listing upcoming (and past) projectum milestones.

Projecta are small bite-sized project quanta that typically will result in one manuscript.

btype = 'l_milestones'
construct_global_ctx()[source]

Constructs the global context

needed_colls = ['projecta']
sout()[source]
regolith.helpers.l_milestoneshelper.subparser(subpi)[source]

regolith.helpers.l_progressreporthelper module

Helper for listing a summary of finished prums and progress on open prums.

Projecta are small bite-sized project quanta that typically will result in one manuscript.

class regolith.helpers.l_progressreporthelper.ProgressReportHelper(rc)[source]

Bases: SoutHelperBase

Helper for listing upcoming (and past) projectum milestones.

Projecta are small bite-sized project quanta that typically will result in one manuscript.

btype = 'l_progress'
construct_global_ctx()[source]

Constructs the global context

needed_colls = ['projecta']
print_projectum(selected_projecta)[source]
sout()[source]
regolith.helpers.l_progressreporthelper.subparser(subpi)[source]

regolith.helpers.l_projectahelper module

Helper for listing upcoming (and past) projectum milestones.

Projecta are small bite-sized project quanta that typically will result in one manuscript.

class regolith.helpers.l_projectahelper.ProjectaListerHelper(rc)[source]

Bases: SoutHelperBase

Helper for listing upcoming (and past) projectum milestones.

Projecta are small bite-sized project quanta that typically will result in one manuscript.

btype = 'l_projecta'
construct_global_ctx()[source]

Constructs the global context

needed_colls = ['projecta', 'people']
sout()[source]
regolith.helpers.l_projectahelper.subparser(subpi)[source]

regolith.helpers.l_todohelper module

Helper for listing the to-do tasks.

Tasks are gathered from people.yml, milestones, and group meeting actions.

class regolith.helpers.l_todohelper.TodoListerHelper(rc)[source]

Bases: SoutHelperBase

Helper for listing the to-do tasks.

Tasks are gathered from people.yml, milestones, and group meeting actions.

btype = 'l_todo'
construct_global_ctx()[source]

Constructs the global context

needed_colls = ['todos', 'refereeReports', 'proposalReviews']
sout()[source]
regolith.helpers.l_todohelper.subparser(subpi)[source]

regolith.helpers.makeappointmentshelper module

Helper for managing appointments.

  • Returns members with gap in appointments

  • Returns members supported on an outdated grant

  • Returns members supported on a depleted grant

  • Suggests appointments to make for these members

  • Suggests new appointments

class regolith.helpers.makeappointmentshelper.MakeAppointmentsHelper(rc)[source]

Bases: SoutHelperBase

Helper for managing appointments on grants and studying the burn of grants over time.

btype = 'makeappointments'
construct_global_ctx()[source]

Constructs the global context

needed_colls = ['people', 'grants', 'proposals']
sout()[source]
regolith.helpers.makeappointmentshelper.plotter(datearray, student=None, pd=None, ss=None, title=None)[source]
regolith.helpers.makeappointmentshelper.subparser(subpi)[source]

regolith.helpers.reimbstatushelper module

class regolith.helpers.reimbstatushelper.ReimbstatusHelper(rc)[source]

Bases: SoutHelperBase

Helper for reimbstatus

btype = 'reimbstatus'
construct_global_ctx()[source]

Constructs the global context

needed_colls = ['expenses']
sout()[source]
regolith.helpers.reimbstatushelper.subparser(subpi)[source]

regolith.helpers.u_contacthelper module

Helper for adding a new person to the contacts collection.

class regolith.helpers.u_contacthelper.ContactUpdaterHelper(rc)[source]

Bases: DbHelperBase

Helper for adding a new person to the contacts collection.

btype = 'u_contact'
construct_global_ctx()[source]

Constructs the global context

db_updater()[source]
needed_colls = ['contacts']
regolith.helpers.u_contacthelper.subparser(subpi)[source]

regolith.helpers.u_finishprumhelper module

Helper for finishing prum in the projecta collection

class regolith.helpers.u_finishprumhelper.FinishprumUpdaterHelper(rc)[source]

Bases: DbHelperBase

Helper for finishing prum in the projecta collection

btype = 'f_prum'
construct_global_ctx()[source]

Constructs the global context

db_updater()[source]
needed_colls = ['projecta']
regolith.helpers.u_finishprumhelper.subparser(subpi)[source]

regolith.helpers.u_institutionshelper module

Helper for updating/adding to the projecta collection.

class regolith.helpers.u_institutionshelper.InstitutionsUpdaterHelper(rc)[source]

Bases: DbHelperBase

Helper for updating/adding to the projecta collection.

btype = 'u_institution'
construct_global_ctx()[source]

Constructs the global context

db_updater()[source]
needed_colls = ['institutions']
regolith.helpers.u_institutionshelper.subparser(subpi)[source]

regolith.helpers.u_logurlhelper module

Helper for updating a projectum’s log_url Log_urls are the google doc links to a projectum’s Projectum Agenda Log

class regolith.helpers.u_logurlhelper.LogUrlUpdaterHelper(rc)[source]

Bases: DbHelperBase

Update a projectum’s Log_url, will add a new Log_URL if one doesn’t yet exist

btype = 'u_logurl'
construct_global_ctx()[source]

Constructs the global context

db_updater()[source]
needed_colls = ['projecta']
regolith.helpers.u_logurlhelper.subparser(subpi)[source]

regolith.helpers.u_milestonehelper module

Helper for updating milestones to the projecta collection. It can update the status, type, and due date of a projectum. It can add a new milestone to the projecta collection.

class regolith.helpers.u_milestonehelper.MilestoneUpdaterHelper(rc)[source]

Bases: DbHelperBase

Helper for updating milestones to the projecta collection.

btype = 'u_milestone'
construct_global_ctx()[source]

Constructs the global context

db_updater()[source]
needed_colls = ['projecta']
regolith.helpers.u_milestonehelper.subparser(subpi)[source]

regolith.helpers.u_todohelper module

Helper for updating a task in todos of todos collection.

class regolith.helpers.u_todohelper.TodoUpdaterHelper(rc)[source]

Bases: DbHelperBase

Helper for updating a task in todos of todos collection.

btype = 'u_todo'
construct_global_ctx()[source]

Constructs the global context

db_updater()[source]
needed_colls = ['todos']
regolith.helpers.u_todohelper.subparser(subpi)[source]

regolith.helpers.v_meetingshelper module

Validator for meetings

class regolith.helpers.v_meetingshelper.MeetingsValidatorHelper(rc)[source]

Bases: SoutHelperBase

Helper for validating the entries of the meetings.yml file

btype = 'v_meetings'
construct_global_ctx()[source]

Constructs the global context

needed_colls = ['meetings', 'institutions']
sout()[source]
regolith.helpers.v_meetingshelper.subparser(subpi)[source]