Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Original issue description
Description
Every semester we spend far too much time manually entering team names, uploading them to s3 and inserting bios. This will be a script automating that whole process.
Milestone 1 : Parse CSV into teams
Begin first by making sure you can read the CSV file correctly.
💡 A CSV (comma separated values) file is a text-format for storing spreadsheet-like data. Open up the file above and compare it to the Google Spreadsheet I shared with you both. It should be identical.Use the
csv-parser
library found here. I’ve already installed it into the Github repo.Here’s a quick example script I’ve written to ensure it will work:
Milestone Requirements
This means you’ll need to:
DESK
field is populated and all other fields are blank.Functions
function readCSV(csvFile: string): returns [{}]
Reads any CSV file at the given file path provided (
csvFile
). Returns the elements as a list of objects. Does not do any logic parsing for teams or team members.function parseTeams(csvDump): returns [{}]
Reads a dump of CSV objects (from
readCSV
) and parses all objects into a nested object (See Example Parsed Object below).function isTeamHeader(object): returns bool
Reads a team object and returns whether an object looks like a team header or not. See above explanation for identifying team headers.
Example Parsed Object
closes #20