Commit Graph

102 Commits

Author SHA1 Message Date
Aaron Boodman 841a268f98 Merge pull request #152 from aboodman/release
Make WriteValue return a "skinny" copy of input value
2015-07-29 17:09:36 -07:00
Aaron Boodman a84893c0d8 Make WriteValue return a "skinny" copy of input value
Fixes #141
2015-07-29 16:06:54 -07:00
Aaron Boodman 7c026ea509 Merge pull request #149 from aboodman/b134
Remove extraneous type asserts from ChunkStore to RootTracker
2015-07-29 15:26:16 -07:00
Aaron Boodman a8bb889e7e Remove extraneous type asserts from ChunkStore to RootTracker
Also, factor out a separate NewDataStoreWithRootTracker() since
the common case is to use the same value for both the ChunkStore
and the RootTracker.

Fixes #134
2015-07-29 15:25:27 -07:00
Aaron Boodman 4488d6b4c6 Abbreviate chunkstore related flags
We type them a lot and the long names are annoying.
2015-07-29 15:01:25 -07:00
Rafael Weinstein 1369ac9e6b Allow xml_importer & pitchmap/index to be more streamy 2015-07-28 14:13:59 -07:00
Chris Masone 60fa35df4f Shorten 'dataset' related flags 2015-07-28 11:26:08 -07:00
cmasone-attic 7678d46466 Merge pull request #132 from cmasone-attic/issue81
Pull from one ChunkStore to another

Towards Issue #81
2015-07-28 11:24:15 -07:00
Chris Masone f47d117bf2 Add pull command line tool, test for pulling an initial commit, address comments
In addition to putting in the 'pull' tool that I forgot to add in my initial PR,
I added an extra unit test to cover a case that we found to be buggy, as well
as addressing some comments by aa and arv.

1) Switched to io.Copy in CopyChunks
2) Added NewFlagsWithPrefix()
3) Cleaned up some error reporting
2015-07-28 11:21:45 -07:00
Chris Masone 5838df4736 Datastore should be primed with an empty SetOfCommit
We've been keeping some special-case code in Datastore to handle the
situation where the Root of the store is nonexistent. There was some
checking for the empty Ref and creating a SetOfCommit out of whole
cloth. This meant that if you asked an empty Datastore (or Dataset)
what its Heads() were, it would give you back a Value that wasn't
backed by a Chunk in its underlying ChunkStore. This caused some
issues with pull code, so we decided to change things such that a
DataStore is primed with an initial empty SetOfCommit upon creation.

This means creating a Dataset in a DataStore now shows up in DataStore
history, which it did not before. Essentially, every Dataset now has
an "initial commit" of an empty SetOfCommit when it's created. I think
that having these show up as part of the DataStore history makes sense,
but the model may evolve over time.
2015-07-28 09:37:18 -07:00
Erik Arvidsson 6b26be741d nomgen: Move file handling into nomgen.go
Fixes #46
2015-07-27 15:58:02 -07:00
Chris Masone 0d830e3c1d Pull from one ChunkStore to another
This initial implementation requires that both the "remote" and local
ChunkStores be accessible by the machine running the pull command.
I took an initial pass at splitting up the functions so that, e.g.,
calculating which refs are needed could be done on an actual remote
machine, and we can add a chunk copying routine that gets data from
the network or something.

Towards issue #81
2015-07-27 11:41:18 -07:00
Erik Arvidsson 50bf19d99f Merge pull request #127 from arv/scale-pitchmap
Scale the pitch locations and fix image
2015-07-24 14:51:50 -07:00
Erik Arvidsson 623988e8fd Scale the pitch locations and fix image
Fixes #125
2015-07-24 14:49:33 -07:00
cmasone-attic 32e29a7955 Merge pull request #123 from cmasone-attic/rename_dataset_root
Change Dataset 'Root' field to be called 'Heads'
2015-07-24 14:46:50 -07:00
Chris Masone 3b5f18fdfc Change Dataset 'Root' field to be called 'Heads'
Since the Value stored in Dataset.Root is always a CommitSet, 'Heads'
is a more accurate and useful name for this field than 'Root'.
2015-07-24 14:25:15 -07:00
Erik Arvidsson 1db5d485a9 Use whatwg-fetch in explore 2015-07-24 14:18:41 -07:00
Erik Arvidsson 1ce5e3763b Merge pull request #120 from arv/codegen-naming
Change the default names for typed data structures
2015-07-23 16:29:15 -07:00
Rafael Weinstein 96c8dadb52 Minor fixes for pitchmap 2015-07-23 16:03:47 -07:00
Rafael Weinstein aa64d0769d Minor fix for fetch-urls 2015-07-23 15:07:52 -07:00
Erik Arvidsson e379360f3a Change the default names for typed data structures
TList -> ListOfT
TSet -> SetOfT
KeyValueMap -> MapOfKeyToValue

Issue #108
2015-07-23 14:12:06 -07:00
Erik Arvidsson 9e9b9556e4 Add tests for codegen
The test for this does the following:

1. The generated code is checked in
2. Running the test regenerates the generated code
3. Then the test.go is compiled and run

This also adds a smoke test for the codegen which just makes sure
that we do not fail when we try to generate code.

Fixes #90
2015-07-23 13:47:00 -07:00
Rafael Weinstein 2a610b6866 Add fetch-urls script 2015-07-23 13:07:44 -07:00
cmasone-attic f229396931 Merge pull request #117 from cmasone-attic/revert
Revert Walk() and GetReachabilitySetDiff()
2015-07-23 12:40:53 -07:00
Chris Masone d12dde500d Revert Walk() and GetReachabilitySetDiff()
It turns out these functions aren't actually generally useful,
because they deal in Values and Refs, while what we actually
want is to deal in chunks. So...

Revert "Settle big/small vs to/from ONCE AND FOR ALL"

This reverts commit f51c575cd2.

Revert "Add a naive Diff() function between two Values."

This reverts commit 662bc5e3c4.
2015-07-23 11:49:55 -07:00
Aaron Boodman e4983d1826 Merge pull request #110 from aboodman/index
Add some usage of strongly-typed maps to the index program.
2015-07-23 11:23:39 -07:00
Aaron Boodman ddd5ebc90e Merge pull request #112 from aboodman/explore
explore: highlight all tree nodes that are from same ref together.
2015-07-23 11:23:19 -07:00
Aaron Boodman dd6f5a81b1 Explore: Highlight all common nodes together.
Fixes #102.
2015-07-23 11:22:13 -07:00
Rafael Weinstein 218d6f3a92 Display one pitcher at a time 2015-07-22 16:43:38 -07:00
Aaron Boodman e39d74543d Add some usage of strongly-typed maps to the index program.
This doesn't really feel like progress to me though. Going to let
it rattle around in my head a bit more before going further.
2015-07-22 16:20:19 -07:00
Aaron Boodman 0709403ec3 Merge pull request #106 from aboodman/roots
Disambiguate the term "root"
2015-07-22 14:45:55 -07:00
Aaron Boodman 39084cc0be Disambiguate the term "root".
datas.Root(Set) -> datas.Commit(Set)
DataStore::Roots() -> DataStore::Heads()
2015-07-22 14:43:36 -07:00
Chris Masone f51c575cd2 Settle big/small vs to/from ONCE AND FOR ALL 2015-07-22 14:35:36 -07:00
Chris Masone 662bc5e3c4 Add a naive Diff() function between two Values.
Given two refs, we need to be able to determine the set of chunks
reachable from one that cannot be reached from the other. This patch
adds a naive implementation of this functionality that essentially walks
the value tree down from the values pointed to by two refs and compares them.

It also has a little command-line driver, but this may be removed.

Fixes issue #82
2015-07-22 14:35:36 -07:00
Rafael Weinstein 2a5062db81 Implement lazy loading in js sdk 2015-07-22 13:47:32 -07:00
Erik Arvidsson 3fdc008f5c Codegen: Add support for noms types
This makes it possible to do a List of Bool or Map of Int32 etc
2015-07-22 12:24:27 -07:00
Aaron Boodman e58b54fa1c Some small refactoring to pitchmap/index
This is in prep for sending year2k (tm) version of this program,
to make the diff more smaller and meaningful.
2015-07-22 10:10:02 -07:00
Aaron Boodman 0e199158a6 Various cleanups to heatmap UI and docs. 2015-07-21 11:23:49 -07:00
Aaron Boodman 83bb5ee4d8 Merge pull request #93 from aboodman/server-fix
Fix startup crash in server binary.
2015-07-21 10:17:01 -07:00
Aaron Boodman 4182ad0a33 Fix startup crash in server binary.
Also change ChunkStore from being embedded in server to being a field of it. It is equivalent, but this feels more semantically correct and it's less code anyway.
2015-07-21 10:12:42 -07:00
Aaron Boodman 941ebae87e Merge pull request #76 from aboodman/order
Switch Map and Set from using a hashtable internally to a sorted list
2015-07-21 09:49:05 -07:00
Rafael Weinstein e20ed5c289 Babelify within noms js module 2015-07-20 17:59:42 -07:00
Rafael Weinstein 0087a45df9 Reorg js code into common module 2015-07-20 17:14:30 -07:00
Erik Arvidsson 2789d477e2 Add an RPC call to server to get the dataset root
And use that in the heatmap ui
2015-07-20 17:08:28 -07:00
Chris Masone 5dce937983 Fix typo that makes pitchmap/index ignore all pitches
Whoops.
2015-07-20 15:34:32 -07:00
Chris Masone 9558439518 Fix up the indexer to tolerate more edge cases
And also add a cpu profiling flag.
2015-07-20 10:52:10 -07:00
Chris Masone a22b9de144 Changes to xml_importer.go to allow for naive benchmarking
Introduce the 'NopStore', which is a sorta-ChunkStore that throws away
all written data. Get() can't really be called on it, as a result,
but it's useful for taking IO totally out of the equation when testing
our code for performance.

Towards issue #67
2015-07-20 10:08:00 -07:00
Aaron Boodman 2d8aed9753 Regenerate everything after change to map iteration order.
Fixes #62.
2015-07-20 09:29:51 -07:00
Erik Arvidsson cbcab63182 Update Explorer UI to show the ref
The ref is shown on hover.
2015-07-17 14:45:15 -07:00
Erik Arvidsson 8940588187 Heatmap UI: Extract the pitchers and pitch locations from the dataset 2015-07-17 14:35:24 -07:00