Commit Graph

2840 Commits

Author SHA1 Message Date
Mike Gray 4b26de05f6 removing js csv sample (#2435) 2016-08-25 21:32:21 -04:00
Ben Kalman 66b98ea2a1 Add perf test for just parsing a CSV (ny-vehicle-registrations) (#2439) 2016-08-25 17:13:06 -07:00
cmasone-attic 8912489fa8 Merge pull request #2438 from cmasone-attic/issue148
Add Set support to merge.ThreeWay
2016-08-25 14:21:15 -07:00
Chris Masone c53d5c1189 Add Set support to merge.ThreeWay
merge.ThreeWay(SetA, SetB, Parent) essentially returns the union of
the three Sets.

Toward #148
2016-08-25 14:20:41 -07:00
Mike Gray 2f66e67763 fixing misspellings, fixing IneffAssign reported issues (#2436)
also removing encode-perf-rig since codec-perf-rig is more current and real
2016-08-25 13:32:34 -04:00
Mike Gray 6a661361ad csv-import/csv-export support for compound keys/nested maps (#2433) 2016-08-25 09:34:21 -04:00
Dan Willhite d7b7345218 Add informative message at base path of demo-server. (#2432) 2016-08-24 13:41:01 -07:00
cmasone-attic d19696d859 Go: Add three-way merge for types.Struct (#2403)
merge.ThreeWay() is now willing to merge Structs as well as Maps, as long
as the Structs are all named the name thing. Other rules are the same
as for Map.

Toward #148
2016-08-24 12:38:38 -07:00
Dan Willhite de32de82a2 Add != operator to nomdex query language. (#2430)
Fixes #2415
2016-08-24 10:05:42 -07:00
Ben Kalman 8fef8fe7b0 Add perf bot script (#2393) 2016-08-24 09:47:09 -07:00
Aaron Boodman 140c7a9728 Update README.md 2016-08-24 09:36:43 -07:00
Dan Willhite 924492eed1 Describe find command in help output (#2429)
Fixes #2404
2016-08-23 23:05:46 -07:00
Erik Arvidsson 103078b366 Move samples/js/perf to js/perf (#2426) 2016-08-23 17:51:27 -07:00
Dan Willhite 1090ba4090 Add integration test for nomdex (#2425)
Fixes #2414
2016-08-23 17:04:51 -07:00
Erik Arvidsson 5f9c3af12d Move jsmodules/* to js/ (#2424) 2016-08-23 17:01:54 -07:00
Erik Arvidsson d06c3ec8fe Move /js/ into /js/noms/ (#2423) 2016-08-23 16:04:00 -07:00
Ben Kalman a6172c8d21 Support a -perf.prefix flag for perf tests (#2417)
This prepends a prefix to every dataset ID written by perf tests. It
will be used for namespacing the test results for different PRs.
Currently they're written to different databases, which isn't as good.
2016-08-23 15:01:30 -07:00
zcstarr 03f3aa6ed0 Merge pull request #2420 from zcstarr/readme_update
Correct typo in cli-tour doc
2016-08-23 14:38:51 -07:00
Zane Starr db7d0f42a8 change here corrects typo in docs with regards to csv-import commands column type flag 2016-08-23 13:38:07 -07:00
Ben Kalman 5dc65a9b08 Report Jenkins build status for NomsMasterBuilder (#2418) 2016-08-23 13:05:43 -07:00
Mike Gray 4e54c44d56 no functional changes, improving code quality (#2410)
fix misspellings; fix code that was not gofmt'd - plus take advantage of gofmt -s too; couple of unreachable golint reported fixes; reference go report card results and tests
2016-08-23 13:51:38 -04:00
Dan Willhite 7b3adfe657 Add support to nomdex to query against multiple indexes. (#2396)
Fixes #2405
Fixes #2405
Fixes #2114 (Implement nomdex)
2016-08-23 10:26:11 -07:00
Erik Arvidsson 99eb3306b6 Go Marshal: Title case struct names (#2408)
Make the name of the Noms struct start with a capital letter.

When unmarshalling a struct we now ignore the case.

This is a breaking change. If you previously marshalled a Go struct with a lower case name (ie "abc") the Noms struct we generate now has the name "Abc" (previously the name was "abc")

Towards #2376
2016-08-23 10:05:50 -07:00
Erik Arvidsson 0d6e9a56f7 Marshal and Unmarshal handling of interface{} (#2391)
When unmarshalling onto interface{}` the following rules are used:
 - `types.Bool` -> `bool`
 - `types.List` -> `[]T`, where `T` is determined recursively using the same rules.
 - `types.Map` -> `map[T]V`, where `T` and `V` is determined recursively using the same rules.
 - `types.Number` -> `float64`
 - `types.String` -> `string`
 - `types.Union` -> `interface`
 - Everything else an error

Towards #2376
2016-08-22 16:52:01 -07:00
Ben Kalman 892f98050e Make perf suite testdata path configurable by -perf.testdata flag (#2406)
Needed by Jenkins shared workspaces.
2016-08-22 16:40:27 -07:00
Dan Willhite d162173d90 Change SetIterator function name from NextFrom() to SkipTo() (#2401) 2016-08-22 16:06:47 -07:00
Erik Arvidsson c6ad845129 Update README.md 2016-08-22 15:22:34 -07:00
Erik Arvidsson d0d1d31efb JS: Fix OrderedPutCache for browser (#2398)
Fixes #2395
2016-08-22 14:45:23 -07:00
Erik Arvidsson 0d2c4fd56d Revert "Move noms/samples/js/perf to noms/js/perf" (#2400) 2016-08-22 13:57:41 -07:00
Mike Gray 22bc81e355 adding godoc synopsis for several top level packages (#2394) 2016-08-22 13:50:31 -04:00
Erik Arvidsson ecbdd2412b Use Go marshal API in the HR sample 2016-08-22 10:38:20 -07:00
Erik Arvidsson f41e413fe2 Merge pull request #2397 from sunglim/move_perf_js
Move noms/samples/js/perf to noms/js/perf
2016-08-22 10:28:31 -07:00
Ben Kalman b350b13303 Use new Go-to-Noms map marshalling in perf suite (#2392) 2016-08-20 18:43:37 -07:00
LIMSUNG GUK 0c99f194d2 Add config files for js/perf/ 2016-08-20 20:56:47 +09:00
Dan Willhite 9edb24905b Set, Union, & Intersection iterators. (#2383)
Implements #2294. (Set Union Iterator)
Implements #1851. (Set Itersection Iterator)
Towards #2114 (Nomdex with multiple indexes)
2016-08-19 15:47:10 -07:00
cmasone-attic eaf3240438 Merge pull request #2388 from cmasone-attic/issue148
Go: Implement best-effort three-way merge for Maps
2016-08-19 15:08:44 -07:00
Chris Masone ad0da144c5 Go: Implement best-effort three-way merge for Maps
Add the Go 'merge' package, which exports one function called ThreeWay().
ThreeWay() attempts a three-way merge between two candidates and a common
ancestor. It considers the three of them recursively, applying some simple rules:

- If any of the three nodes are different kinds: conflict
- If we are dealing with a map:
  - If the same key is both removed and inserted wrt parent: conflict
  - If the same key is inserted wrt parent, but with different values: conflict
- If we are dealing with a struct:
  - same as map
- If we are dealing with a list:
  - Same as map but substitute "index" for "key"
- If we are dealing with a set:
  - If the same object is both removed and inserted wrt parent: conflict
... otherwise, the concurrent modification is allowed.

Currently, ThreeWay() only works on types.Map.

Towards #148
2016-08-19 14:57:56 -07:00
Mike Gray 1197b4127f csv-analyze to detect column types and primary keys (#2366)
create csv-analyze; add detection of PKs; move detect-columns from csv-import to csv-analyze
2016-08-19 14:24:32 -04:00
Erik Arvidsson 1728070df1 Map marshal - cleanup test and commment (#2390) 2016-08-18 18:02:53 -07:00
Erik Arvidsson 78bb271d3f Go marshal maps (#2389)
Go maps are marshaled to Noms Map.

 Towards #2376
2016-08-18 17:54:16 -07:00
Ben Kalman 064c398dec Add perf test suite infrastructure, and a perf test for csv-import (#2384)
You can run these yourself using the -perf flag, e.g.

> noms serve &
> go test -v -perf http://localhost:8000 ./samples/go/csv/csv-import
> noms ds http://localhost:8000

Though you'll need to go-get github.com/attic-labs/testdata.

Note that all of this only records test results, it doesn't have any
concept of failing perf (unless test assertsions themselves fail). It
will be the job of some other Noms client (work in progress) to do that.

I will be setting this up to run continuously momentarily.
2016-08-18 15:49:21 -07:00
LIMSUNG GUK 89fb45553b Move sample/js/*-perf-rig to js/perf/ 2016-08-18 18:33:19 +09:00
Erik Arvidsson 15d80f9afd Go marshal slices and arrays (#2381)
* Go marshal slices and arrays

Slices and arrays are marshaled to Noms List. For arrays we also enforce
that the length is the same.

Towards #2376
2016-08-17 14:46:50 -07:00
Ben Kalman 8a92b75995 Add missing ==nil check to list diff (#2362)
This isn't triggering any problem in particular, I just noticed it. All
it meant was that noms log might take unnecessarily long with list diff
when there are a lot of changes.
2016-08-17 14:44:21 -07:00
Dan Willhite 218c98f209 Nomdex - for indexing and querying. (#2357)
This first version builds indexes and can query against a single one.
2016-08-17 14:42:34 -07:00
Adam Leventhal b42043118a add Map.Last() (#2382) 2016-08-16 23:33:52 -07:00
Ben Kalman a28f5ddaf9 Render diff struct field paths .foo not ["foo"] (#2379) 2016-08-16 15:28:47 -07:00
Erik Arvidsson f5433ec1b7 JS: Do not shadow struct properties (#2378)
When we create JS struct classes we no longer creates properties for
`chunks`, `hash` or `type` (nor for `toString`, `hashOwnProperty` etc)

If you are using structs with field names that clashes with these then
use a `StructMirror`.

Fixes #2332
2016-08-16 15:12:34 -07:00
Erik Arvidsson 3320518f88 Fix shell script flags (#2377) 2016-08-16 11:58:57 -07:00
Erik Arvidsson c013f1ea1c Go marshal (#2374)
Basic support for creating Noms value from Go values as well as reading
Noms values onto Go values.

Typical usage:

```
// Go to Noms
type T struct {
  S string
  N int32
}
nomsVal, err := marshal.Marshal(T{"Hi", 42})

// Noms to Go
var goVal T
err = marshal.Unmarshal(types.NewStruct("T", types.StructData{
  "S": types.String("Bye"),
  "N": types.Number(555),
}, &goVal)
```

Fixes #1591
2016-08-16 11:47:32 -07:00