# My GSoC 2023 Proposal - SymPy (April 4, 2023)

# <font style="color:rgb(51, 51, 51);">Empowering SymPy Live and SymPy Gamma with Pyodide/Brython and Modern Front-end Frameworks</font>
## <font style="color:rgb(51, 51, 51);">Abstract</font>
<font style="color:rgb(51, 51, 51);">This proposal aims to enhance the functionality and performance of SymPy Live and SymPy Gamma, two online calculators and interactive teaching tools based on the SymPy Python library. The project will integrate Pyodide/Brython and modern front-end frameworks to enable Python code execution directly in the browser and improve the user interface. The specific tasks include integrating Pyodide/Brython with SymPy Live and SymPy Gamma, updating the front-end design using modern frameworks, and improving the parsing of input expressions in SymPy Gamma. Additionally, documentation and tests will be written to ensure the applications are well-documented and tested and can be easily maintained in the future. The expected outcome is a modified version of SymPy Live and SymPy Gamma with improved functionality and a modern front-end design.</font>

## <font style="color:rgb(51, 51, 51);">Introduction</font>
<font style="color:rgb(51, 51, 51);">SymPy is a Python library for symbolic mathematics. It provides a wide range of features for algebraic manipulation, calculus, and equation solving. SymPy Live and SymPy Gamma are two online calculators and interactive teaching tools based on SymPy. SymPy Live is an interactive console version of SymPy that is integrated into SymPy's documentation. SymPy Gamma is a SymPy version of WolframAlpha, providing users with the ability to enter any mathematical expression and have it computed automatically. Both applications are currently hosted on Google App Engine, which is costly for the SymPy project.</font>

<font style="color:rgb(51, 51, 51);">This proposal aims to migrate SymPy Live and SymPy Gamma to Pyodide/Brython and modern front-end frameworks, enabling SymPy to run in the browser's JavaScript environment on the client-side. This will reduce hosting costs and improve the user experience. Additionally, the parsing of input expressions in SymPy Gamma will be improved to support more types of inputs.</font>

## <font style="color:rgb(51, 51, 51);">Objectives</font>
<font style="color:rgb(51, 51, 51);">The objectives of this project are:</font>

+ <font style="color:rgb(51, 51, 51);">Migrate SymPy Live and SymPy Gamma to Pyodide/Brython to enable Python code execution directly in the browser.</font>
+ <font style="color:rgb(51, 51, 51);">Update the front-end design using modern frameworks such as Svelte, SolidJS, Astro, TailwindCSS, WindiCSS, or UnoCSS.</font>
+ <font style="color:rgb(51, 51, 51);">Improve the parsing of input expressions in SymPy Gamma to support more types of inputs.</font>
+ <font style="color:rgb(51, 51, 51);">Write documentation and tests for the modified versions of SymPy Live and SymPy Gamma.</font>

## <font style="color:rgb(51, 51, 51);">Methodology</font>
<font style="color:rgb(51, 51, 51);">The project will be divided into the following phases:</font>

### <font style="color:rgb(51, 51, 51);">Phase 1: Pyodide/Brython Integration</font>
<font style="color:rgb(51, 51, 51);">The first phase will involve integrating Pyodide/Brython with SymPy Live and SymPy Gamma. This will enable Python code execution directly in the browser and reduce hosting costs. Pyodide/Brython will be used to run the SymPy code in the browser environment.</font>

### <font style="color:rgb(51, 51, 51);">Phase 2: Front-end Design Update</font>
<font style="color:rgb(51, 51, 51);">The second phase will involve updating the front-end design of SymPy Live and SymPy Gamma using modern frameworks such as Svelte, SolidJS, Astro, TailwindCSS, WindiCSS, or UnoCSS. This will improve the user experience and make the applications more modern and eco-friendly.</font>

### <font style="color:rgb(51, 51, 51);">Phase 3: Parsing Improvement</font>
<font style="color:rgb(51, 51, 51);">The third phase will involve improving the parsing of input expressions in SymPy Gamma to support more types of inputs. This will enhance the functionality of the application and make it more user-friendly.</font>

### <font style="color:rgb(51, 51, 51);">Phase 4: Documentation and Testing</font>
<font style="color:rgb(51, 51, 51);">The final phase will involve writing documentation and tests for the modified versions of SymPy Live and SymPy Gamma. This will ensure that the applications are well-documented and tested and can be easily maintained in the future.</font>

## <font style="color:rgb(51, 51, 51);">Deliverables</font>
<font style="color:rgb(51, 51, 51);">The following deliverables are expected from this project:</font>

+ <font style="color:rgb(51, 51, 51);">Modified versions of SymPy Live and SymPy Gamma with Pyodide/Brython integration and modern front-end design.</font>
+ <font style="color:rgb(51, 51, 51);">Improved parsing of input expressions in SymPy Gamma to support more types of inputs.</font>
+ <font style="color:rgb(51, 51, 51);">Documentation and tests for the modified versions of SymPy Live and SymPy Gamma.</font>

## <font style="color:rgb(51, 51, 51);">Timeline</font>
<font style="color:rgb(51, 51, 51);">The project will take 175 hours to complete. The timeline for the project is as follows:</font>

| **<font style="color:rgb(51, 51, 51);">Phase</font>** | **<font style="color:rgb(51, 51, 51);">Tasks</font>** | **<font style="color:rgb(51, 51, 51);">Time</font>** |
| :--- | :--- | :--- |
| <font style="color:rgb(51, 51, 51);">Phase 1</font> | <font style="color:rgb(51, 51, 51);">Pyodide/Brython Integration</font> | <font style="color:rgb(51, 51, 51);">50 hours</font> |
| <font style="color:rgb(51, 51, 51);">Phase 2</font> | <font style="color:rgb(51, 51, 51);">Front-end Design Update</font> | <font style="color:rgb(51, 51, 51);">50 hours</font> |
| <font style="color:rgb(51, 51, 51);">Phase 3</font> | <font style="color:rgb(51, 51, 51);">Parsing Improvement</font> | <font style="color:rgb(51, 51, 51);">50 hours</font> |
| <font style="color:rgb(51, 51, 51);">Phase 4</font> | <font style="color:rgb(51, 51, 51);">Documentation and Testing</font> | <font style="color:rgb(51, 51, 51);">25 hours</font> |


## <font style="color:rgb(51, 51, 51);">Prerequisites</font>
<font style="color:rgb(51, 51, 51);">The following skills are required for this project:</font>

+ <font style="color:rgb(51, 51, 51);">Front-end coding experience (CSS, JavaScript)</font>
+ <font style="color:rgb(51, 51, 51);">Python programming skills</font>
+ <font style="color:rgb(51, 51, 51);">Familiarity with Pyodide/Brython</font>
+ <font style="color:rgb(51, 51, 51);">Familiarity with modern front-end frameworks such as Svelte, SolidJS, Astro, TailwindCSS, WindiCSS, or UnoCSS</font>

## <font style="color:rgb(51, 51, 51);">Conclusion</font>
<font style="color:rgb(51, 51, 51);">This project aims to enhance the functionality and performance of SymPy Live and SymPy Gamma by migrating them to Pyodide/Brython and modern front-end frameworks. The project will also improve the parsing of input expressions in SymPy Gamma to support more types of inputs. The expected outcome is a modified version of SymPy Live and SymPy Gamma with improved functionality and a modern front-end design.</font>