Commit Graph

2988 Commits

Author SHA1 Message Date
Erik Arvidsson cdba35e70a Allow Node.js to work with https (#2667)
Detect the protocol and pick the right module as needed.

Fixes #2613
2016-10-03 18:28:11 -07:00
Ben Kalman 4a562d81ef Add tag and face counts to the photo index (#2660) 2016-10-03 11:52:42 -07:00
Eric Halpern 574bdd8483 Make config.Resolve methods public and make photo-index .nomsconfig aware (#2661) 2016-10-03 10:03:11 -07:00
zcstarr 40b28f94e5 Refactor Chunks and ChildValues API to work iteratively (#2599)
* Refactors Chunks and ChildValues API to be iterative change also
exposes WalkValues which replaces SomeP and AllP
2016-09-30 16:53:00 -07:00
Aaron Boodman c04f623375 Update js-tour.md 2016-09-30 12:24:22 -07:00
cmasone-attic bc9f16941b Fix JS and Go tour documents to use new Database/Dataset API (#2659)
Whoops, shoulda fixed these with the patches that updated the
APIs.
2016-09-30 10:49:37 -07:00
cmasone-attic 96905bff5d JS: Auto-merge concurrent commits to noms datasets (#2655)
This patch brings JS into line with Go's handling of concurrent
commits to separate Datasets.

Fixes issue #2524
2016-09-30 10:49:03 -07:00
Erik Arvidsson 1cc5c86fa6 Add --force to run-all-js-tests.py (#2652)
When the flag is present we force update @attic/noms. This is useful
since a lot of the samples use file: dependencies which lack a version
so they do not get updated as normal dependencies do.
2016-09-29 14:23:23 -07:00
Aaron Boodman 596a91d341 Add face indexing to photo-index (#2654) 2016-09-29 13:27:04 -07:00
Dan Willhite 885dd5a21c Add tx-regex, tx-replace, and tx-convert args. (#2651)
Also, make help text more complete.
2016-09-29 13:03:53 -07:00
Ben Kalman 9f5725bd27 Run url-fetch perf tests against a fresh database each time
The subsequent runs of url-fetch on jenkins are way faster, and this
appears to be because commiting is much faster on subsequent runs. The
perf tests now use a new database each time.
2016-09-29 12:49:37 -07:00
Erik Arvidsson a63b588f80 Fix lint errors (#2650) 2016-09-29 10:44:43 -07:00
Dan Willhite 40e2d7686f Make jsonToNoms handle some null values (#2646)
Null values in struct field are handled by not skipping that field in
the noms type. Null values as elements in array cause an exception.
2016-09-29 10:29:55 -07:00
Erik Arvidsson 89fbf312f1 Increase the timeout for slow JS tests (#2648) 2016-09-29 09:49:24 -07:00
Aaron Boodman 48e7ed9850 fb/find-photos: add in datePublished, dateUpdated, faces (#2634)
fb/find-photos: add in publishDate, updateDate, along with basic face info.
2016-09-28 17:18:46 -07:00
cmasone-attic dd92a06559 JS: Make Database a mutable API that vends immutable Datasets (#2636)
Noms SDK users frequently shoot themselves in the foot because they're
holding onto an "old" Database object. That is, they have a Database
tucked away in some internal state, they call Commit() on it, and
don't replace the object in their internal state with the new Database
returned from Commit.

This PR fixes #2589 by changing the Database and Dataset JS API to be
in line with the proposal there.
2016-09-28 16:50:57 -07:00
Ben Kalman a738ad2d85 flickr correct nsInSecond/nsInMillisecond (#2645) 2016-09-28 16:45:26 -07:00
Aaron Boodman 3efc6c5f7d You're the computer, you sort the fields (#2641)
Change makeStructType() API for sanity. Update callers.
2016-09-28 15:39:52 -07:00
Dan Willhite 4fd84d5141 Add dummy files to js samples with integration tests (#2643) 2016-09-28 13:59:22 -07:00
Dan Willhite 82b25f370f Remove pitch-index from samples/js (#2642) 2016-09-28 13:42:50 -07:00
Dan Willhite 7d81c9b96b Add integration test for sample: url_fetch (#2639)
Towards #1888
2016-09-28 13:36:19 -07:00
Dan Willhite cd8f995b2c Add integration test for sample: aggregate. (#2633)
Towards #1888
2016-09-28 12:52:55 -07:00
Eric Halpern d9715dba0e Support db aliases and default db for noms cli
This patch implements evolving support for configuring aliases and defaults for the noms cli (started with #2131)

For an introduction, please take a look at the sample code here: https://github.com/attic-labs/noms/blob/master/samples/cli/nomsconfig/README.md

Improvements include: 

 - All go samples now work with .nomsconfig
 - Absolute paths in ldb specs are now properly handled 
 - Add -v|--verbose flag to commands to debug expansion
 - Make default just another alias and change [default] section to [db.default]
 - Introduce the `.` shorthand to refer to a previously mentioned dataset/object
2016-09-27 22:21:32 -07:00
Ben Kalman 81673c2591 Add perf test for url-fetch 2016-09-27 16:52:54 -07:00
cmasone-attic c250406a0e LocalDatabase vends separate validating BatchStore (#2624)
This patch modifies LocalDatabase so that it no longer swaps out
its embedded ValueStore during Pull(). The reason it was doing this
is that Pull() injects chunks directly into a Database, without
doing any work on its own to ensure correctness. For LocalDatabase,
WriteValue() performs de-facto validation as it goes, so it does not
need this additional validation in the general case. To address the
former wtithout impacting the latter, we were making LocalDatabase
swap out its ValueStore() during Pull(), replacing it with one that
performs validation.

This led to inconsistencies, seen in issue #2598. Collections read
from the DB _before_ this swap could have weird behavior if they
were modified and written after this swap.

The new code just lazily creates a BatchStore for use during Pull().

Fixes #2598
2016-09-27 14:24:57 -07:00
Aaron Boodman 577c99ff38 Factor out datas.ReadAbsolutePaths() (#2623) 2016-09-27 14:21:54 -07:00
Aaron Boodman e52775f838 Refactor exit mockery into go/util/exit (#2622) 2016-09-27 13:51:27 -07:00
Ben Kalman 097863ea6f Use parallel NewBlob in the csv perf tests (#2625)
This just involves changing types.NewBlob(io.MultiReader(files...)) to
types.NewBlob(files...). On my laptop it improves
Test01ImportSfCrimeBlobFromTestdata from 21s to 16s - though much of
this is dominated by commit, which wouldn't be affected by this change.
2016-09-27 12:22:25 -07:00
Ben Kalman 35d88dd3c6 Implement Blob.Concat and make NewBlob parallel
Blob.Concat is a simple use of the sequence concat code that List.Concat uses.
NewBlob uses Blob.Concat to construct a Blob in parallel.

Perf tests for parallel NewBlob write N temporary files then constructs a Blob
from them, so there is some I/O, but it appears to be mostly CPU bound.  NewBlob
doesn't get much more than 50% faster with any P >= 2.
2016-09-27 11:08:31 -07:00
Aaron Boodman 362a5630d9 Add photo-index: a simple photo indexer. For now only indexes by tag. (#2610)
Add photo-index: a simple photo indexer. For now only indexes by tag.

Will add indexing by face/geo in subsequent patches.
2016-09-27 10:50:37 -07:00
Mike Gray 181f549179 Update FB and Flickr importers to be similar in names and descriptions (#2615) 2016-09-27 13:28:11 -04:00
Aaron Boodman 429784dd00 flickr/find-photos: capture dateTaken, datePublished, dateUpdated (#2614)
flickr/find-photos: capture dateTaken, datePublished, dateUpdated.

TBR
2016-09-27 00:04:58 -07:00
Dan Willhite 5de36728e8 Make nomdex_update use GraphBuilder (#2619) 2016-09-26 17:00:12 -07:00
cmasone-attic 2e462b11a5 Make Database a mutable API that vends immutable Datasets (#2617)
Noms SDK users frequently shoot themselves in the foot because they're
holding onto an "old" Database object. That is, they have a Database
tucked away in some internal state, they call Commit() on it, and
don't replace the object in their internal state with the new Database
returned from Commit.

This PR changes the Database and Dataset Go API to be in line with the
proposal in Issue #2589. JS follows in a separate patch.
2016-09-26 12:18:14 -07:00
Dan Willhite 7bb7a068d6 Fix hyperlink in nomdex Readme file (#2618) 2016-09-26 11:00:33 -07:00
Dan Willhite 403bfa6560 Create Readme.md (#2616) 2016-09-26 10:42:15 -07:00
Ben Kalman 5dc8ae8388 Support -perf.run flag for perf tests, filters by regexp 2016-09-23 11:26:17 -07:00
Dan Willhite e351f718e4 Use smaller dataset to testing csv-import/multi-map (#2609)
Also reuse data already imported as blob by another test.
2016-09-23 10:59:30 -07:00
Erik Arvidsson 2582235bed Add work arounds for React Native (#2608)
This works around a bunch of issues related to fetch and XMLHttpRequest
in React Native.
2016-09-22 16:49:39 -07:00
Erik Arvidsson 21b8fc2b4f Update Flow to 0.32 (#2606)
Motivation: Better libs needed in an upcoming PR.
2016-09-22 15:22:20 -07:00
Dan Willhite e5541f9343 Make csv importer use GraphBuilder (#2600) 2016-09-22 15:19:37 -07:00
Erik Arvidsson e28cda9ba7 Update Babel dependencies (#2604)
The motivation is to get babylon@6.11.1 which has a fix for a bug where it
treated toString as a duplicate export.
2016-09-22 13:54:46 -07:00
Dan Willhite 3b17956907 Add perf test for multi-key maps. (#2605) 2016-09-22 13:34:37 -07:00
Eric Halpern e3e9b29d2c Noms configuration for default and aliases (#2597)
* Implement noms cli configuration support

- Introduce .nomsconfig
- Supports a default db to use when no explicit db is given
- Supports defining db aliases to use as short hand for db urls
- See samples/cli/nomsconfig for more info

fix: #2131
2016-09-21 19:43:51 -07:00
Aaron Boodman 1bf6d8ac83 Update README.md 2016-09-21 10:33:59 -07:00
Dan Willhite 1b256fa72a Implement GraphBuilder (#2548) 2016-09-20 16:04:28 -07:00
Erik Arvidsson bc40db4fdb Make UTF-8 encode/decode write directly to a buffer (#2566)
We used to use a third party module that allocated new buffers all
the time. For Noms, we already have a buffer that we want to write
to.

For the rolling hash we use a scratch buffer that we reuse between
calls.

This also removes the DataView objects. Our usage is so basic that
having a DataView object wrapper is just overkill.

Fixes #2304
2016-09-20 11:09:31 -07:00
Eric Halpern 27cbfdd489 Fix noms-sync surprising quantity (#2531)
* Use sampling for a better bytes-written estimate for noms sync
* Confirmed that remaining overestimate of data written is consistent with leveldb stats and opened #2567 to track
2016-09-20 10:57:40 -07:00
Dan Willhite 1a7bfd0627 Cleanup Prefix and MaxLine writers (#2591)
These were previously intertwined into one writer that was
embedded in and only usable by the 'noms' command.
This commit separates them into to separate writers that
can be used independently or combined. I also moved them
into go/utils/writers so they can be used by other code.

The main impetus to do this was to fix Bug #2593.
2016-09-20 10:31:16 -07:00
Mike Gray f00157a728 Add unit tests for commit metadata (#2595) 2016-09-19 16:50:06 -04:00