biosimulators_utils.simulator_registry package — BioSimulators utils 0.1.154 documentation

# biosimulators_utils.simulator_registry package

## Submodules

## biosimulators_utils.simulator_registry.data_model module

Data model for submitting simulators to the BioSimulators registry

Author

  Jonathan Karr <karr@mssm.edu>

Date

  2020-12-06

Copyright

  2020, Center for Reproducible Biomedical Modeling

License

  MIT

class biosimulators_utils.simulator_registry.data_model.IssueLabel(value)

  Bases: `str`, `enum.Enum`

  An enumeration.

  action_error = 'Action error'
  approved = 'Approved'
  invalid = 'Invalid'
  validated = 'Validated'

class biosimulators_utils.simulator_registry.data_model.SimulatorSubmission(id=None, version=None, specifications_url=None, specifications_patch=None, validate_image=False, commit_simulator=False, validated=False, approved=False, committed=False)

  Bases: `object`

  Submission of a simulator to the BioSimulators registry

  id

    id of simulator (e.g., tellurium or vcell)

    Type

      `str`

  version

    version of simulator (e.g., 2.1.6)

    Type

      `str`

  specifications_url

    URL for the specifications of the version of the simulator (e.g., https://raw.githubusercontent.com/biosimulators/Biosimulators_tellurium/2.1.6/biosimulators.json)

    Type

      `str`

  specifications_patch

    superseding specifications to those at `specifications_url`

    Type

      `dict`

  validate_image

    if `True`, validate Docker image

    Type

      `bool`

  commit_simulator

    if `True`, commit simulator to database

    Type

      `bool`

  is_equal(other)

    Determine if two submissions are equal

    Parameters

      other (`SimulatorSubmission`) – another submission

    Returns

      `True`, if two submissions are equal

    Return type

      `bool`

  to_tuple()

    Tuple representation of a person

    Returns

      tuple representation of a person

    Return type

      `tuple` of `str`

## biosimulators_utils.simulator_registry.process_submission module

Methods for processing submissions to the BioSimulators registry

Author

  Jonathan Karr <karr@mssm.edu>

Date

  2020-12-06

Copyright

  2020, Center for Reproducible Biomedical Modeling

License

  MIT

biosimulators_utils.simulator_registry.process_submission.get_simulator_submission_from_gh_issue_body(body)

  Get a simulator submission from the YAML-structured data in an issue

  Parameters

    body (`str`) – body of a GitHub issue for the submission of a simulator

  Returns

    simulator submission

  Return type

    `SimulatorSubmission`

## biosimulators_utils.simulator_registry.query module

Methods for querying the BioSimulators registry

Author

  Jonathan Karr <karr@mssm.edu>

Date

  2020-12-06

Copyright

  2020, Center for Reproducible Biomedical Modeling

License

  MIT

biosimulators_utils.simulator_registry.query.get_simulator_version_specs(id)

  Get the specifications of the versions of a simulator in the BioSimulators registry

  Parameters

    id (`str`) – simulator id

  Returns

    specifications of the registered versions of the simulator

  Return type

    `list` of `dict`

## biosimulators_utils.simulator_registry.submit module

Methods for submitting simulators to the BioSimulators registry

Author

  Jonathan Karr <karr@mssm.edu>

Date

  2020-12-06

Copyright

  2020, Center for Reproducible Biomedical Modeling

License

  MIT

biosimulators_utils.simulator_registry.submit.build_gh_issue_body(submission)

  Build the body of a GitHub issue for the submission of a simulator

  Parameters

    submission (`SimulatorSubmission`) – simulator

  Returns

    body for a GitHub issue for the submission of a simulator

  Return type

    `str`

biosimulators_utils.simulator_registry.submit.submit_simulator_to_biosimulators_registry(simulator, gh_username, gh_access_token)

  Submit a version of a simulation tool for review for inclusion in the BioSimulators registry. This will create a GitHub issue which the BioSimulators Team will use to review your submission.

  This method requires a GitHub access and personal access token. This access token must have the public_repo scope. Instructions for creating an access token are available in the GitHub documentation <https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token>_.

  Parameters

    - simulator (`SimulatorSubmission`) – simulator

    - gh_username (`str`) – GitHub username (e.g., jonrkarr)

    - gh_access_token (`str`) – GitHub personal access token.

  Raises

    requests.exceptions.HTTPError – if the simulator is not successfully submitted for review