docs: def job_from_file(job_ini, job_id, username, **kw):
      """
      Create a full job profile from a job config file.
  
      :param job_ini:
          Path to a job.ini file
      :param job_id:
          ID of the created job
      :param username:
          The user who will own this job profile and all results
      :param kw:
           Extra parameters including `calculation_mode` and `exposure_file`
      :returns:
          an oqparam instance
      """
      hc_id = kw.get('hazard_calculation_id')
      try:
          oq = readinput.get_oqparam(job_ini, hc_id=hc_id)
      except Exception:
          logs.dbcmd('finish', job_id, 'failed')
          raise
      if 'calculation_mode' in kw:
          oq.calculation_mode = kw.pop('calculation_mode')
      if 'description' in kw:
          oq.description = kw.pop('description')
      if 'exposure_file' in kw:  # hack used in commands.engine
          fnames = kw.pop('exposure_file').split()
          if fnames:
              oq.inputs['exposure'] = fnames
          elif 'exposure' in oq.inputs:
              del oq.inputs['exposure']
      logs.dbcmd('update_job', job_id,
                 dict(calculation_mode=oq.calculation_mode,
                      description=oq.description,
                      user_name=username,
                      hazard_calculation_id=hc_id))
      return oq