Skip to content

Commit dc57256

Browse files
authored
feat: add typos to pre-commit and GitHub action (tensorchord#1493)
* feat: add typos to pre-commit and GitHub action Signed-off-by: Zhizhen He <[email protected]> * fix: fix existing typos Signed-off-by: Zhizhen He <[email protected]> * chore: add reference Signed-off-by: Zhizhen He <[email protected]> --------- Signed-off-by: Zhizhen He <[email protected]>
1 parent 6bf7d5b commit dc57256

File tree

14 files changed

+35
-16
lines changed

14 files changed

+35
-16
lines changed

.github/workflows/CI.yml

+10
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ concurrency:
2121
cancel-in-progress: true
2222

2323
jobs:
24+
typos-check:
25+
name: Spell Check with Typos
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout Actions Repository
29+
uses: actions/checkout@v3
30+
- name: Check spelling with custom config file
31+
uses: crate-ci/[email protected]
32+
with:
33+
config: ./typos.toml
2434
lint:
2535
name: lint
2636
runs-on: ubuntu-latest

.pre-commit-config.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ repos:
44
hooks:
55
- id: golangci-lint
66
args: [--config=.golangci.yml, --timeout=3m]
7+
- repo: https://github.com/crate-ci/typos
8+
rev: v1.13.10
9+
hooks:
10+
- id: typos

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<a href="https://twitter.com/TensorChord"><img src="https://img.shields.io/twitter/follow/tensorchord?style=social" alt="trackgit-views" /></a>
1111
<a href="https://pypi.org/project/envd"><img src="https://img.shields.io/pypi/pyversions/envd" alt="Python Version" /></a>
1212
<a href="https://github.com/tensorchord/envd#contributors-"><img alt="all-contributors" src="https://img.shields.io/github/all-contributors/tensorchord/envd/main"></a>
13-
<a href="https://pypi.org/project/envd/"><img alt="envd package donwloads" src="https://static.pepy.tech/personalized-badge/envd?period=month&units=international_system&left_color=grey&right_color=brightgreen&left_text=downloads/month"</a>
13+
<a href="https://pypi.org/project/envd/"><img alt="envd package downloads" src="https://static.pepy.tech/personalized-badge/envd?period=month&units=international_system&left_color=grey&right_color=brightgreen&left_text=downloads/month"</a>
1414
<a href="https://github.com/tensorchord/envd/actions/workflows/CI.yml"><img alt="continuous integration" src="https://github.com/tensorchord/envd/actions/workflows/CI.yml/badge.svg"></a>
1515
<a href='https://coveralls.io/github/tensorchord/envd?branch=main'><img src='https://coveralls.io/repos/github/tensorchord/envd/badge.svg?branch=main' alt='Coverage Status' /></a>
1616
</p>

docs/images/after.svg

+1-1
Loading

docs/images/before.svg

+1-1
Loading

docs/proposals/20220826-image-runtime-redistributed-metadata.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ Authors:
44

55
## Summary
66

7-
The `envd` would add (runing graph metadata)[https://github.com/tensorchord/envd/blob/630ada172bdf876c3b749329fdbe284c108051f2/pkg/lang/ir/types.go#L70] would be encoded into a ASCII string and added to be image(OCI Spec) as a config.
7+
The `envd` would add (running graph metadata)[https://github.com/tensorchord/envd/blob/630ada172bdf876c3b749329fdbe284c108051f2/pkg/lang/ir/types.go#L70] would be encoded into a ASCII string and added to be image(OCI Spec) as a config.
88

99
we named the above mentioned encoded config `Envd Runtime Graph Label`
1010

1111
## Motivation
1212

13-
This proposal is part of effort to define what the artifact `envd` delivery and decoupling the phases of build and runing. It will be friendly for running a envd environment even at the absence of `build.env`.
13+
This proposal is part of effort to define what the artifact `envd` delivery and decoupling the phases of build and running. It will be friendly for running a envd environment even at the absence of `build.env`.
1414

15-
the concept of `running context` is a also needed as addition of `build contxt` for example:
15+
the concept of `running context` is a also needed as addition of `build context` for example:
1616

1717
- An engineer build a easy-to-use env for his/her interns for the quick use of company tools.
1818
- Kubernetes remote runtime support in the future.
@@ -26,12 +26,12 @@ the concept of `running context` is a also needed as addition of `build contxt`
2626
## Implementations
2727

2828
There are two parts of runtime configuration that can be used in envd.
29-
- OCI sepecifications specific:
29+
- OCI specifications specific:
3030
- ExposedPort
3131
- Entrypoint
3232
- Env
3333
- Cmd
34-
- Custome Labels
34+
- Custom Labels
3535

3636
For some parts of runtime configuration, we could use the OCI part such as environment variables. We still need to deal with extra parts such as port bindings which not covered by the OCI spec.
3737

@@ -51,4 +51,4 @@ we use the following labels:
5151

5252
- ai.tensorchord.envd.runtimeGraph.version
5353
- ai.tensorchord.envd.runtimeGraph.Daemon
54-
- ai.tensorchord.envd.runtimeGraph.Expose
54+
- ai.tensorchord.envd.runtimeGraph.Expose

envd/api/v1/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def repo(url: str, description: str):
155155

156156

157157
def owner(uid: int, gid: int):
158-
"""Configure uid:gid as the environmen owner.
158+
"""Configure uid:gid as the environment owner.
159159
This can also be achieved by using flag `envd --owner uid:gid build` or environment
160160
variable `ENVD_BUILD_OWNER=uid:gid envd build`
161161

examples/stable-diffusion/build.envd

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def build():
88
"diffusers",
99
]
1010
)
11-
# if you need run in cuda enviroment, you can add this line below, change cuda and cudnn version to your owner
11+
# if you need run in cuda environment, you can add this line below, change cuda and cudnn version to your owner
1212
install.cuda(version="11.2.2", cudnn="8")
1313
runtime.mount(
1414
host_path="~/.cache/huggingface", envd_path="/home/envd/.cache/huggingface"

pkg/driver/docker/docker_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
)
2323

2424
var _ = Describe("docker", func() {
25-
When("given the a lowcase tag", func() {
25+
When("given the a lowercase tag", func() {
2626
It("should return the tag identically", func() {
2727
tag := "test:test"
2828
newTag, err := NormalizeName(tag)

pkg/lang/frontend/starlark/v0/interpreter.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func (s *generalInterpreter) loadGitModule(thread *starlark.Thread, path string)
153153
}
154154

155155
func (s generalInterpreter) ExecFile(filename string, funcname string) (interface{}, error) {
156-
logrus.WithField("filename", filename).Debug("interprete the file")
156+
logrus.WithField("filename", filename).Debug("interpret the file")
157157
thread := s.NewThread(filename)
158158
globals, err := s.exec(thread, filename)
159159
if err != nil {

pkg/lang/frontend/starlark/v1/interpreter.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func (s *generalInterpreter) loadGitModule(thread *starlark.Thread, path string)
153153
}
154154

155155
func (s generalInterpreter) ExecFile(filename string, funcname string) (interface{}, error) {
156-
logrus.WithField("filename", filename).Debug("interprete the file")
156+
logrus.WithField("filename", filename).Debug("interpret the file")
157157
thread := s.NewThread(filename)
158158
globals, err := s.exec(thread, filename)
159159
if err != nil {

pkg/lang/ir/v0/supervisor.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (g generalGraph) installHorust(root llb.State) llb.State {
6060
File(llb.Mkdir(types.HorustLogDir, 0777, llb.WithParents(true)),
6161
llb.WithCustomNamef("[internal] mkdir for horust log: %s", types.HorustLogDir)).
6262
Run(llb.Shlexf(`sudo chmod 777 %s`, types.HorustLogDir),
63-
llb.WithCustomName("[internal] change dirctory permission for logging"))
63+
llb.WithCustomName("[internal] change directory permission for logging"))
6464

6565
return horust.Root()
6666
}

pkg/lang/ir/v1/supervisor.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (g generalGraph) installHorust(root llb.State) llb.State {
6060
File(llb.Mkdir(types.HorustLogDir, 0777, llb.WithParents(true)),
6161
llb.WithCustomNamef("[internal] mkdir for horust log: %s", types.HorustLogDir)).
6262
Run(llb.Shlexf(`sudo chmod 777 %s`, types.HorustLogDir),
63-
llb.WithCustomName("[internal] change dirctory permission for logging"))
63+
llb.WithCustomName("[internal] change directory permission for logging"))
6464

6565
return horust.Root()
6666
}

typos.toml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# See https://github.com/crate-ci/typos/blob/master/docs/reference.md to configure typos
2+
[files]
3+
extend-exclude = ["CHANGELOG.md"]
4+
[default.extend-words]
5+
iterm = "iterm"

0 commit comments

Comments
 (0)