Commit Graph

153 Commits

Author SHA1 Message Date
Aaron Boodman 8d2b1d6568 Welcome, Jenna! (#2854) 2016-11-23 15:58:47 -08:00
Aaron Boodman 7f760a9ba3 photo-index: index photos by source too (#2833)
Fixes https://github.com/attic-labs/attic/issues/19
2016-11-15 14:20:17 -08:00
Aaron Boodman e730306bd2 Teach photo-index about PhotoGroup (#2832)
Teach photo-index about PhotoGroup
2016-11-15 14:09:48 -08:00
Aaron Boodman 8e64e636aa Introduce photo-dedup-by-date (#2826)
Introduce photo-dedup-by-date

This program deduplicates photos by the date they were taken. It considers two photos a group if they were separated by less than 5 seconds.
2016-11-15 14:07:57 -08:00
Aaron Boodman 03434861ea coffeebot: don't do anything until 10a each day (#2834)
this way easier for message to be seen
2016-11-15 02:24:48 -08:00
Ben Kalman cdfbee1b3d Remove spec GetDataset/GetDatabase/GetPath, update all clients (#2815)
These are now ForDataset/ForDatabase/ForPath.
2016-11-09 17:34:39 -08:00
Dan Willhite b6b1389c30 Danloader (#2794)
* Downloader

* Review changes
2016-11-08 16:46:55 -08:00
Ben Kalman 172b991ac1 Port new Spec API to Go from JS (#2807)
This is a side-by-side port, taking inspiration from the old dataspec.go
code. Notably:

- LDB support has been added in Go. It wasn't needed in JS.
- There is an Href() method on Spec now.
- Go now handles IPV6.
- Go no longer treats access_token specially.
- Go now has Pin.
- I found some issues in the JS while doing this, I'll fix later.

I've also updated the config code to use the new API so that basically
all the Go samples use the code, even if they don't really change.
2016-11-08 14:18:47 -08:00
Aaron Boodman 1f773a1c18 fix timezone in coffeebot (#2811) 2016-11-07 20:40:58 -08:00
Aaron Boodman 508a4dd3b5 coffeebot: remove secret url (#2810) 2016-11-07 17:36:28 -08:00
Aaron Boodman f51da13e44 Add coffee bot (#2809)
* Add coffee bot

* fix order
2016-11-07 17:25:58 -08:00
Ben Kalman 5ab12777f6 Remove the demo server and receipt code (again) (#2808) 2016-11-07 15:13:28 -08:00
Dan Willhite 46586ee928 Remove msg args from d.PanicIfTrue and d.PanicIfFalse. (#2757)
Should discourage people from writing code that does unnecessary work
to generate a msg every time that an error condition is checked. Fixes #2741
2016-11-03 11:43:57 -07:00
Eric Halpern 74df877747 Don't print warning unless -v (#2799) 2016-11-03 11:05:02 -07:00
Eric Halpern 11cc65ca7c Add jobs for grouping similar photos in PhotoGroups (#2789)
* Add jobs for grouping similar photos in PhotoGroups

Outline:
- The first photo-dhash job adds a dhash field to each photo. The dhash is a 128 bit
  downsampled representation of the photo that works well for visual similarity comparisions.
- The second photo-dedup job groups photos that have similar dhash's into PhotoGroups.

fixes: #2787
2016-11-02 12:06:54 -07:00
Ben Kalman 50c48be4b8 Noms, demo-server, and photos UI changes to support auth (#2793)
The big change here is adding a new Spec class in spec.js. This replaces
DatabaseSpec/DatasetSpec/PathSpec in specs.js, but I'm leaving those in
and moving code over in a later patch. For now, only photos UI.

The photos UI change is to plumb through the authorization token through
the Spec code. For now, it's reading it from a URL parameter, but soon
I'll make it session based (probably localStorage).

The demo-server change is to add the Authorization header into CORS.
2016-11-02 11:57:07 -07:00
Ben Kalman bbfc27d7fe Revert "Remove demo-server and receipts code" (#2791) 2016-10-31 17:10:17 -07:00
Ben Kalman ba5e309c84 Remove demo-server and receipts code (#2790)
They're in attic now: https://github.com/attic-labs/attic
2016-10-31 17:08:18 -07:00
Ben Kalman 26391d9d57 Implement private databases for the demo server (#2772)
Private databases begin with "/p/" - for example, "/kalman" is not
private, but "/p/kalman" is private. They are not the same database.

The bulk of this work is the receipt infrastructure.

A receipt is form data that gives access to a database, encrypted using
secretbox. For example, "Database=/p/kalman&Date=12345678" might encrypt
to "SFH5bcIJ3_XgEbtmi_AdCKTItW20fl90czVl5_pF5PAXhNQ366U1yOpYGAjT".

* A new tool receiptkey generates random receipt (secretbox) keys.
* A new tool receipttool generates receipts for databases.
* demo-server has been updated to check for a receipt in the
  Authorization header to access private databases.

receipttool and demo-server must be given the same receipt key.
2016-10-31 10:58:33 -07:00
cmasone-attic f2ca3d6e8e Add noms merge (#2768)
Add optional merging functionality to noms commit.
noms merge <database> <left-dataset-name> <right-dataset-name> <output-dataset-name>

The command above will look in the given Database for the two named
Datasets and, if possible, merge their HeadValue()s and commit the
result back to <output-dataset-name>.

Fixes #2535
2016-10-27 15:27:36 -07:00
zcstarr fdf86980d5 Adds face merge functionality to photos (#2750)
Performs face merge functionality, it takes a photo's set of
face center points and face rectangles and returns the
set of faces in which the face rectangle contains the face
center point. We store a new photo object with a set of faces, that
have the names from the face center points and the rectangles from the
face rectangles.
2016-10-26 09:28:16 -07:00
Aaron Boodman fd7c1cc14d Make dropbox work with the photos sample (#2745)
* dropbox/find-photos: encode auth token in photo URLs so they can
work in UI.

* Remove requirement for datePublished from photo-index

Dropbox doesn't have a publish date

* fix test

* review comments

* npm test
2016-10-21 14:49:03 -07:00
Aaron Boodman 3adab7a874 picasa/find-photos (#2714)
* Introduce picasa/find-photos

* npm test
2016-10-19 09:07:49 -07:00
cmasone-attic 23f94bdf8c demo-server: Remove cachingReadThroughChunkStoreFactory (#2689)
demo-server was using a read-through cache to allow it to serve more
concurrent requests more quickly by reducing disk I/O. As seen in issue
across Databases, leading to incorrect sync results in some instances.

Since we're not worried about demo-server load right now, simply delete
the cache.

Fixes #2688
2016-10-10 14:14:54 -07:00
Aaron Boodman fe922da8ed photo-index: tag commit with run date (#2687)
Would be nice to also tag with pinned path, but that's more work
2016-10-08 01:03:36 -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 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
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
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
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
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
Dan Willhite e5541f9343 Make csv importer use GraphBuilder (#2600) 2016-09-22 15:19:37 -07:00
Dan Willhite 3b17956907 Add perf test for multi-key maps. (#2605) 2016-09-22 13:34:37 -07:00
Erik Arvidsson 5edf89cf3d Replace d.Chk.True with d.PanicIfFalse (#2563)
And same for d.Chk.False
2016-09-14 13:11:28 -07:00
Mike Gray 1996e0a3d8 Add Noms commit command (#2474)
* Add "noms commit" command
* Updated csv-import, json-import, xml-import and url-fetch to (optionally) not commit results
* Added helpers for creating commit meta-data struct through command line or function calls
2016-09-09 12:42:27 -04:00
cmasone-attic 1c69c6b891 Update merge.ThreeWay() to allow very basic custom conflict resolution (#2505)
This patch modifies merge.ThreeWay() to take a callback that allows
for custom conflict resolution. The noms-merge command-line tool uses
this to inject a callback that accepts input from the console
dictating whether to accept the value from the 'left' or 'right' merge
candidates.

Toward #2445
2016-09-07 13:21:22 -07:00
zcstarr ef817db179 Adds error for invalid skip records argument and exits csv importer (#2522) 2016-09-06 17:37:05 -07:00
zcstarr b1c0aeb9c5 Adds checks for bad column-type and header csv-import flag values (#2525) 2016-09-06 17:12:21 -07:00