Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
FR Team Evaluation
Requirements version: 0.2, Dt: 04-Aug-2017
User story: Map the evaluation of a team member to all the members of a team.
We often have the requirement of evaluating a team of participants as one entity. The scores received by the team are to be allocated to all the team members. Such a solution would avoid the need for individual team members to submit separate evaluation requests.
A behavioral test for the user story is as follows.
A team is setup and members are allocated to the team.
This team information is expressed in the form of csv file containing the fields <memberID,teamID> where both memberID and teamID are strings.
Some of the team members have an evaluation score.
The result of the evaluation score of a team members is expressed in the form of a csv file containing the fields <memberID,score> where memberID is a string and score comes from a set of natural numbers.
- Select the highest marks received by any one of the team members.
- Assign the highest marks to all of the team members.
- All the team members receive highest marks received by any of the team members.
- If none of the team members are evaluated, all the team members receive zero.
- If a member with out a team is found with an evaluation score, then the corresponding memberID is written to log. The entry is ignored from the final marks list.
- All invalid entries in the input are logged and ignored for the process of computing the updated scores.
- The input reading part is separate from the actual marks mapping part so that input can be read either from csv file or from MySQL database.
Advice on use of libraries: The code developed as part of this exercise, if found to be written correctly, shall be integrated into AutolabJS software. Thus, if possible, prefer the existing package dependencies of AutolabJS over new packages.
I/O naming conventions
input files: teams.csv, scores.csv
output files: teamScores.csv
For MySQL DB table names are:
teams table with two columns <memberID, teamID>
scores table with three columns <memberID, score, teamScore>
However, ideally this information is read from a configuration json file named team.json.
- An npm package / node.js project satisfying the above requirement.
- A github.com open-source project where the source code is available for review.
- If possible, stick to the coding standards of AutolabJS.