mkaz / termgraph

a python command-line tool which draws basic graphs in the terminal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Object-oriented / code restructure

nnist opened this issue · comments

At the moment, termgraph uses many functions inside one script to achieve its goal. It works well, but it might be better to use classes and a more object-oriented approach. This would make it more organized, easier to build upon and easier to re-use in other projects.

The problem is that it will change a lot of the existing code structure, meaning it will break other projects which use termgraph unless they adopt these changes.

The upside is that it will make future development easier, and it will be easier for others to use this library in their own project. For example, it would make #27 easy to fix.

However, I understand if this project has progressed too far for this to be done, and restructuring all the code might not be worth the effort. But I am willing to do this myself, I have enough time available and this would be a good learning opportunity.

I definitely think it could use a rewrite and cleanup, though it might take a bit of work which I probably don't have time to do.

Understandable. I know that your license allows it, but is it okay with you if I make a fork and give this a try? The code could be merged if you ever find the time to do so. It is quite some work but I would really like to do this.

@nnist of course, I would welcome the change.

The start of restructure was addressed in #75

It still requires a bit more cleanup, but the structure is in place so closing this base issue and any additional issues can be opened around specific areas.