-
Notifications
You must be signed in to change notification settings - Fork 1
Move the core logic from Run.log()
to AttributeStore
#96
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
Conversation
0c26195
to
70fa6be
Compare
""" | ||
|
||
path = path.strip() | ||
if path in ("", "/"): | ||
if path.strip() in ("", "/"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, since you're not assigning the stripped path back to path, if the path has some whitespace, it will stay and break the 2 checks following immediately below.
E.g.
previously " /path/to/sth/ " -> strip() -> "/path/to/sth/" -> path[1:] -> "path/to/sth/" -> error because it ends with /
now " /path/to/sth/ " -> strip() is not saved -> " /path/to/sth/ " -> path[1:] ignored bc path starts with " " -> " /path/to/sth/ " -> no error because it ends with " "...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add tests
src/neptune_scale/api/attribute.py
Outdated
raise ValueError(f"Invalid path: `{path}`. Path components must not be empty.") | ||
|
||
if path[0].lstrip() != path[0] or path[-1].rstrip() != path[-1]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, path[0] and path[-1] are substrings of size 0 or 1, so there's no difference between lstrip() and rstrip()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think I missed a split()
or two
Is it alright that such a major replacement has no changes in tests/? Does not incite confidence.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please resolve conflicts
`AttributeStore.log()` is now responsible for feeding data to the `OperationsQueue`
70fa6be
to
3406313
Compare
0bf6895
to
f933b08
Compare
AttributeStore.log()
is now responsible for feeding data to theOperationsQueue
.Some additional cleanups are there as well.