Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
e1ae9aa0
Commit
e1ae9aa0
authored
Mar 05, 2025
by
Ryan McCormick
Committed by
GitHub
Mar 05, 2025
Browse files
refactor: Simplify codespell configuration, allow contractions, add custom dictionary (#28)
parent
e159e53f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
17 additions
and
18 deletions
+17
-18
.github/workflows/copyright-check.ps1
.github/workflows/copyright-check.ps1
+1
-1
.pre-commit-config.yaml
.pre-commit-config.yaml
+1
-2
codespell.txt
codespell.txt
+2
-0
lib/llm/src/backend.rs
lib/llm/src/backend.rs
+1
-1
lib/llm/src/preprocessor/prompt/template/tokcfg.rs
lib/llm/src/preprocessor/prompt/template/tokcfg.rs
+2
-2
lib/runtime/src/lib.rs
lib/runtime/src/lib.rs
+1
-1
lib/runtime/src/pipeline/network/ingress/push_handler.rs
lib/runtime/src/pipeline/network/ingress/push_handler.rs
+1
-1
lib/runtime/src/traits.rs
lib/runtime/src/traits.rs
+1
-1
pyproject.toml
pyproject.toml
+7
-9
No files found.
.github/workflows/copyright-check.ps1
View file @
e1ae9aa0
...
...
@@ -120,7 +120,7 @@ $global:copyright_results = @{
# === end common.ps1 extensions ===
$ignored_files
= @('.clang-format', '.gitattributes', '.gitignore', '.gitkeep', '.patch', 'Cargo.lock', 'LICENSE', 'uv.lock', 'rust-toolchain.toml')
$ignored_files
= @('.clang-format', '.gitattributes', '.gitignore', '.gitkeep', '.patch', 'Cargo.lock', 'LICENSE', 'uv.lock', 'rust-toolchain.toml'
, 'codespell.txt'
)
write-debug "
<
copyright-check
>
ignored_files
=
[
'$($ignored_files -join "'
,
'")'
]
.
"
$ignored_paths
= @('.github', '.mypy_cache', '.pytest_cache', 'lib/llm/tests/data/sample-models')
write-debug "
<
copyright-check
>
ignored_paths
=
[
'$($ignored_paths -join "'
,
'")'
]
.
"
...
...
.pre-commit-config.yaml
View file @
e1ae9aa0
...
...
@@ -41,9 +41,8 @@ repos:
rev
:
v2.2.4
hooks
:
-
id
:
codespell
# Use pyproject.toml for codespell configuration
additional_dependencies
:
[
tomli
]
args
:
[
"
--toml"
,
"
pyproject.toml"
]
exclude
:
(?x)^(.*stemmer.*|.*stop_words.*|^CHANGELOG.md$|.*lib/llm/tests/data.*)
# More details about these pre-commit hooks here:
# https://pre-commit.com/hooks.html
...
...
codespell.txt
0 → 100644
View file @
e1ae9aa0
dynamo->dynemo
dynmo->dynemo
lib/llm/src/backend.rs
View file @
e1ae9aa0
...
...
@@ -435,7 +435,7 @@ impl Decoder {
// return only new bytes after pre_append .. offset+seq.len()
// example: seq = "ox", token = "boxes", return "b"
// note: this changes when we start jailing tokens for partial matches
// on the suffix of t
e
h jail with prefixes of the stop sequences
// on the suffix of th
e
jail with prefixes of the stop sequences
//
// we might have returned a partial match, if so, then offset < pre_append
// in that case, we return the empty string
...
...
lib/llm/src/preprocessor/prompt/template/tokcfg.rs
View file @
e1ae9aa0
...
...
@@ -129,8 +129,8 @@ pub fn tojson(value: Value, kwargs: Kwargs) -> Result<Value, Error> {
let
mut
buf
=
Vec
::
new
();
let
repeat
=
b
" "
.repeat
(
indent
);
let
formatter
=
serde_json
::
ser
::
PrettyFormatter
::
with_indent
(
&
repeat
);
let
mut
ser
=
serde_json
::
Serializer
::
with_formatter
(
&
mut
buf
,
formatter
);
value
.serialize
(
&
mut
ser
)
.unwrap
();
let
mut
ser
ializer
=
serde_json
::
Serializer
::
with_formatter
(
&
mut
buf
,
formatter
);
value
.serialize
(
&
mut
ser
ializer
)
.unwrap
();
String
::
from_utf8
(
buf
)
.map_err
(|
err
|
{
Error
::
new
(
ErrorKind
::
BadSerialization
,
"cannot serialize to JSON"
)
.with_source
(
err
)
})
...
...
lib/runtime/src/lib.rs
View file @
e1ae9aa0
...
...
@@ -79,7 +79,7 @@ pub struct DistributedRuntime {
// local registry for components
// the registry allows us to use share runtime resources across instances of the same component object.
// take fo example two instances of a client to the same remote component. The registry allows us to use
// take fo
r
example two instances of a client to the same remote component. The registry allows us to use
// a single endpoint watcher for both clients, this keeps the number background tasking watching specific
// paths in etcd to a minimum.
component_registry
:
component
::
Registry
,
...
...
lib/runtime/src/pipeline/network/ingress/push_handler.rs
View file @
e1ae9aa0
...
...
@@ -81,7 +81,7 @@ where
.map_err
(
PipelineError
::
GenerateError
);
// the prolouge is sent to the client to indicate that the stream is ready to receive data
// or if t
e
h generate call failed, the error is sent to the client
// or if th
e
generate call failed, the error is sent to the client
let
mut
stream
=
match
stream
{
Ok
(
stream
)
=>
{
tracing
::
trace!
(
"Successfully generated response stream; sending prologue"
);
...
...
lib/runtime/src/traits.rs
View file @
e1ae9aa0
...
...
@@ -16,7 +16,7 @@
pub
mod
events
;
use
super
::{
DistributedRuntime
,
Runtime
};
/// A trait for objects t
a
ht proivde access to the [Runtime]
/// A trait for objects th
a
t proivde access to the [Runtime]
pub
trait
RuntimeProvider
{
fn
rt
(
&
self
)
->
&
Runtime
;
}
...
...
pyproject.toml
View file @
e1ae9aa0
...
...
@@ -50,17 +50,15 @@ build-backend = "maturin"
# this is only to allow you to run codespell interactively
# this also overrides the grpc_generated folder, since it is generated
# TODO add skip files for generated code
# skip = "./.git,./.github,./src/grpc_generated"
skip
=
"./.git,./.github,./lib/llm/tests/data"
# ignore short words, and typename parameters like OffsetT
ignore-regex
=
"
\\
b(.{1,4}|[A-Z]
\\
w*T)
\\
b"
# ignore allowed words
# ignoring atleast to avoid testing::AtLeast from getting flagged
ignore-words-list
=
"atleast,afterall"
# Ignore data files and auto-generated files
skip
=
"./.git,./.github,./lib/llm/tests/data,*.lock,*.sum"
# ignore allowed words used in code
ignore-words-list
=
"afterall,ser,ende"
# use the 'clear' dictionary for unambiguous spelling mistakes
builtin
=
"clear"
# use custom dictionary in addition to the built-in one
dictionary
=
"./codespell.txt"
# disable warnings about binary files and wrong encoding
quiet-level
=
3
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment