Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleClick to expand visualization
Image Modified

Prototype implementation

...

  • Checkout all the branches

    • edx-platform: msingh/oep37/mvp/userenrollments

    • ecommerce: diana/test-data-prototype

    • devstack: msingh/oep37/mvp/interface

  • start a virtual env and run make requirements in devstack repo

  • run make dev.load_data data_spec_top_ path=test_data/data_spec_top.yaml from devstack repo

    • you should now have new data in your database

    • if something went wrong, here are individual commands to run in each of the container’s shells

      • lms shell: python manage.py lms load_dev_data - -data-file-path openedx/core/djangoapps/util/management/commands/test_command.yaml

      • ecommerce shell: python manage.py load_data --data-file-path ecommerce/core/management/commands/test_data.yaml

...

  • Data will be specified in multiple Yaml files

    • A top level yaml file will list other yaml files

    • The order by which the data is built in specific IDA will be specified in the top level yaml file

    • The data contained within the yaml files will be as minimal as possible

    • foreign keys will be linked via some unique identifier for lookup (i.e. course_key, domain, username)

  • For each use of the load_testdev_data management command, there will be a separate yaml file with data specified.

  • The management command will read the specified yaml file and pass on the data specification to the appropriate data generation function.

  • We will be reusing existing factories used for unit tests

    • Benefits of reuse

      • Decrease in code duplication

      • There are ton of factories, so we’d be able to support ton of data creation very quickly

    • Downsides

      • There are ton of factories which were designed for different use cases. Due to the complex nature of some of these factories, it might be hard determine side effects on the database.

...