Skip to content

Commit ffa02ca

Browse files
authored
fix: Gitpod & Pre-Commit Hooks (#37)
* feat: Commitizen and pre-commit * feat: Added CZ and Pre Commit config files * test(gp): Added new Dockerfile and added the noVNC tools Test needed. * refactor(gp): Change Dockerfile path I'm testing this. BREAKING CHANGE: * chore: Update Gitpod Config So that I can start a proper env * perf(gp): Use nvm-14 for docs added nvm code. This does work * refactor(gp): Change pip from init to command That's a problem since I discovered, init changes for pip persist ONLY in $HOME, not /workspace. * refactor(gp): Removing the .gitpod folder That's where we'll be hosting our scripts soon. * feat(precommits): isort to sort pur imports styling * feat: @axonasif's customised image for us! Thanks @axonasif! * style: Clean up Also removed some private PATHs, changed some `init:`s in the Gitpod Config. Ready for merge _completely_! * style: Final Commit * refactor: Final PLEASEEEEE!
1 parent 49a5ba9 commit ffa02ca

6 files changed

+42
-5
lines changed

.gitpod.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
image:
2-
file: .gitpod.Dockerfile
1+
# image:
2+
# file: .gitpod.Dockerfile
3+
image: axonasif/gitpod-workspace-images:tkinter_vnc_full
34

45
tasks:
56
- name: TimerX
@@ -8,9 +9,13 @@ tasks:
89
# PS: App doesn't work here since "_tkinter" is unavailable
910

1011
- name: Website
11-
before: cd docs
12+
before: cd docs && nvm install 14
1213
init: yarn install
1314
command: yarn start
15+
16+
- name: Initialize `cz` and `pre-commit`
17+
init: cd /workspace/TimerX
18+
command: pip install -r requirements-dev.txt && pre-commit install && pre-commit run
1419

1520
ports:
1621
- port: 3000

.isort.cfg

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[settings]
2+
known_third_party = cx_Freeze,darkdetect,playsound

.pre-commit-config.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
repos:
2+
- hooks:
3+
- id: commitizen
4+
stages:
5+
- commit-msg
6+
repo: https://github.com/commitizen-tools/commitizen
7+
rev: v2.20.3
8+
9+
- repo: https://github.com/ambv/black
10+
rev: 21.12b0
11+
hooks:
12+
- id: black
13+
language_version: python3.8
14+
- repo: https://github.com/asottile/seed-isort-config
15+
rev: v2.2.0
16+
hooks:
17+
- id: seed-isort-config
18+
- repo: https://github.com/pre-commit/mirrors-isort
19+
rev: v5.4.2
20+
hooks:
21+
- id: isort
22+

pyproject.toml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[tool]
2+
[tool.commitizen]
3+
name = "cz_conventional_commits"
4+
version = "0.9"
5+
tag_format = "v$version"

pyvenv.cfg

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
home = C:\Users\suchi\AppData\Local\Programs\Python\Python310
1+
# We recommend users to create a custom environment variable for Python's path and version
2+
home = %PYTHON_PATH%
23
include-system-site-packages = false
3-
version = 3.10.0
4+
version = %PYTHON_VERSION%

requirements-dev.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
commitizen
2+
pre-commit

0 commit comments

Comments
 (0)