Skip to content

Fix and improve nusmoderator docs#2631

Open
taneliang wants to merge 5 commits into
masterfrom
fix-moderator-docs
Open

Fix and improve nusmoderator docs#2631
taneliang wants to merge 5 commits into
masterfrom
fix-moderator-docs

Conversation

@taneliang
Copy link
Copy Markdown
Member

@taneliang taneliang commented May 10, 2020

Context

As mentioned in #2630, it looks like nusmoderator's doc generation was broken by our TypeScript migration. documentation.js doesn't automatically pick up TS files.

Implementation

  • Make documentation.js parse TS files.
  • As documentation.js's lint command doesn't allow us to specify that TS files should be parsed, I've changed the lint script to regenerate docs and use git diff to ensure that there are no changes.
  • Removed types from our JSDoc docstrings, so that docs will use our TS types.
  • Added docstrings for our TS types so that they'll show up in the generated docs with links.

Other Information

#accept2ship

@taneliang taneliang requested a review from a team May 10, 2020 03:33
@taneliang taneliang force-pushed the fix-moderator-docs branch from 609b45c to 265521c Compare May 10, 2020 03:34
@codecov
Copy link
Copy Markdown

codecov Bot commented May 10, 2020

Codecov Report

Merging #2631 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2631   +/-   ##
=======================================
  Coverage   46.18%   46.18%           
=======================================
  Files         244      244           
  Lines        5151     5151           
  Branches     1189     1189           
=======================================
  Hits         2379     2379           
  Misses       2772     2772           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 56b0889...265521c. Read the comment docs.

@nusmods-deploy-bot
Copy link
Copy Markdown

* - Instructional week 1: `weekNumber` = 1
* - Instructional week 13: `weekNumber` = 13
* - Examination week 2: `weekNumber` = 2
* - Examination week 2: `weekNumber` = 2
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is the same as the line above - is this suppose to be vacation?


#### num

- **See: getAcadWeekInfo
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This new line is inconvenient, although that seems like a bug in Documentation

/**
* This `AcadWeek` is the `weekNumber`-th week with this academic week type
* in the semester. `null` if the semester has exactly 1 week of this type.
* Examples below:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A bit weird that this has more examples than the original docs on AcadWeek.weekNumber

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.

2 participants