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

Add profile documentation #412

Closed
wants to merge 7 commits into from
Closed

Conversation

leihelen
Copy link
Contributor

changed the documentation in Profile.ts

@leihelen leihelen requested a review from a team as a code owner October 22, 2023 20:29
@dti-github-bot
Copy link
Member

dti-github-bot commented Oct 22, 2023

[diff-counting] Significant lines: 26.

Copy link
Contributor

@harrisonchin2523 harrisonchin2523 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Helen, nice job addressing the changes that Michelle requested. I noticed that you just have some things in the docstrings that might not be totally correct. For some of the docstrings, you state that the function will throw an error "if there are none", but this isn't necessarily accurate. For example. getTotalLikesByStudentId will just return a message with totalLikes = 0 and not throw an error. Did you mean if the findOne methods didn't find a document, then they would return null, or it would error if let's say the netId did not exist?

* [getTotalLikesByStudentId] returns the total number of likes a student has gotten on their reviews
* Returns the number of likes that match the reviewIds associated with a given
* netId and error if there are none
* This method counts the total number of likes received by a student.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey Helen, nice work! I think here we should change "This method counts the total number of likes received by a student." to "This method calculates the total number of likes a student has received on all their reviews." to be a little more clear

Copy link
Contributor

@harrisonchin2523 harrisonchin2523 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just being a little bit nitpicky here, but it seems like some of the docstrings have redundant information. For example, countReviewsByStudentId states what the function does twice in the first three lines.

@wizhaaa wizhaaa closed this May 1, 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.

5 participants