Admin Guide: Verify A CRC1280 Import


title: Verify a CRC1280 import

Start bash on the web container

  • Start bash on the web container

    docker exec -it rdms_web_1 /bin/bash
    
  • Check that the rake task is listed in the list of rake tasks available

    rake -T
    

    This should list all of the available rake tasks including the rdms:crc_1280_import task

    .....
    rake rdms:crc_1280_import:verify_import[import_id]        # Verify CRC1280 import or verify CRC1280 import of an experiment
    .....
    
  • If you want to run the verification from the rails console (and not run the rake task), start the rails console

    bundle exec rails c
    

Run the verification

The verification can be run for all the experiments in the importer, or for one specific experiment in the importer. It will give the status of the import and generate a CSV report, one for each experiment.

Run the verification for one experiment in the import

Arguments needed

To verify the import for a specific experiment in the importer, we need two parameters

  • import_id - This can be obtained from the url of an import

    For example: for https://rdms.cottagelabs.com/importers/49?locale=en

    import_id=49

  • entry_id - Entry id for the experiment

    The experiments (works) are displayed in Work Entries tab in the import UI

    Each entry has an Entry Id as shown in the image

    entry_id = 20409

Run the verification from the rails console

Verify the import of a specific experiment in the importer

experiment_status, report_path = VerifyCRCDatasetImport.verify_experiment_and_report(49, 20409)

[true, "/shared/downloads/analysis_report_49_20409_12-03_21-23-11.csv"]

experiment_status, report_path = VerifyCRCDatasetImport.verify_experiment_and_report(49, 20410)

[false, "/shared/downloads/analysis_report_49_20410_12-03_21-23-20.csv"]

The method returns the verification status and the path to the full csv report.

Run the verification using the rake task

To run the rake task to verify the experiment in the importer

bundle exec rake rdms:crc_1280_import:verify_experiment[49,20409]

You should see an output, similar to the lines below.

.....
Verifying import 49
Experiment import status : false
Detailed reports is available at: /shared/downloads/analysis_report_49_20409_12-05_15-35-06.csv

The task prints the verification status and the path to the full csv report.

Expected Output

If run from the rails console or invoking the rake task, the verification method should give you the verification status and the path to the verification report.

Run the verification for all experiments in the import

Arguments needed

To verify the import for all the experiments in the importer, we need the parameter

  • import_id - This can be obtained from the url of an import

    For example: for https://rdms.cottagelabs.com/importers/49?locale=en

    import_id=49

Run the verification from the rails console

Verify all experiments in the importer

experiment_status, report_path = VerifyCRCDatasetImport.verify_import(49)

=> [false, ["/shared/downloads/analysis_report_49_20409_12-05_16-19-20.csv", "/shared/downloads/analysis_report_49_20410_12-05_16-19-20.csv"]]

The method returns the verification status and the path to the csv reports (one for each experiment in the importer).

Run the verification using the rake task

To run the rake task to verify all experiments in the import

bundle exec rake rdms:crc_1280_import:verify_import[49]

You should see an output, similar to the lines below

.....
Verifying import 49
import status : false
Detailed reports are available at:
[
  "/shared/downloads/analysis_report_49_20409_12-05_16-16-25.csv",
  "/shared/downloads/analysis_report_49_20410_12-05_16-16-25.csv"
]

The task prints the verification status and the path to the csv reports (one for each experiment in the importer).

Expected Output

If run from the rails console or invoke the rake task, the verification method should give you the verification status and the path to the verification reports (one for each experiment in the import).

Verification report explained

  • The report name has the import id, the entry id and the timestamp of when the report was created
  • Example report
  • The first row of the report has all of the different ids or paths used in the comparison
  • The subsequent rows are file paths, and their outcome