Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Refactoring utility.py and search.py #101

NamamiShanker started this conversation in Ideas
May 31, 2021 · 4 comments · 10 replies
Discussion options

I think utility.py file has become very big and a bit confusing. It will be a bit difficult for new contributors to understand its functionality easily. It would be better if we split it into utility.py, questionpanel.py, playbook.py or some other structure. We can shift classes and improve existing implementation.

I think the current structure of search.py is also messy.

We should discuss this and share some ideas.

You must be logged in to vote

Replies: 4 comments · 10 replies

Comment options

Yes code refactoring is necessary. I agree with your point.
I suggest @pranavbaburaj to move all the test file to a new folder called test as well.

I think we can make a new folder called as features and make file called as api.py (all the request like get,put,post), playbook.py, notion.py(logging into notion to saving the data into notion), display.py, search.py

What do you guys suggest ?
@guptaaastha @pranavbaburaj @Siddhant-K-code @anshsrtv ?

You must be logged in to vote
0 replies
Comment options

Yes, I think the project structure is a bit messed up. All the source files and included in the src/argumentsdirectory.This directory contains code that's not even related to arguments. I think we have to split them into different modules by adding an __init__.py file.

[src]
- error : # error files
- tests: # for test files
- ext : # other files ,like the update.py files
- core : # all the core stuff

Please let me know your thoughts

You must be logged in to vote
1 reply
@NamamiShanker
Comment options

NamamiShanker Jun 1, 2021
Collaborator Author

I think this will work! Waiting for others to reply.

Comment options

Yes, Let's Start with the test folder and then we can try to optimize and write clean code for it. I think first, we should plan what changes we should do, before implementing it.

You must be logged in to vote
3 replies
@lainq
Comment options

Yeah, we should write some tests. We need to have solid tests. We can also set up a workflow that runs all the tests. What do you guys think 🤔 ??

@NamamiShanker
Comment options

NamamiShanker Jun 1, 2021
Collaborator Author

Yeah! There is an inactive issue regarding tests. I think the main contributors should design the test module. They are the one's most familiar with the project.

@GouravSardana
Comment options

we can go with @pranavbaburaj structure which he suggested above

Comment options

NamamiShanker
Jun 2, 2021
Collaborator Author

So how do we go about doing this? Should we make a new branch and refactor the code with it?

You must be logged in to vote
6 replies
@guptaaastha
Comment options

I agree, refactor in a different branch. My suggestion would be to pick up anyone first (either uitility.py or search.py) and start by sections instead of doing it all together to avoid confusion and add relevant comments wherever necessary 😄

@GouravSardana
Comment options

Pick search first then will move on to utilities then errors

@GouravSardana
Comment options

Just to give you an update- Pranav account got suspended for no reason. He also didn't know the reason. He created a ticket for GitHub support. It takes time around 1-2 days. That's why the thread that was created by Pranav got removed.

cc @anshsrtv @guptaaastha @NamamiShanker @Siddhant-K-code

@lainq
Comment options

Hey, everyone. I got my account back. Thank you @GouravSardana for your help and support :)

@GouravSardana
Comment options

@pranavbaburaj is giving virtual party for his account 🎈🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
💡
Ideas
Labels
refactor Refactor the code
5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.