Skip to content

fix: gp and feat: Commitizen and pre-commit hooks #37

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

Merged
merged 13 commits into from
Jan 8, 2022
Merged

Conversation

im-coder-lg
Copy link
Member

@im-coder-lg im-coder-lg commented Jan 6, 2022

An enhancement to commit writing and fixing Gitpod. I'd like to make a new label for Gitpod for PRs that add extra Gitpod functionality.

NOT READY YET Ready!

@im-coder-lg im-coder-lg added the enhancement New feature or request label Jan 6, 2022
@im-coder-lg im-coder-lg self-assigned this Jan 6, 2022
@im-coder-lg
Copy link
Member Author

I'll mark this ready when ready. A new label for that too?

@sumeshir26
Copy link
Member

Yeah

@im-coder-lg
Copy link
Member Author

im-coder-lg commented Jan 6, 2022

Created that with a green colour. I am testing pre-commit hooks, those are the most important part. It has a formatter named black that formats code. I found it here.
Also, just realized, this was written by a person I know on GitHub.

@im-coder-lg
Copy link
Member Author

Gitpod is slowing down.

@im-coder-lg
Copy link
Member Author

Damn, for 21f4dbf, I almost rage-quitted! Commitizen expected perfection dude! It WORKS!!!
Next, Gitpod.

@im-coder-lg
Copy link
Member Author

It's better for people to use the CLI method to commit.

@im-coder-lg
Copy link
Member Author

That is Commitizen. Works, right?

I'm testing this.

BREAKING CHANGE:
@sumeshir26
Copy link
Member

sumeshir26 commented Jan 6, 2022

Gitpod fails though

@im-coder-lg
Copy link
Member Author

im-coder-lg commented Jan 6, 2022

Yeah I have encountered this. The image isn't updated properly though(still unmerged). I think I might be getting onto an idea of sorts, like maybe I'll try doing what the Gitpod people tell us, install Tk-dev from the APT repos. I will try that and report back. Need some free time.

So that I can start a proper env
@im-coder-lg
Copy link
Member Author

Damn, Gitpod is so hard! Looks like we need a custom Dockerfile, I have asked the Gitpod folks on how to make that.

added nvm code.

This does work
That's a problem since I discovered, init changes for pip persist ONLY in $HOME, not /workspace.
@im-coder-lg
Copy link
Member Author

Done a bunch of fixes.

@im-coder-lg im-coder-lg changed the title Fix(gp) and feat: Commitizen feat: Commitizen Jan 6, 2022
@im-coder-lg
Copy link
Member Author

I'm confused about the Gitpod part, I will fix that soon. For now, everything works perfectly. Maybe soon, I will try using shell scripts for automation. What's your opinion?

@im-coder-lg
Copy link
Member Author

We are getting some help soon! gitpod-io/workspace-images#609 (comment)

@im-coder-lg im-coder-lg added the ready Ready for merge. label Jan 6, 2022
@im-coder-lg im-coder-lg changed the title feat: Commitizen feat: Commitizen and pre-commit hooks Jan 6, 2022
@im-coder-lg
Copy link
Member Author

I added isort. Don't take me wrong and no offense, we do good work but this was how it looked before isort:

# TimerX v0.2 by sumeshir26
# IMPORTS
ver = "0.9"

from time import sleep
from tkinter import  TclError, ttk, Tk, PhotoImage, Frame, StringVar
import tkinter
from tkinter.constants import  LEFT
from playsound import playsound
from threading import  Thread
from platform import system
import os
from utils import *
import webbrowser
"""
# Disabled by default due to module unavailability on Linux
from BlurWindow.blurWindow import GlobalBlur, blur
"""
import darkdetect

from tkinter.messagebox import showinfo

This was how it looked after:

# TimerX v0.2 by sumeshir26
# IMPORTS
ver = "0.9"

import os
import tkinter
import webbrowser
from platform import system
from threading import Thread
from time import sleep
from tkinter import Frame, PhotoImage, StringVar, TclError, Tk, ttk
from tkinter.constants import LEFT

from playsound import playsound

from utils import *

"""
# Disabled by default due to module unavailability on Linux
from BlurWindow.blurWindow import GlobalBlur, blur
"""
from tkinter.messagebox import showinfo

import darkdetect

That seems neat right? Also, I need to stop speed typing since I messed up the commit message lol.

@im-coder-lg
Copy link
Member Author

I like that way it clarified single imports first then the submodules were added. Neatness 100x%. @not-nef from now, we'll follow the Commitizen way of making commits. It's better in a good way.

@not-nef
Copy link
Member

not-nef commented Jan 6, 2022

what

@im-coder-lg
Copy link
Member Author

im-coder-lg commented Jan 6, 2022

what

Shocked? I don't understand. This is an easier way of handling Git and version control. Instead of Adding an image to the blog, you could try feat(blog): add image, which is simpler, right?

uhh, so its just another was of writing commit messages right? is there a guide for that?

@im-coder-lg
Copy link
Member Author

I'll try this for Gitpod:
gitpod-io/workspace-images#609 (comment)

@im-coder-lg
Copy link
Member Author

We are ready for merging! Thanks a lot @axonasif for hosting our image on Docker Hub! If it's costing you, do tell us, we'll try having it on the repo.

@im-coder-lg
Copy link
Member Author

I'll just clean up and we'll be good to go.

@axonasif
Copy link

axonasif commented Jan 7, 2022

We are ready for merging! Thanks a lot @axonasif for hosting our image on Docker Hub!

You're welcome, glad to know it works!

If it's costing you, do tell us, we'll try having it on the repo.

I'm new to using dockerhub, does it really cost the dockerhub repo-owner for pulls by other people?

Copy link
Member

@sumeshir26 sumeshir26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM🎉

Also removed some private PATHs, changed some `init:`s in the Gitpod Config.

Ready for merge _completely_!
@im-coder-lg
Copy link
Member Author

im-coder-lg commented Jan 7, 2022

Also @sumeshir26 please remember to remove private things like your PC path and etc. I have removed one of them from the pyvenv.cfg file and added Windows PATH variables.

@im-coder-lg
Copy link
Member Author

I'm new to using docker hub, does it really cost the docker hub repo-owner for pulls by other people?

idk, but when I was about to host my version of the same Dockerfile, it asked me to pay. Maybe it's for server maintenance.
But, thanks a lot for helping with this!

@im-coder-lg
Copy link
Member Author

@not-nef need your opinion too! What do you think of Commitizen conventional commit schema? They even have other ones, so if you like another one better than this, I can change it later.

@im-coder-lg im-coder-lg changed the title feat: Commitizen and pre-commit hooks fix: gp and feat: Commitizen and pre-commit hooks Jan 7, 2022
@im-coder-lg
Copy link
Member Author

Merge? @not-nef your ideas!

@sumeshir26
Copy link
Member

Merge?

Waiting on @not-nef's review before merging

@im-coder-lg
Copy link
Member Author

I'll merge?

@not-nef
Copy link
Member

not-nef commented Jan 7, 2022

ig

@sumeshir26 sumeshir26 added approved This pull request is ready to merge and removed ready Ready for merge. labels Jan 8, 2022
@sumeshir26 sumeshir26 merged commit ffa02ca into master Jan 8, 2022
@sumeshir26 sumeshir26 deleted the fix-gp-feat-cz branch January 8, 2022 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This pull request is ready to merge enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants