Closed shepherd-06 closed 11 months ago
This pull request introduces enhancements to error handling, code readability, and configuration management across Python and JavaScript files. It also includes improvements in HTML/CSS structure and styling, along with the addition of dynamic error message display functionality.
File(s) | Summary |
---|---|
.env.example |
Added a new configuration variable USER_PLAN . |
main.py |
Improved exception handling, renamed function parameters for clarity, optimized JSON handling, and updated Cypher query usage. |
templates/index.html |
Enhanced HTML structure and CSS styling, refactored JavaScript functions for better readability and error handling, and added dynamic error message display. |
🐇 "In the land of code, where logic is king,
Changes are made, improvements they bring.
With each pull request, we hop and we sing,
Celebrating the joy that these updates will bring! 🎉"
oh man, i was just starting to work on this but this looks much more complete - thank you!
Bug Fixes:
HTML Template
Python
In Python, most of the bugs occurred due to mismatches in variables or missing variable names. I changed the graph query as the JSON payload changes. JSON Sanitization function is no longer needed, but it's still there.
In the HTML Template, the loading bar wasn't working due to missing CSS classes. There were multiple JS functions, all overwriting each other, I removed the unnecessary ones. I have also added a bunch of
null
/undefined
checkers and added a default value for them. I have added a lot of comments in the JS area, as this file kept getting mishandled on merge.You (we) would need to add state management in the front end to utilize other functionalities. :) Also, You/we would need a proper pull-request guideline as well, just saying. :)
Summary by CodeRabbit
Release Notes:
USER_PLAN
to manage user plans.check_if_free_plan
function to retrieve the user plan from environment variables. Also, refactored thehandleFormSubmit
function for better readability and error handling.correct_json
function to return sanitized JSON as a dictionary, improving performance and code clarity.graphData
in thecreateGraph
function.