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

Attempt a rewrite of GoogleCL #274

Open
vinitkumar opened this issue Feb 7, 2019 · 18 comments
Open

Attempt a rewrite of GoogleCL #274

vinitkumar opened this issue Feb 7, 2019 · 18 comments
Assignees
Labels

Comments

@vinitkumar
Copy link
Owner

vinitkumar commented Feb 7, 2019

This project has been broken for quite some time now. But it has an active group of users, and it makes sense for it to be revived again.

Since we will rewrite it from scratch, we do not have the burden of legacy and can be written in a clear core.

Following are the core design goals:

  • Support Python(3.7, 3.8 (live now)) by default and use the newer enhancements to the language for the advantage.
  • Use type-hints to minimize errors.
  • Use black for code formatting.
  • Use GitHub actions for CI and publishing.
  • Integrate read the docs for the project so that documentation is done automatically.
  • Maybe consider using pytest.
  • Looks for good ways to re-distribute to the different OSes (port, homebrew) once it is stable enough.
@gevrey
Copy link

gevrey commented Feb 7, 2019

These are very good news, thanks @vinitkumar !

@vinitkumar
Copy link
Owner Author

vinitkumar commented Feb 7, 2019

Some feature requests:

@vinitkumar
Copy link
Owner Author

Relevant documentation:

@serine
Copy link

serine commented Feb 14, 2019

@vinitkumar it wasn't clear, re-write will leave in this repository or new repository? makes sense to start a new repo right?

@vinitkumar
Copy link
Owner Author

@serine Sorry for the confusion. My intention is to do the rewrite in this same repository. As a matter of fact, I deleted all old code and create a new branch rewrite/python3. All I want to create a stable alpha level project in that, promote it to master and then create feature branches to add functionality. The biggest hurdle in fixing the old code was the massive code debt and the architecture which was hard to fix since the underlying gdata library broke. I hope this answers your query. Also, create a new repo might not have any extra benefits. This repo already have quite some starts and people know the link. Making a new repo will break the link. I have also closed all old tickets so it is almost as good as a new repository.

@serine
Copy link

serine commented Feb 14, 2019

cool, it's just the way git works it saves every file/every change. by deleting everything and starting from scratch in the same repo, you'll have to forever carry that "old baggage" with you. I guess it's not a big deal.

so how do I jump in? can you give me some direction were to start poking about?

Cheers

@vinitkumar
Copy link
Owner Author

vinitkumar commented Feb 14, 2019

@serine You are not wrong but I want the history to be there in this branch, so that I can go back in the past and look at how some things were implemented. Also, the git history is not that big, so it won't really impact the cloning time etc.

There is a lot of work to be done and it would be really awesome if you could help out with this. The issue description has the high level roadmap. If you are familiar with some of the new stuff I want to introduce such as (type-hints, pytest) it would be awesome and if not, you can learn them.

Also, I can add you as a collaborator to the project and you can contribute to any aspect of the project (like adding docs, adding code-of-conduct, contributing doc) or any feature. All types of contributions are desired and are welcome. I am going to invest my personal time to get this project alive again and would be pretty great to do be enthusiastic programmers. 🚀

Update : Just sent you an invite to be the collaborator. Feel free to accept it if you are interested.

@vinitkumar
Copy link
Owner Author

Ping @serine 📩

@serine
Copy link

serine commented Feb 15, 2019

@vinitkumar great. I'm pretty keen to accept the invite. I just want to clarify couple of things.

I'll be pretty add-hoc in the amount of work I'll be able to add, just being up front.

I think you should put those roadmap/goals into readme so they don't get lost or something. I can PR that :)

I haven't used black or type hints at all. I think I've seen type hints in someone else code recently and it looked like a good idea. However I'm a little bit unsure about black. I'd have to read a bit more into it, but I have funny feeling about my code being edited. I guess as long at it makes it more readable I'm ok with that. I just don't want black to "minimise" everything into one line type of code. I intentionally break things into multiple lines (one item per line type thing) so that it is easier for me/others to read.

I can't remember now why I started to watch this repo, but one thing that I definitely need is an easy way to work with google docs. Specifically ability to write text files in vim for example and easily convert them into google docs and push them into the google drive.

Because this is a large project I have no idea where to start, can we lay out some milestones? like

  • mount/fuse google drive?

In fact I totally forgotten what the project was about? what are we doing here? all things google things?

Cheers

@vinitkumar
Copy link
Owner Author

vinitkumar commented Feb 15, 2019

@serine I will try to answer the points you raised:

great. I'm pretty keen to accept the invite. I just want to clarify couple of things.

I am glad.

I'll be pretty add-hoc in the amount of work I'll be able to add, just being up front.

I do not have any issues with that. Since, even I do not have a lot of dedicated time at the moment and I want to spend some 2-3 solid weeks in it and find a good balance.

I think you should put those roadmap/goals into readme so they don't get lost or something. I can PR that :)

This is definitely I want to do but at this moment some more research is needed. Would love to accept an PR for that.

Bit of history, googlecl built on top of the gdata which provided an easy and nice interface with google services. It used to work fine, until a couple of years ago, the Oath broke and the gdata too. I tried fixing the oath, it partially works but not everything works out. I was very busy to fix all the bugs and it was pretty time consuming too.

Now, since Python2 is being deprecated, it gives me a good excuse to just port it to Python3

I haven't used black or type hints at all. I think I've seen type hints in someone else code recently and it looked like a good idea. However I'm a little bit unsure about black. I'd have to read a bit more into it, but I have funny feeling about my code being edited. I guess as long at it makes it more readable I'm ok with that. I just don't want black to "minimise" everything into one line type of code. I intentionally break things into multiple lines (one item per line type thing) so that it is easier for me/others to read.

I can understand the concerns but give it sometime, it will grow on you and you won't have to think about the code formatting anymore. Just write correct code and let black format it. Good thing is whoever writes the code, the code would look the same.

Type-hints helps a lot in writing correct code and good autocomplete support with editors and IDEs.
It also has no impact as runtime, so there is no penalty here. Since, it is a large codebase. I would like to do things correctly and use tools that help us write good and correct code and let us focus on writing the features.

Because this is a large project I have no idea where to start, can we lay out some milestones? like

  • mount/fuse google drive?

In fact I totally forgotten what the project was about? what are we doing here? all things google things?

And yes, we want to create a nice and programmable interface to google services with python so that people can access and do stuff with google over command-line. Pretty much, how it used to work before but this time even better and with some more features/bugfixes.

I am going to get the milestones created and issues as well within a week. My fulltime work do not allow me to spend a lot of time but I am trying to improve on that front.

I hope this answers a lot of questions. If you have any more, feel free to msg to this thread or get in touch with me over twitter. My twitter is https://twitter.com/vinitkme

@vinitkumar
Copy link
Owner Author

vinitkumar commented Aug 27, 2019

Update

Google Python Oauth2Client is deprecated now. https://github.com/googleapis/oauth2client. Recommended switch to https://google-auth.readthedocs.io/en/latest/ now.

@jbriales
Copy link

jbriales commented Oct 7, 2019

Hi @vinitkumar, I just found out about this tool and I think it would incredibly useful for me (hate the internal editors for Google Drive, basically, so looking for a workaround).
I checked your roadmap and it looks great. I like the CI tools you intend to enable.
What's the current status of the refactor though? How long or how many hours of work do you estimate until we have a minimally working version of this again?
In fact, is there any version of the repo right now which is usable, or is it broken for good? :(

@jbriales
Copy link

jbriales commented Oct 7, 2019

I check the current status of the repo and I see you removed all previous files.
I wonder though how much work there would be to bring up the previous state into working?
What's there that is possible to reuse and what need to be refactored into a new library, and which?
E.g. which authentication library do you intend to use? What's the best way to interact with Google API for this right now (any relevant doc?)?

@vinitkumar
Copy link
Owner Author

@jbriales Thanks for taking the time for looking into this. I will try to answer your questions:

  • The old repo branch is still there. It's in the old-master branch
  • The old code is not salvageable at this point. Google has done breaking changes with the original gdata-apis and recently Google Oauth2Client for python is deprecated as well. (Attempt a rewrite of GoogleCL #274 (comment))

To answer your question, if I can find some 20-25 hrs, I can get auth and a couple of services up and running. That being said (having a full-time job and toddler doesn't provide me with a lot of time). I won't promise anything at this point but I am definitely going to ship an MVP of this very soon. Also, if possible, please help out with this project in any form possible(with pull requests, adding docs, logo design). You could also sponsor this project in an open collective(https://opencollective.com/vinit-kumar). I hope this answers your questions?

@jbriales
Copy link

Thanks @vinitkumar, I sure understand time limitations! Your work is always welcome for sure :)
Yes that answers my main questions (and concerns) that Google had broken the core APIs there for sure...

@vinitkumar
Copy link
Owner Author

vinitkumar commented Jan 28, 2020

@vinitkumar
Copy link
Owner Author

vinitkumar commented Sep 11, 2021

Alright folks! My GitHub sponsors profile is live. If I get a decent sponsorship in it, it would help justify giving more time and attention to this project and get it up and running soon. If are you interested, here is the link. https://github.com/sponsors/vinitkumar/

This is of course entirely voluntary, and I just wanted to put it out here so that you are aware of a way to help to sponsor the development of this project.

@divramod
Copy link

has anything been done in this direction?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants