GSoD’20 @ NRNB — Final Report

Rahul Agrawal
2 min readDec 4, 2020

Overview

The final project report for my Season of Docs 2020 project with the National Resource for Network Biology: Improving Cytoscape.Js Documentation

Project description

This project's main objective was to convert the documentation for Cytoscape, currently a JSON specification with references to Markdown files, to JSDoc comments in the code. From the JSDoc comments, a Typescript definition file will be generated.

This will leverage the IntelliSense/autocomplete feature for the Cytoscape.js API in rich text editors like Visual Studio Code, Atom, and Sublime Text — making it much easier to use Cytoscape.js.

Work done till now

  1. Adding JSDoc annotations — I have added JSDoc annotations to all the different sections like Core, Collection, Animation, and layout.
    Related Commit- Link
  2. Made scripts to Generate Docs from Annotations — I have made a script that will first generate a few AST files from the JSDoC annotations, and after that, all the doc will be built automatically.
    Few of the commands integrated are -
npm run docs:ast:core
npm run docs:ast:collection
npm run docs:ast:animation
npm run docs:ast:layout
npm run docs:ast:*

3. Made scripts to Generate Typescript Definition . By using an npm module tsd-jsdoc, I was able to generate a typescript definition file, which will help to leverage the IntelliSense support on different text editors.
Few of the commands integrated are -

npm run docs:ts:core
npm run docs:ts:collection
npm run docs:ts:animation
npm run docs:ts:layout
npm run docs:ts:*

4. Added Typescript support to style section — I have added jsdoc support to different sections which are not part of the current documentation but have been used to provide types of different functions. For example properties.js.

Final Contribution

Link to Final Pull Request having all the changes — Link

The Way Forward…

Still there are many things which can be integrated like

  1. Video Tutorials
  2. A Google form API to create GitHub issue.
  3. A playground

etc. So I will be continuing to contribute to the cytoscape.js project and will try to add all the features mentioned above.

Conclusion

I would like to thank my mentor, Max Franz for Guiding me and helping me whenever I needed it. I am very glad that I got the opportunity to work under his guidance on the project.

--

--