1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 22:31:36 +03:00
Commit Graph

11110 Commits

Author SHA1 Message Date
Rob Rix
6bcc0322f7 Skip out-of-bounds values of k. 2017-03-22 16:40:13 -04:00
Rob Rix
1b4e47ca2b Skip diagonals < -m. 2017-03-22 16:21:36 -04:00
Rob Rix
03f1854c7d Skip diagonals > n. 2017-03-22 16:19:06 -04:00
Rob Rix
aa4aa4438f Bounds-check insertions/deletions. 2017-03-22 16:18:49 -04:00
Rob Rix
bd766c70d6 Simplify how we insert/delete elements. 2017-03-22 15:55:22 -04:00
Rob Rix
a520062e37 We build up the edit script backwards, so reverse it. 2017-03-22 15:40:52 -04:00
Rob Rix
210ac2b0b0 Test that the edit distance is respected. 2017-03-22 15:38:57 -04:00
Rob Rix
d5bd9537dc Search up to m + n. 2017-03-22 15:31:17 -04:00
Rob Rix
de67e0491e Allocate exactly m + n + 1 state slots. 2017-03-22 15:27:18 -04:00
Rob Rix
27b0b28954 🔥 the reverse path & control flow. 2017-03-22 15:25:50 -04:00
Rick Winfrey
5ddc4f7074 Manually specify JSON structure (to avoid inclusion of tag) 2017-03-21 14:51:23 -07:00
Rick Winfrey
e5e2f948bd Restructure reader tests and make tests more readable 2017-03-21 14:49:24 -07:00
Rick Winfrey
9cf176a37d GitmonClient spec should not run in parallel 2017-03-21 14:48:47 -07:00
Rob Rix
fdc2f551c4 Offset the y coordinates of reverse endpoints. 2017-03-21 15:18:01 -04:00
Rick Winfrey
4207e5f901 Rework the way we read a userID or repoID from the environment
- TIL : mkRegexWithOpts documentation is misleading. The first boolean
option is described as enforcing beginning of line (`^`) and end of
line (`$`) matching, along with not matching newline characters with
`.`. From my testing, I discovered this is not true, and in order to
enforce that regex behavior, I needed to explicitly add `^…$` to my
regex. Because the `mkRegexWithOpts` function was no longer doing what
I wanted, I opted for the simpler `mkRegex` function.

- readInt now returns a `Maybe Int` and expects a single `Just [s]`
match  supplied to attempt reading. This function is not general
purpose enough to be safe to use elsewhere, but is safe to use within
the context of `readIntFromEnv` because of the way the regex enforces
matches.
2017-03-21 10:39:14 -07:00
Rick Winfrey
773e808bdb Add invalid prefix with valid integer value test 2017-03-21 10:35:22 -07:00
Rick Winfrey
3e9d7f26bb Add valid prefix and mixed value with valid integer id followed by string 2017-03-21 10:35:03 -07:00
Rick Winfrey
aa50b85c24 Add valid prefix and mixed value with string before a valid integer id 2017-03-21 10:34:33 -07:00
Rick Winfrey
c2894e8a6d Add valid prefix, invalid string value test for user_id and repo_id
— Unfortunately, there are race conditions causing failures when
setting and reading environment variables in individual HSpec tests.
Despite removing `parallel` from the way these tests are run, I
continued to see races causing intermittent failures. This is an
unfortunate hack to combine invalid data tests within a single test
that enforces procedural order of setting and reading environment
variables without racing.
2017-03-21 10:33:37 -07:00
Rick Winfrey
4e653a1c9e 📝 purpose of sending "continue" to socket server 2017-03-21 10:31:14 -07:00
Rob Rix
68a3d5fe16 Extract the index function to the top level. 2017-03-21 12:02:53 -04:00
Rick Winfrey
7d48f6b8ad Convert to nano secs once 2017-03-20 18:13:11 -07:00
Rick Winfrey
c902c7f393 Send userID and repoID with schedule Gitmon request 2017-03-20 18:12:59 -07:00
Rick Winfrey
b28b8faa05 Add readIntFromEnv function
- Allows us to read the Integer value for user_id and repo_id set in
the env when they are prefixed with `uint:`
2017-03-20 18:12:13 -07:00
Rick Winfrey
8737cd0fcc Add repoID and userID to ProcessUpdateData 2017-03-20 18:10:22 -07:00
Rick Winfrey
d737ca4018 Expect userID and repoID to be sent to Gitmon 2017-03-20 18:09:59 -07:00
Rick Winfrey
16555c54b3 Merge branch 'master' into gitmon-support 2017-03-20 17:03:48 -07:00
Rob Rix
d96931157f Reformat an if statement. 2017-03-20 13:04:06 -04:00
Rob Rix
bbb95ff030 Add an explicit step for the overlaps check. 2017-03-20 12:46:45 -04:00
Rob Rix
6e0104dbd0 Throw an exception explicitly when failing to find the middle snake. 2017-03-20 11:57:43 -04:00
Rob Rix
10ef21b7c8 Select the correct diagonal in the opposing edit graph. 2017-03-20 11:48:49 -04:00
Rob Rix
54bd6a2a4c The reverse edit graph is centred around k = 0.
This means that we will need to translate between the different diagonal coordinates when looking for overlap, but we won‘t need to adjust the boundaries checked when finding the furthest endpoint along some diagonal k.
2017-03-20 11:45:07 -04:00
Rob Rix
2556e0f1e1 Test that comparisons of the empty list against a list returns all values in That. 2017-03-20 11:32:03 -04:00
Rob Rix
2f86a8d374 Test that comparisons of a list against the empty list returns all values in This. 2017-03-20 11:31:06 -04:00
Rob Rix
67ddbae36c Test that equal lists are returned in These. 2017-03-20 11:29:16 -04:00
Rob Rix
093f3b9508 Stub in a spec for Myers’ algorithm. 2017-03-20 11:25:58 -04:00
Rob Rix
8d4e54a3fa Avoid recomputing endpoints where feasible. 2017-03-20 11:21:20 -04:00
Rob Rix
e7c954bccc getK returns an endpoint. 2017-03-20 11:19:18 -04:00
Rob Rix
d4b00fa24a Bounds-check before getting the (k ± 1)th diagonal. 2017-03-20 10:35:10 -04:00
Rob Rix
4e42d96e0c Look up the result in the exiting diagonal. 2017-03-20 10:10:09 -04:00
Rob Rix
26dc1c82a3 Use the makeEditGraph convenience in SES. 2017-03-20 09:58:37 -04:00
Rob Rix
1b1ecc20a7 Add a convenience constructor for edit graphs. 2017-03-20 09:43:55 -04:00
Josh Vera
d2ce3eb988 Merge pull request #1043 from github/bump-tree-sitter-js
Bump tree sitter js
2017-03-17 12:55:41 -04:00
joshvera
bcb85a3336 Tabs to spaces 2017-03-17 12:52:41 -04:00
joshvera
1b1f85015e Add ParseCommand changes back 2017-03-17 12:51:22 -04:00
joshvera
1b3110c57a Revert "Run typescript tests"
This reverts commit bb25c8c0f70650f98e76443c143e6fed3dd17a38.
2017-03-17 12:40:06 -04:00
joshvera
6dc9085dcd Run typescript tests 2017-03-17 12:24:44 -04:00
joshvera
7a5bf48aac Rename js to ts 2017-03-17 10:52:18 -04:00
joshvera
f89e51f665 add js files 2017-03-17 10:48:51 -04:00
Rob Rix
d82061ce7c Clean up inInterval with inRange. 2017-03-17 10:47:56 -04:00