Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Index UI #4185

Draft
wants to merge 14 commits into
base: 2.x
Choose a base branch
from
Draft

WIP: Index UI #4185

wants to merge 14 commits into from

Conversation

kaise-lafrai
Copy link
Contributor

@kaise-lafrai kaise-lafrai commented May 9, 2024

fixes [org/repo/issue#]

  • Test coverage exists
  • Documentation exists

QA Steps

Test Data File:
test_data.csv

PART 1

  • Navigate to form /node/add/data?schema=data-dictionary
  • Enter a Title: Data Dictionary and Index
  • Select 'Add Field'
  • Enter the following Name: termination_date
  • Enter the following Title: Termination Date
  • Select 'date' for the Data Type
  • Select 'other' Format
  • Enter the following for Other Format: %m/%d/%Y
  • Enter the following description: Termination Date
  • Select Add
  • Select Add field
  • Enter the following Name: fda_approval_date
  • Enter the following Title: FDA Approval Date
  • Select 'date' for the Data Type
  • Select 'other' Format
  • Enter the following for Other Format: %m/%d/%Y
  • Enter the following description: FDA Approval Date
  • Select Add
  • Select Add Index
  • Enter Name: Index
  • Select Add field within the 'Fields' fieldset
  • Enter the following Name: termination_date
  • Enter the following Length: 20
  • Select Add field to enter another field
  • Enter the following Name: fda_approval_date
  • Enter the following Length: 20
  • Select Add
  • Select Submit Index
  • Confirm the Data Dictionary Fields Added are correct
  • Confirm the Indexes and fields added are correct
  • Save the node

PART 2

  • Navigate to: /node/add/data?schema=dataset
  • Enter a Title: Dataset Test
  • Enter a Description: Description Test
  • Enter a Last Update date and time
  • Enter a Publisher Name
  • Enter a Contact Name and Email
  • Enter a Tag under Tags
  • Enter the following for File Title: Test data
  • Enter the following for File Description: Test data
  • Enter the following File Format: csv
  • Upload a Data File, you can use the Test Data File provided
  • Save the dataset
  • Navigate back to the previously created Data Dictionary and Index from PART 1
  • Grab the identifier. It will look something like this example: fc034f0d-c96d-484e-b1e4-79a9aed7c2e6
  • Navigate to the endpoint /api/1/metastore/schemas/data-dictionary/items/{identifier goes here}
  • Confirm the endpoint json looks like this:
{
  "identifier": "fc034f0d-c96d-484e-b1e4-79a9aed7c2e6",
  "data": {
    "title": "Data Dictionary and Index",
    "fields": [
      {
        "name": "termination_date",
        "title": "Termination Date",
        "type": "date",
        "format": "%m/%d/%Y",
        "description": "Termination Date"
      },
      {
        "name": "fda_approval_date",
        "title": "FDA Approval Date",
        "type": "date",
        "format": "%m/%d/%Y",
        "description": "FDA Approval Date"
      }
    ],
    "indexes": [
      {
        "description": "Data Index",
        "type": "index",
        "fields": [
          {
            "name": "termination_date",
            "length": 20
          },
          {
            "name": "fda_approval_date",
            "length": 20
          }
        ]
      }
    ]
  }
}

PART 3

  • Navigate to /admin/dkan/data-dictionary/settings
  • Select Dictionary Mode : Sitewide
  • Enter the identifier into the Sitewide Dictionary ID
  • Save Configuration

PART 4

  • Navigate to /admin/dkan/datastore/status
  • Confirm you see the Dataset row with the Title 'Dataset Test' from PART 2 and that the FETCH, STORE and POST IMPORT are all in 'Waiting'
  • You should now run CRON twice
  • Navigate to /admin/dkan/datastore/status
  • Confirm the FETCH, STORE, POST IMPORT are all in 'done'

PART 5

  • Navigate to /admin/dkan/datastore/status
  • Grab the Dataset uuid from the row you created
  • Navigate to your terminal and use the following command to see the dataset info: ddev drush dkan:dataset-info {{uuid here}}
  • Take note of the "table_name"
  • Navigate to your db 'example: ddev drush sqlc'
  • Enter the following sql: describe {{table_name goes here}};
  • Confirm that the termination_date and fda_approval_date has a type of date

PART 6

  • In the same terminal enter the following sql: show index from {{table_name goes here}};
  • Confirm you see the index created for both the termination_date and fda_approval_date

@kaise-lafrai kaise-lafrai force-pushed the Data-Dictionary-Index-Working branch 2 times, most recently from 2489108 to 9a1971e Compare May 20, 2024 18:18
@kaise-lafrai kaise-lafrai force-pushed the Data-Dictionary-Index-Working branch from 9a1971e to dbcf8d9 Compare May 24, 2024 18:54
@kaise-lafrai kaise-lafrai changed the title WIP: Data dictionary index working WIP: Data-Dictionary-Index May 24, 2024
@kaise-lafrai kaise-lafrai force-pushed the Data-Dictionary-Index-Working branch from dbcf8d9 to 4e9882e Compare June 27, 2024 15:32
@kaise-lafrai kaise-lafrai changed the title WIP: Data-Dictionary-Index WIP: Index UI Jul 25, 2024
@kaise-lafrai kaise-lafrai self-assigned this Jul 25, 2024
@dmundra dmundra self-assigned this Aug 9, 2024
@dmundra dmundra force-pushed the Data-Dictionary-Index-Working branch from f6f5384 to ed52003 Compare August 9, 2024 15:44
@dmundra dmundra mentioned this pull request Aug 13, 2024
2 tasks
@dmundra dmundra mentioned this pull request Sep 17, 2024
1 task
@dmundra dmundra removed their assignment Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants