Skip to content

3. Data Import for Testing and Launch

Danny Collier edited this page May 25, 2025 · 2 revisions

Final delivery of the working application will include a scripted import of existing application data and media, and an execution plan for migrating to the new application.

Remote devices must be blind to the transition from the former app to SkillRX. The migration must not require the remote devices to re-sync any content. The keys to this are the topic months and years and the creation dates for uploaded files. Because media file names include topic IDs, those and certain other IDs must also be carried over from the old system.

No mini computers are live in the field at present. If any were to be live before we made the transition to SkillRX, we would need all ID values to remain consistent. The mini computers import ID values for all data.

Model Data

Topic ID values are used in the file naming conventions for stored media files. All existing files have names that include their topic's ID in the current system. Because of this, imported topics must maintain their IDs from the old application. These are the only ID values currently exposed in this way, but for ease of import and consistency, we are also maintaining IDs for some other data types. Details are elsewhere in the requirements.

The application currently has a draft import process and the related data files. Developers who wish to work with realistic data should:

  • Open a Rails console
  • DataImport.destroy_all_data
  • DataImport.import_all

The import will go through each of the csv files stored in import_files and create the relevant records. Note that the files in import_files are partially obfuscated. For instance, the topic names have been randomly generated.

Training Resource Media File Import

Until SkillRX is launched, the Azure file storage is our definitive, steady-state source of training resource media files. The import process will not be altering Azure files at all, but instead will be importing those files into the S3 storage used by SkillRX.

The media import process will:

  • For each record in cmes_files.csv
  • Find the related topic
  • Read the media file from Azure
  • Attach that file to the topic
  • Make whatever alterations are needed to our records to ensure that our Azure sync does not resync these files. For instance, we will likely need to set its created/updated dates to match those in the existing system. The goal here is to make sure that when we begin to sync files, we do not change anything in Azure until a user makes a change via SkillRX after we are fully launched.

This process will not change the files stored in Azure in any way.

Staging Environment Import for User Testing (Target date of July 1, 2025)

To prepare for user testing, we want to make the staging environment and its matching Azure file storage look like a snapshot-in-time view of the production environment. After the import process is complete, users will be able to fully manage any existing content in SkillRX, see the relevant changes in Azure, and use the results of those changes in a downstream Raspberry Pi or Mini computer set up to point at the Azure staging environment.

The process for this will be:

  • Fully deploy and configure a staging environment
  • Point our Azure interface for that environment at the appropriate Azure space
  • Set up that Azure space with the full file structure and contents of the production environment
  • Point a Pi and a Mini at that Azure space and confirm they are syncing
  • Overwrite the csv files in import_files with the unobfuscated files
  • Run our import script to create the data in SkillRX and import the training materials into SkillRX
  • Review data in SkillRX UI
  • Report any data anomalies to stakeholders (some tags could not be processed, for instance)
  • Test by making a topic, tagging it, and adding resources
  • Review the results in Azure
  • Review the results in a downstream Pi and a downstream Mini

Testing

[add key features that should be tested and verified]

Clone this wiki locally