TripalCultivate / TripalCultivate-Phenotypes

Provides generic support for large scale phenotypic data and traits with importers, content pages and visualizations.
GNU General Public License v3.0
1 stars 0 forks source link

G2.10 importer api #34

Closed reynoldtan closed 1 year ago

reynoldtan commented 1 year ago

Issue https://github.com/TripalCultivate/TripalCultivate-Phenotypes/issues/10 - Data Importer + validator API

Motivation

This is the PR sets up base form structure of data importer. It provides

What does this PR do?

Please describe each things this PR does. For example, a PR may 1) solve a specific bug, 2) create an auomated test to ensure it doesn't return.

  1. Create base template of data importer.

Testing

Automated Testing

Please describe each automated test this PR creates and provide a list of the assertions it makes using casual language. Do not just say things like "asserts the array is not empty" but rather say "Ensures that the return value of method X with these parameters is not an empty array".

ClassName->ImporterShareTest: Test importer base form structure

Manual Testing

Describe in detail how someone should manually test this functionality. Make sure to include whether they need to build a docker from scratch, create any records, etc.

  1. Switch to branch Importer-api of trpcultivate_phenotypes
  2. Install and enable the module
  3. Access Tripal page that displays all implementation of Importer plugin in admin/tripal/loaders
  4. Click on Tripal Cultivate: Open Science Phenotypic Data link
  5. Navigate each stage using the Next Page button in each stage in the accordion layout

Advanced Options

To keep form simple and code base light, I will leave the advanced options as is, no theme, no JS behaviour nor any modifications.

Screen Shot 2023-07-19 at 3 02 58 PM

Note to self: Reminder about the field element in the help section to say - Alter the value of schema only when your administrator instructed to do so

reynoldtan commented 1 year ago

Need help window still does not work. Working on it

reynoldtan commented 1 year ago

This PR will require major overhaul and redesign of the interface from multi step form to accordion style ❤️ image

NOT READY FOR REVIEW

reynoldtan commented 1 year ago

Screen Shot 2023-08-03 at 3 42 56 PM

the most recent commit will render this form.

reynoldtan commented 1 year ago

Notes from the discussion:

  1. Only one stage can be expanded.
  2. Expand and collapse behaviour of stages are inconsistent during a page refresh and a new instance of Tripal site.
  3. Implement scheme through the use of visual cues (icons and/or colour) to indicate 1. an ongoing stage 2. completed stage and 3. upcoming stage.
  4. Use the built-in submit button of the importer for the final step - execute job. Further discussion needed as to how to disable this button prior to completion of stage 1-3.

NOTE: Do not forget that validation stage will have a validation summary result window.

reynoldtan commented 1 year ago

image

Revisions include validation result window, stage indicators (colour and icon) and ensures that only one stage can be expanded.

reynoldtan commented 1 year ago

With recent, improvements to Tripal Importer, this PR - Importer API, is ready for review.