Skip to content

Refactor the parsing logic to set up the reference between course and section using compound keys #100

@mikehquan19

Description

@mikehquan19

Refactor the parser in parser/courseParser.go and parser/sectionParser so that the course can reference the list of associated sections using their compound keys (combination of fields that uniquely identify the object) and vice versa.

For example, each course can be identified by:

{
   "subject_prefix": XX, 
   "course_number": YYYY, 
   "catalog_year": ZZ
}

instead of just mongo.Id (Same thing for section). How you want to set up this compound key is up to you as long as they are unique. You should only be concerned with the connection between course and section.

Refactoring the parser means that you will have to do the following things:

  • Refactor the schema of course and section over the nebula-api repo
  • Refactor the parsing logic between course and sections (main part)
  • Refactor the course and section validating part in validator.go
  • Refactor the test in courseParser_test.go, sectionParser_test.go, and validator_test.go.

While you work on this issue, make sure to pull or push to the compound-key branch that I created in both nebula-api & api-tools repo.

Metadata

Metadata

Labels

L2A task suitable for someone who is comfortable helping with implementing features.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions