B.E.N.J.I. icon indicating copy to clipboard operation
B.E.N.J.I. copied to clipboard

Make code modular

Open the-ethan-hunt opened this issue 7 years ago • 18 comments

This is a discussion to on how to make the code more modular and easy for debugging

the-ethan-hunt avatar Dec 01 '17 16:12 the-ethan-hunt

Where do we start ?

BrianMwangi21 avatar Dec 01 '17 17:12 BrianMwangi21

I was thinking about modularising each functionality that we are going to add.

Yatish04 avatar Dec 01 '17 17:12 Yatish04

I'm not too familiar with modularising. Any tutorials I can quickly use to catch up ? Or can you explain in simple step forms ?

PS: Just asking, is it how the 'play jole' function is performed in another file in the modules folder or ?

I appreciate.

BrianMwangi21 avatar Dec 01 '17 17:12 BrianMwangi21

Convert the big code into small python files with each of them being able to execute the functions it is supposed to be so that we can import those in the main program and use it along with GUI.

Yatish04 avatar Dec 01 '17 17:12 Yatish04

Can you point me to examples ?

BrianMwangi21 avatar Dec 01 '17 17:12 BrianMwangi21

But this needs to be done with both the versions.

the-ethan-hunt avatar Dec 01 '17 17:12 the-ethan-hunt

You mean the Windows and Linux versions ?

BrianMwangi21 avatar Dec 01 '17 17:12 BrianMwangi21

Yes, of course. Before we modulate the code, I suggest we remove the issues plaguing it like Youtube not working on Linux and absence of B.E.N.J.I. for MacOS. Just an opinion. :sweat_smile:

the-ethan-hunt avatar Dec 01 '17 17:12 the-ethan-hunt

Everything else is okay but those two issues ?

BrianMwangi21 avatar Dec 01 '17 17:12 BrianMwangi21

Just an opinion. I would like to know what you all think and then we can proceed. Open-source is a democracy after all :smile:

the-ethan-hunt avatar Dec 01 '17 17:12 the-ethan-hunt

I second you. Once B.E.N.J.I. works on all platforms, we now build up on it

BrianMwangi21 avatar Dec 01 '17 17:12 BrianMwangi21

.
├── demos
│   ├── working-linux.gif
│   └── working-windows.gif
├── features
│   ├── google.py
│   ├── __init__.py
│   ├── news.py
│   └── youtube.py
├── functions
│   ├── __init__.py
│   ├── speak.py
│   └── speechtoText.py
├── gui
│   ├── home.py
│   ├── __init__.py
│   ├── splashscreen.py
│   └── static
│       ├── button.png
│       └── logo.ico
└── main.py

As suggested by @Yatish04 too, we could have the following structure for our code. @the-ethan-hunt yes, we should fix other issues first, and then make a switch. Maybe we could also realise a better structure for our code by then. :-)

kaushal-py avatar Dec 02 '17 01:12 kaushal-py

This is fine I suppose @kb-studios

Yatish04 avatar Dec 02 '17 04:12 Yatish04

Then I think we should solve the other issues and then focus on making it modular. I liked what @kb-studios has done. We could later go by that

the-ethan-hunt avatar Dec 02 '17 05:12 the-ethan-hunt

@the-ethan-hunt Since this issue is still valid, I would rather emove the KWoC tag from it.

sara-02 avatar Jul 18 '18 10:07 sara-02

@the-ethan-hunt, I am working under GSSoC 19. Can I start working with this issue, if its ok as of now? Also, I will first breakdown Linux version, then go for windows.

HemabhKamboj avatar Feb 28 '19 17:02 HemabhKamboj

@the-ethan-hunt I'll go for working out this issue in Windows.

srishilesh avatar Mar 04 '19 08:03 srishilesh

@the-ethan-hunt I'll go for working out this issue in Windows.

Please add GSSoC 19 label

srishilesh avatar Mar 20 '19 15:03 srishilesh