/cse-challenge

Script submission for CSE Challenge

Primary LanguageJavaScript

cse-challenge

This repository contains my script submission for cse-challenge.

Usage

  cd cse-challenge
  npm run start -- --help
  npm run start -- -t <token

Submission Requirements

  • Create a GitHub repo and send along the link
  • Commit your work as you work documenting each commit
  • Make sure not to commit the API key you've been given

Provided Example

{
  "subjectCode": "6012dd6a016ce30026cbd08d",
  "number": "101",
  "title": "Accounting 101",
  "credits": {
    "chosen": "fixed",
    "credits": {
      "min": "3",
      "max": "3"
    },
    "value": "3"
  },
  "status": "draft",
  "dateStart": "2021-04-03",
  "groupFilter1": "6012e9eaffe5da00a2a51cbb",
  "groupFilter2": "6012e96effe5da00a2a51cb9",
  "campus": {
    "6012de03baa3f800262b5dbf": true,
    "6012ddfbe43ec1002784e1c5": true
  },
  "notes": "Submitted by <my name>"
}

Approach and Notes

  1. Read data from the provided CSV
  2. There are several pieces of information we will need to retrieve:
    1. subjectCode: subject identifier (ex. ACCT is 6012dd6a016ce30026cbd08d)
    2. groupFilter1 and groupFilter2: group identifier and parent group identifier
    3. campus: campus identifier (ex. North is 6012ddf35a84800027c335e3)
  3. Additional logic that will require careful consideration:
    1. creditType can change the values and format of the data for credits and value
    2. dateStart is based of off Winter, Spring, Summer, and Fall terms and YYYY-MM-DD format (ex. Fall 2021 needs to be 2021-10-04)
  4. Static fields:
    1. status: draft
    2. notes: Submitted by Nick Jenson

Resources

  1. cse-challenge repository
  2. Kuali Developer Documentation
  3. csv-parser npm documentation
  4. axios npm documentation
  5. yargs npm documentation