Important Points to Note
Category
Code Refactoring
Enhancement Description
📌 Description
The current application() function for navigation in app.py works but can be improved in terms of:
- Code readability and maintainability
- Proper error handling (e.g., secrets lookup, missing attributes in
st.user)
- Best practices (docstrings, avoiding deep nesting, adding
__main__ guard)
✅ Proposed Changes
- Refactor
application() for better readability (use variables for user/admin checks).
- Add docstrings and inline comments to explain logic.
- Use
.get() for secrets lookup to avoid KeyError.
- Add
if __name__ == "__main__": guard for safe script execution.
- Ensure PEP8 formatting and consistent indentation.
🚀 Benefits
- Cleaner, more maintainable code.
- Safer execution in different environments.
- Easier for new contributors (especially GSSoC’25 participants) to understand the navigation logic.
🔖 Labels
gssoc25 enhancement refactor
Screenshots or Logs
This complete code can be improved as stated above, I am not sure if I am allowed to fork and implement changes as it is stated not to raise a PR before I am assigned to the issue.
Priority
Up to 2 days
Open Source Program
GSSoC
Would you like to work on this issue?
Yes
Important Points to Note
Category
Code Refactoring
Enhancement Description
📌 Description
The current
application()function for navigation inapp.pyworks but can be improved in terms of:st.user)__main__guard)✅ Proposed Changes
application()for better readability (use variables for user/admin checks)..get()for secrets lookup to avoidKeyError.if __name__ == "__main__":guard for safe script execution.🚀 Benefits
🔖 Labels
gssoc25enhancementrefactorScreenshots or Logs
This complete code can be improved as stated above, I am not sure if I am allowed to fork and implement changes as it is stated not to raise a PR before I am assigned to the issue.
Priority
Up to 2 days
Open Source Program
GSSoC
Would you like to work on this issue?
Yes