cursorless
cursorless copied to clipboard
start playing with hat tests
for voice discussion. definitely work in progress.
to discuss (notes to self):
- general approach
- allocation determinism
- formatting etc, relation to other draft prs
- performance
- cross-package imports
- better hat representation? (e.g. _ for default, single height for colors, double for both? mixes line meanings, need unambiguous color/shape letters, but better visually??)
- which expansions are in scope?
todo (notes to self):
- remove normalization routines
- work through all todos in code
- rename InMemory to Mock?
- performance
- add other language samples
- try out on other hat experiments (including non-buggy first word experiment)
- don't forget about logging :)
- concise positions, even more concise
update from meeting: this is promising. i will continue to tinker with it.
this is the sort of thing that I could accidentally tinker with forever. there are lots of improvements that can be made and lots of directions to go. but the best possible direction is submitted, where it can be improved incrementally. :)
I know that this cannot go in as it is--it is lacking a fair bit of polish--but I would like to start the review process, because I think it will take several iterations. (btw, this currently includes #1825, because it is ~unusable without it.)
feel free to only do a high level review at this point if you would prefer. over voice would also be okay. up to you.
also, if you have any talon, python or typescript files of a medium-ish length, with no licensing issues, and that doesn't pertain directly to cursorless (so that it doesn't constantly appear when we grep the codebase), I love to add them...
update from meetup:
- [x] we will use fake hat colors and shapes that have really obvious ascii representations. we don't need blue/fox/etc.
- [x] overall ascii representation looking promising. we explored a bunch of alternatives, but didn't find one we liked better than this.
- [x] josh to try to continue to speed up hat allocation so that the tests don't time out.
- [x] josh to hook up update fixture vs test fixture code.
current status
early reviewer input requested
can happen concurrently with my next steps
- [ ] what do we want to do about mocking the text editor? see https://github.com/cursorless-dev/cursorless/pull/1815#discussion_r1302258404
- [ ] are you happy with the .golden and .stats files?
- [ ] would love some sample files in other languages, particularly typescript, python, and a LISP-y language (or something else that is punctuation-heavy). see https://github.com/cursorless-dev/cursorless/pull/1815#issuecomment-1690845546
- [x] are you happy with how this is triggered? (update fixtures to update, tests fixtures during unit tests)
- [x] is there a way to avoid bringing up the extension window during "update fixtures subset" if none of the tests in the subset needed?
- [x] finish reviewing the outstanding hat alloc perf PRs
my next steps
- [ ] figure out the CRLF issue on windows
- [ ] do a code cleanliness and documentation pass
- [ ] incorporate any of the early reviewer input
- [x] merge the outstanding hat alloc perf PRs, pull them in
once all these are done, then we can move on to a regular, full, code-level review.
- would love some sample files in other languages, particularly typescript, python, and a LISP-y language (or something else that is punctuation-heavy). see start playing with hat tests #1815 (comment)
chatgpt? 😄 Happy to add some tho if you prefer
- are you happy with how this is triggered? (update fixtures to update, tests fixtures during unit tests)
yep makes sense
- is there a way to avoid bringing up the extension window during "update fixtures subset" if none of the tests in the subset needed?
not sure if this is what you're after, but we should have a launch config that updates fixtures only for the unit tests. should be trivial to add. and that won't pop up the extension window at all I believe
chatgpt? 😄 Happy to add some tho if you prefer
I'd rather use human written code. I'll grab some from a friend if you don't have some handy.
we should have a launch config that updates fixtures only for the unit tests
done
i have sinned...force pushed. sorry. will switch back to regular review mode now.
marking as draft until #1882 is sorted