GSoC 2023 Application Aman Kumar Shukla: Sympy Gamma - sympy/sympy GitHub Wiki

Project Title

Rework of Sympy Gamma website UI/UX and use of kernal support provided by Pyodide as backend.

Me as a person

  • Full Name: Aman Kumar Shukla
  • University: Birla Institute of Technology and Science (BITS Pilani), Pilani, Pilani Campus
  • Short bio: I am an undergradute student at BITS Pilani enrolled in MSc. Physics and B.E. Chemical Engineering courses spanning 5 years of program duration. I am also a coding and finance enthusiast and want to pursue career as a Software Developer.
  • Contact info:
  • Timezone: IST (UTC+5:30)

Me as a programmer

Find below my coding habbits as a programmer and other facts about me.

  • I use VS code as my IDE environment as it provides a lot of functionality support (whether built-in or through extensions) like linting, debugging, code formatting, etc. for major popular programming languages. Also it provides features like integrated terminal and supports git versioning through it's built-in extension which is a time-saver.
  • I use git-bash, ubuntu (wsl), cmd and/or powershell in integrated terminal of VS code. Whenever I want functionality of linux that is not supported in cmd/powershell I use ubuntu as wsl. This help me to compile things, or for other things through the use of commands in terminal whenever an command line approach is not possible in windows.
  • I have an intermediate experience in Frontend Web Development and I have created these websites as my voluntary services. I know HTML, CSS, Javascript, TailwindCSS, Bootstrap, SASS/SCSS, ReactJs, NextJs and have used many packages available through NPM.
    1. NSS BITS Pilani Website for student chapter organization at NSS BITS Pilani
    2. NSS BITS Pilani, BDC Website for NSS BITS Pilani, Blood Donation Campaign (BDC)
  • I also have good typing speed and I can type without looking at the keyboard which makes me a little more efficient during my work.
  • I like Python because it is easy to understand and has a lot of libraries for various applications, like for machine learning, for sending http requests, etc. I would say I have an intermediate level of experience with it. I know OOPs concept from my knowledge of Java, and though I haven't developed classes and modules in Python until now but I am well aware how things are implemented as I have previously gone through some codes dealing in the implementation of classes.
  • My favorite feature of Sympy is the solver module. It is such a dense module that can be used in variety of ways and that is what I like about it.
  • I have been using git as a version control system since my first website project of NSS BITS Pilani Website

Me and my project

  • Project Title: Rework of Sympy Gamma website UI/UX and use of kernal support provided by Pyodide as backend.
  • Proposed project length: 350 hours (This is my initial project length proposal. I don't know how much time things would take as I have less experience but this is my initial proposal based on my inituitions. The project length can be slashed if the mentor feels that some the features mentioned in my project is not required or the things can be implemented within 175 hours.)

I have a good amount of experience with some frontend frameworks, mainly ReactJs (and NextJs), and I am currently doing MSc. Physics + B.E. in Chemical Engineering. I also had dealt with backend codes in NodeJs, Google Firebase and database codes like MySQL, Casandra and MongoDB during my personal explorations. So, I was looking for a project that would not only give me an experience on fullstack website development but also give me an opportunity to explore the python tools potentially applicable in engineering. That is how my curiosity grew in the Sympy repo as I found it is dealing with Maths and Physics algorithms. While going through the idea list of Sympy, I found a migration implementation is required for the Sympy Gamma website otherwise it would be shut down. I felt I can extend my help as I believe open-source softwares should incur less expenses while providing free services. Also, I have my development experience so I decided to write a proposal on this idea. I think Sympy Gamma website is a good website as it provides live experience for the codes modules available in Sympy repository while also giving various analysis on search expressions at one place.

Currently the SymPy Gamma repository is built using django, which handles both the frontend and backend for the SymPy Gamma website. This gives it a monolith like structure which could be harder to maintain and scale if the SymPy community wants to add more features to the website. To have separation of concerns regarding the frontend and backend, I propose to use NextJs as the frontend framework in my project. I would continue to use Django as a backend support for the SymPy Gamma website as SymPy community is more composed of python developers. So, the main highlights of this project would be to integrate the pyodide kernel support for the SymPy Gamma website and implement a simple and neat UI/UX for the website. I would mostly require help from the mentors regarding the python codes, the way it has been implemented for the Sympy Gamma repository earlier and how it needs to be implemented using Pyodide. I assure mentors that they should not be worried regarding the frontend as I am well capable of handling that aspect.

Proposed Plan for UI/UX Design

I plan to replicate the simplistic UI design like the Google home page, the Wolfram Alpha main page or like the ChatGPT interface. I would like to add a small introductory UX experience as well. This would help new users to get a basic sense of the workings of the website. Also, I can implement the login functionality which would display the user's past search expressions where he can manage/save his search expressions (the functionality would be similar to the history button of google calculator app). I would use NextJs and TailwindCSS for the implementation of the frontend. I am open for options if the NextJs should be implemented using Javascript or Typescript language. Also, if the mentors feel that the bundle size of the should be kept minimum then I can drop the idea of using TailwindCSS and use Vanilla CSS (pure CSS) for the HTML styling or find other lighter bundle versions of it.

Why I am choosing NextJs as the frontend framework? The main benefit of writing the Sympy Gamma frontend in NextJs is that we can do more effective SEO optimization on the resources available on Sympy Gamma website. Plus unlike React.Js websites, Next.Js websites are easily traceable by the search engine crawler bots as Next.Js sends replies to a request in HTML-rendered form. NextJs gives us the option to handle the state changes in DOM elements on server-side rather than client-side and sends the final response in raw HTML form. This framework also gives us the flexibility of handling requests on client-side, server-side, or in hybrid mode (some parts being rendered on the client side, some being on the server side). Moreover as NextJs is based on ReactJs itself, so it simplifies the management of components of a webpage. Also, there is no hassle of implementation of routing using in-built Route react component, as in ReactJs, and a website route is created in NextJs just by reacting a js/jsx/ts/tsx file inside the pages directory (just as we do for Vanilla HTML website setup).

Project Plan

I think these are the major phases in the implementation of my project.

Phase 1

  • Create a basic aesthetic frontend for the Sympy Gamma using NextJs. The frontend would be responsive in design and would support dark mode also.
    • This would replace the app/template directory of the sympy/sympy_gamma repository
  • Create a CI/CD pipeline for the frontend only. This would not only be helpful for me but also for future contributors seeking to contribute.

Phase 2

  • Integrating Pyodide support within the frontend. In this phase, I would be going through the codebase of the sympy/sympy_gamma repository and implement the functionality currently available using Pyodide.
    • Implementation of Arithmetic analysis card in the frontend (as implemented in current Sympy Gamma website) using Pyodide and Sympy.
    • Implementation of Algebra analysis card in the frontend (as implemented in current Sympy Gamma website) using Pyodide and Sympy.
    • Implementation of Trigonometry analysis card in the frontend (as implemented in current Sympy Gamma website) using Pyodide and Sympy.
    • Implementation of Calculus analysis card in the frontend (as implemented in current Sympy Gamma website) using Pyodide and Sympy.
    • Implementation of Number Theory analysis card in the frontend (as implemented in current Sympy Gamma website) using Pyodide and Sympy.
    • Implementation of Discrete Mathematics analysis card in the frontend (asimplementedd incurrent Sympy Gamma website) using Pyodide and Sympy.
    • Implementation of Plotting analysis card in the frontend (as implemented in current Sympy Gamma website) using Pyodide and Sympy.
    • Implementation of other Miscellaneous analysis card in the frontend (as implemented in current Sympy Gamma website) using Pyodide and Sympy.
    • Implementation of Random Example button.

Phase 3

  • Creating a CI/CD pipeline for the whole app using github actions, travis artifacts and/or other applicable tools.
  • Write a Dockerfile to provide support for the scability of the website.
  • Implement a little introductary UX experience for the Sympy Gamma website users.
  • Exploration and implementation of potential usecases of ChatGPT using it's API endpoints to improve the usability SymPy Gamma website. Basic idea would be to display additional suggestions provided by ChatGPT, using it's API endpoints, on the input entered by the user. (Optional feature)
  • Introduction of additional features like login functionalities where the user can store and manage his previous expression search history like the ChatGPT interface. (Optional feature)

Proposed Timeline

I am planning to work from 16:00 (IST) to (23:00) daily with an hour of break in between. This would roughly cover the 40 hours/week of time commitment required. I choose this timing for two specific reasons. First, most of my academic engagement would be during the morning sessions so I won't be available during those hours. Second, I think it would be easier for me to reach out to mentors from Europe or NA region as it would be daytime for them. Also, I plan to publish a medium article weekly during the weekends. I feel this is important as this would allow me reflect on my learnings and allow me to share my learnings. This would also give me an opportunity to not only publicize my skills as a programmer but also highlight the importance of Sympy.

Commitments during GSoC

My end semester exams for the Spring Season Semester (current semester) would fall between 5th May 2023 and 22nd May 2023. After 22nd May 2023, since I would be taking some courses during the summer vacations (viz. Quantum Mechanic II), so I would be having my academic engagements as well. The summer term is scheduled to commence on 22nd May 2023 and will end on 22nd July 2023. After that I would be free and would have much more time to devote to GSoC and coding in general. My next semester, if I go by the previous year's timeline, should roughly commence between 15th April - 20th April, 2023 and it would end in December. Also, I would have my Mid-Semester exam during the month of October.

Having commented out my academic commitments, I should futher add that it won't be a problem as I am used to balancing my academic commitment and exploring my coding passion. Previously I have developed two websites for the NSS student chapter during my semesters, so I have already adapted my daily schedule according to that. I will inform in advance if I am unavailabile during any of my academic evaluations exams, while traveling to/from my university to my home, and other such engagements. I am anticipating 2 weeks of break spread unevenly throughout the GSoC duration, so if any work is delayed for a week I would ensure to clear it so as to be in sync with my proposed timeline.

Community Bonding Period (May 4 - May 28)

I would really be awaiting for this period to have the first chance of interaction with the mentors. I would be taking a look into the history of the SymPy project and how it has evolved over time during my conversation with my mentors. This would help me access the lifecycle of any project in general and what decisions/vision goes in involving the open-source community to contribute ones open-source project. After this I would like to understand the capabilities of my mentors so that I am roughly clear about what help I can get from them and the things I would have figure it on my own. Also during this period, I would take the opportunity to discuss the nitty-gritties of my project and get a rough idea of the things related my project.

Coding Period (May 29 - August 28)

  • Week 1, 2 (May 29 - June 11)
    • During these weeks I would implement the frontend of the Sympy Gamma website. Since the frontend is pretty basic, hence I feel that I would be able to implement a reponsive website with dark mode support.
    • Write github action workflow routine for the CI/CD deployment of the frontend. Also, I would write a simple Dockerfile.
    • Writing helper docs for future contributors.
    • I would also publish medium articles on the working methodologies that I applied for the implemetation of frontend.
  • Week 3, 4, 5 (June 12 - July 2)
    • Fixing any minor/major bugs in the frontend.
    • Implementation of Arithmetic analysis card using Pyodide and Sympy. (I have taken a relatively large timeframe for this one as I will have to study more in depth about Pyodide, Sympy and Sympy Gamma)
    • Adding unit tests of the code.
    • Implementing relevant SEO optimizations for the website.
    • Writing helper docs for future contributors.
    • Publish medium articles on my learnings during respective week.
  • Week 6, 7 (July 3 - July 16)
    • Fixing any minor/major bugs.
    • Implementation of Algebra analysis card using Pyodide and Sympy.
    • Adding unit tests of the code.
    • Implementing relevant SEO optimizations for the website.
    • Writing helper docs for future contributors.
    • Publish medium articles on my learnings during respective week.
  • Week 8, 9 (July 17 - July 30)
    • Fixing any minor/major bugs.
    • Implementation of Trigonometry analysis card using Pyodide and Sympy.
    • Adding unit tests of the code.
    • Implementing relevant SEO optimizations for the website.
    • Writing helper docs for future contributors.
    • Publish medium articles on my learnings during respective week.
  • Week 10, 11 (July 31 - August 13)
    • Fixing any minor/major bugs.
    • Implementation of Calculus analysis card using Pyodide and Sympy.
    • Adding unit tests of the code.
    • Implementing relevant SEO optimizations for the website.
    • Writing helper docs for future contributors.
    • Publish medium articles on my learnings during respective week.
  • Week 12, 13 (August 14 - August 27)
    • Fixing any minor/major bugs.
    • Implementation of Number Theory analysis card using Pyodide and Sympy.
    • Adding unit tests of the code.
    • Implementing relevant SEO optimizations for the website.
    • Writing helper docs for future contributors.
    • Publish medium articles on my learnings during respective week.
  • Week 14, 15 (August 28 - September 10)
    • Fixing any minor/major bugs.
    • Implementation of Discrete Mathematics analysis card using Pyodide and Sympy.
    • Adding unit tests of the code.
    • Implementing relevant SEO optimizations for the website.
    • Writing helper docs for future contributors.
    • Publish medium articles on my learnings during respective week.
  • Week 16, 17 (September 11 - September 24)
    • Fixing any minor/major bugs.
    • Implementation of Plotting analysis card using Pyodide and Sympy.
    • Adding unit tests of the code.
    • Implementing relevant SEO optimizations for the website.
    • Writing helper docs for future contributors.
    • Publish medium articles on my learnings during respective week.
  • Week 18, 19 (September 25 - October 8)
    • Fixing any minor/major bugs.
    • Implementation of other Miscellaneous analysis card using Pyodide and Sympy.
    • Adding unit tests of the code.
    • Implementing relevant SEO optimizations for the website.
    • Writing helper docs for future contributors.
    • Publish medium articles on my learnings during respective week.
  • Week 20 (October 9 - October 22)
    • Fixing any minor/major bugs.
    • Implementation of CI/CD pipeline for the complete Sympy Gamma website. This includes writing Dockerfile to support the scalability of the website.
    • Implementation of little introductory UX experience for the Sympy Gamma website users.
    • Adding unit tests of the code if required for the frontend.
    • Publish medium articles on my learnings during respective week.
  • Week 21, 22, 23 (October 23 - November 5)
    • Fixing any minor/major bugs.
    • Displaying ChatGPT suggestions on the input provided. (Optional feature).
    • Implementation of user login feature where the user can view and manage his search history (Optional feature).
    • Writing unit tests for the frontend code/any code in general.
  • Final Week (November 6 - November 12)
    • Fixing any minor/major bugs.
    • Finishing any work that might be incomplete.
    • Writing my final report describing my entire work during GSoC. I would post the same as my medium article and create a wiki page in the sympy/sympy repository. I would also include any future feature addition that could be added to the Sympy Gamma website.

Post GSoC

After the commencement of the GSoC program if there are some unfinished task left, I would complete them before focusing on other contribution to SymPy repositories. Also, I would continue to provide my support for the maintainance of my contributions. Additionally, I am planning to contribute in the development of the PDE modules, a module that is not implemented yet. Also, I would like to develop some modules related to Quantum Mechanics, viz. Lie algebra (I think module support for this is not available), and other module related to Quantum Mechanics.

I am happy that I got introduced to the open-source development through Sympy. The documentation felt a little overwhelming in the start but the documentations are organized so well that I got the hang of the open-source development within a short span of time. Also, I loved the guidance and support of key organization members such as Aaron Meurer (asmeurer), S.Y. Lee (sylee957), Oscar Benjamin (oscarbenjamin) and it was really helpful to interact with them during my open-source contribution journey. Taking inspiration from them, I would love to offer my mentorship for future GSoC programs with Sympy.

Patch requirements and my Open-Source contributions

Contributions to Sympy repository

Merged (2)

  • #24702 & #24576: Fixed a lot of redirected and broken links in the SymPy docs
    • Solves first aspect of Issue #24140

Open (2)

  • #24619: Added check-brokenLinks build routine to github actions
    • This PR attempts to implement a github action routine to provide more visibility for the links that might get/are broken and are present in the docs.
    • Solves second aspect of Issue #24140
  • #24707: Attempts to solve dark mode compatibility issues of physics diagrams.

All my PRs until now in Sympy

Contributions to open-source projects (including sympy)

All my PR contributions

References

  1. Sympy Repository: https://github.com/sympy/sympy
  2. Sympy GSoC Idea List: https://github.com/sympy/sympy/wiki/GSoC-Ideas
  3. Sympy Gamma Repository: https://github.com/sympy/sympy_gamma
  4. Pyodide: https://pyodide.org/en/stable/index.html
  5. NextJs: https://nextjs.org/
  6. TailwindCSS: https://tailwindcss.com/docs/installation