Support checking the absence of a key with =?
- Dominant language
- Clojure
- Stars
- 60
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
There are some instances where it's useful to assert on the shape of some keys of a map while also asserting that another key is not present.
https://github.com/search?q=repo%3Ametabase%2Fmetabase+%22key+is+not+present.%22&type=code
I'm not sure if it's simply a matter of `def` this or if there's magic missing
https://github.com/metabase/hawk/blob/main/src/mb/hawk/assert_exprs/approximately_equal.clj#L101C68-L101C108
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at src/mb/hawk/assert_exprs/approximately_equal.clj around line 101, where the existing map assertion behavior is referenced. Trace how =? handles map keys and determine what is needed to express that a key is absent while checking other keys. Done means callers can use =? for this absence assertion alongside shape checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100