Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Software] Proposal for Refactoring and Restructuring main.py #364

Open
p0tat0chip opened this issue Jan 8, 2025 · 7 comments
Open

[Software] Proposal for Refactoring and Restructuring main.py #364

p0tat0chip opened this issue Jan 8, 2025 · 7 comments
Assignees
Labels
ADVANCE Hold: Dependent Issues postponed due to potential conflicts with existing or pending PRs. SWOC

Comments

@p0tat0chip
Copy link
Contributor

Currently, the software uses tkinter, mysql and other libs for data visualization being functional suffers from some issues:

  • All 1400+ lines of code are written in a single main.py file, making it difficult to navigate and comprehend.
  • Variable names are inconsistent, reducing readability and maintainability.
  • Lines exceed 74 characters, making them hard to read and breaking style guidelines.
  • The program lacks modularity, which hinders extensibility.

Proposed Solution

To address these issues, I propose to refactor main.py into separate, logical components based on their functionality:

  • UI Elements(Buttons, Labels, Icons)
  • Application State Handling(For example for the light/dark mode)
  • database handling
  • Data Visualization Functions

I Believe it will allow smoother addition of function to data visualization and increase readability and maintainability.

@github-actions github-actions bot added the Review Queued Waiting for the Dataverse's Maintainer to review this issue. label Jan 8, 2025
Copy link
Contributor

github-actions bot commented Jan 8, 2025

👋 Thank you for raising an issue! We appreciate your effort in helping us improve. A maintainer from Dataverse will review it shortly. Stay tuned!

@p0tat0chip p0tat0chip changed the title Proposal for Refactoring and Restructuring main.py [Software] Proposal for Refactoring and Restructuring main.py Jan 8, 2025
@multiverseweb
Copy link
Owner

multiverseweb commented Jan 8, 2025

Nice idea @p0tat0chip. I'm assigning it to you.

Are you a 'SWOC' participant? As I'll have to award points for your merged PRs.

@multiverseweb multiverseweb added SWOC ADVANCE and removed Review Queued Waiting for the Dataverse's Maintainer to review this issue. labels Jan 8, 2025
@p0tat0chip
Copy link
Contributor Author

Nice idea @p0tat0chip. I'm assigning it to you.

Are you a SWOC participant? As I'll have to award points for your merged PRs.

Yes, I am a SWOC participant

@p0tat0chip
Copy link
Contributor Author

Been a little busy will start working from today 👍

@multiverseweb
Copy link
Owner

No worries, take your time. Good luck!

@multiverseweb
Copy link
Owner

multiverseweb commented Jan 18, 2025

Hey @p0tat0chip, if you haven't started working on the issue yet, then I would suggest you to work on this later as we're integrating FastAPI in the website #386 #374 . Although the issue is related to website but it will change the repo structure and might cause complex merge conflicts with this issue's PR.

I'm sorry if this caused any inconvenience.

@multiverseweb multiverseweb added the Hold: Dependent Issues postponed due to potential conflicts with existing or pending PRs. label Jan 18, 2025
@p0tat0chip
Copy link
Contributor Author

Hey @p0tat0chip, if you haven't started working on the issue yet, then I would suggest you to work on this later as we're integrating FastAPI in the website #386 #374 . Although the issue is related to website but it will change the repo structure and might cause complex merge conflicts with this issue's PR.

I'm sorry if this caused any inconvenience.

I was thinking about the same as well , there are also a bunch of other changes need to be done:

  • Aside from scatter plot and line graph, other functions seem to not work at all or have poor error handling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADVANCE Hold: Dependent Issues postponed due to potential conflicts with existing or pending PRs. SWOC
Projects
None yet
Development

No branches or pull requests

2 participants