Skip to content

Commit

Permalink
update vendor deps; recompile data
Browse files Browse the repository at this point in the history
  • Loading branch information
sfomuseumbot committed Mar 1, 2023
1 parent 6384c7a commit 78f2a87
Show file tree
Hide file tree
Showing 106 changed files with 18,150 additions and 122 deletions.
3 changes: 2 additions & 1 deletion cmd/compile-galleries-data/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"encoding/json"
"flag"
"fmt"
"github.com/sfomuseum/go-sfomuseum-architecture/galleries"
"io"
"log"
"os"

"github.com/sfomuseum/go-sfomuseum-architecture/galleries"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion cmd/compile-gates-data/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"encoding/json"
"flag"
"fmt"
"github.com/sfomuseum/go-sfomuseum-architecture/gates"
"io"
"log"
"os"

"github.com/sfomuseum/go-sfomuseum-architecture/gates"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion cmd/compile-terminals-data/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"encoding/json"
"flag"
"fmt"
"github.com/sfomuseum/go-sfomuseum-architecture/terminals"
"io"
"log"
"os"

"github.com/sfomuseum/go-sfomuseum-architecture/terminals"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion cmd/current-complex/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"context"
"encoding/json"
"flag"
"github.com/sfomuseum/go-sfomuseum-architecture/campus"
"io"
"log"
"os"

"github.com/sfomuseum/go-sfomuseum-architecture/campus"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion cmd/lookup/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import (
"context"
"flag"
"fmt"
"github.com/sfomuseum/go-sfomuseum-architecture"
"log"

"github.com/sfomuseum/go-sfomuseum-architecture"
)

func main() {
Expand Down
6 changes: 4 additions & 2 deletions cmd/supersede-gallery/main.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
// supersede-gallery is a command line tool to clone and supersede an existing gallery record assigning
// updated parent and hierarchy information at the same time. For example:
// $> ./bin/supersede-gallery -architecture-reader-uri repo:///usr/local/build/collection/sfomuseum-data-architecture/ -gallery-id 1763595133 -parent-id 1763588365
//
// $> ./bin/supersede-gallery -architecture-reader-uri repo:///usr/local/build/collection/sfomuseum-data-architecture/ -gallery-id 1763595133 -parent-id 1763588365
package main

import (
"context"
"flag"
"log"

sfom_writer "github.com/sfomuseum/go-sfomuseum-writer/v3"
"github.com/tidwall/gjson"
"github.com/whosonfirst/go-reader"
"github.com/whosonfirst/go-whosonfirst-export/v2"
"github.com/whosonfirst/go-whosonfirst-id"
wof_reader "github.com/whosonfirst/go-whosonfirst-reader"
"github.com/whosonfirst/go-writer/v3"
"log"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion data/galleries.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/gates.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/terminals.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"wof:id":1729792579,"sfomuseum:terminal_id":"ITB","wof:name":"International Terminal","mz:is_current":0,"name:preferred":["International Terminal Building","ITB"]},{"wof:id":1745882085,"sfomuseum:terminal_id":"T2","wof:name":"Terminal 2","mz:is_current":0,"name:preferred":["Terminal 2"],"name:variant":["T2"]},{"wof:id":1745882137,"sfomuseum:terminal_id":"T1","wof:name":"Terminal 1","mz:is_current":0,"name:preferred":["T1"]},{"wof:id":1763588123,"sfomuseum:terminal_id":"T2","wof:name":"Terminal 2","mz:is_current":1,"name:preferred":["Terminal 2"],"name:variant":["T2"]},{"wof:id":1763588175,"sfomuseum:terminal_id":"T1","wof:name":"Terminal 1","mz:is_current":1,"name:preferred":["T1"]},{"wof:id":1745882335,"sfomuseum:terminal_id":"ITB","wof:name":"International Terminal","mz:is_current":0,"name:preferred":["International Terminal Building","ITB"]},{"wof:id":1763588269,"sfomuseum:terminal_id":"T3","wof:name":"Terminal 3","mz:is_current":1,"name:preferred":["T3"]},{"wof:id":1763588369,"sfomuseum:terminal_id":"ITB","wof:name":"International Terminal","mz:is_current":1,"name:preferred":["International Terminal Building","ITB"]},{"wof:id":1360521543,"sfomuseum:terminal_id":"T2","wof:name":"Terminal 2","mz:is_current":0,"name:preferred":["Terminal 2"],"name:variant":["T2"]},{"wof:id":1360521545,"sfomuseum:terminal_id":"T2","wof:name":"Terminal 2","mz:is_current":0,"name:preferred":["Terminal 2"],"name:variant":["T2"]},{"wof:id":1159554815,"sfomuseum:terminal_id":"SOUTH","wof:name":"South Terminal","mz:is_current":0},{"wof:id":1159554817,"sfomuseum:terminal_id":"SOUTH","wof:name":"South Terminal","mz:is_current":0},{"wof:id":1159554819,"sfomuseum:terminal_id":"NORTH","wof:name":"North Terminal","mz:is_current":0},{"wof:id":1159554827,"sfomuseum:terminal_id":"INTL","wof:name":"International Terminal","mz:is_current":0},{"wof:id":1159554821,"sfomuseum:terminal_id":"NORTH","wof:name":"North Terminal","mz:is_current":0},{"wof:id":1159396107,"sfomuseum:terminal_id":"ITB","wof:name":"International Terminal","mz:is_current":0},{"wof:id":1159554829,"sfomuseum:terminal_id":"INTL","wof:name":"International Terminal","mz:is_current":0},{"wof:id":1159396109,"sfomuseum:terminal_id":"T2","wof:name":"Terminal 2","mz:is_current":0},{"wof:id":1159396115,"sfomuseum:terminal_id":"T1","wof:name":"Terminal 1","mz:is_current":0},{"wof:id":1159396127,"sfomuseum:terminal_id":"SOUTH","wof:name":"South Terminal","mz:is_current":0},{"wof:id":1159396129,"sfomuseum:terminal_id":"NORTH","wof:name":"North Terminal","mz:is_current":0},{"wof:id":1159396123,"sfomuseum:terminal_id":"T3","wof:name":"Terminal 3","mz:is_current":0},{"wof:id":1159396121,"sfomuseum:terminal_id":"T2","wof:name":"Terminal 2","mz:is_current":0,"name:preferred":["Terminal 2"],"name:variant":["T2"]},{"wof:id":1159396131,"sfomuseum:terminal_id":"CENTRAL","wof:name":"Central Terminal","mz:is_current":0},{"wof:id":1159396133,"sfomuseum:terminal_id":"CENTRAL","wof:name":"Central Terminal","mz:is_current":0},{"wof:id":1159396135,"sfomuseum:terminal_id":"SOUTH","wof:name":"South Terminal","mz:is_current":0},{"wof:id":1159396139,"sfomuseum:terminal_id":"T1","wof:name":"Terminal 1","mz:is_current":0},{"wof:id":1159396143,"sfomuseum:terminal_id":"SOUTH","wof:name":"South Terminal","mz:is_current":0},{"wof:id":1159396145,"sfomuseum:terminal_id":"NORTH","wof:name":"North Terminal","mz:is_current":0},{"wof:id":1159396141,"sfomuseum:terminal_id":"T3","wof:name":"Terminal 3","mz:is_current":0},{"wof:id":1159396149,"sfomuseum:terminal_id":"CENTRAL","wof:name":"Central Terminal","mz:is_current":0},{"wof:id":1159396147,"sfomuseum:terminal_id":"ITB","wof:name":"International Terminal","mz:is_current":0},{"wof:id":1159396151,"sfomuseum:terminal_id":"T1","wof:name":"Terminal 1","mz:is_current":0},{"wof:id":1159396153,"sfomuseum:terminal_id":"ITB","wof:name":"International Terminal","mz:is_current":0},{"wof:id":1159396163,"sfomuseum:terminal_id":"T1","wof:name":"Terminal 1","mz:is_current":0},{"wof:id":1159396157,"sfomuseum:terminal_id":"T3","wof:name":"Terminal 3","mz:is_current":0},{"wof:id":1159396165,"sfomuseum:terminal_id":"CENTRAL","wof:name":"Central Terminal","mz:is_current":0},{"wof:id":1159157307,"sfomuseum:terminal_id":"T3","wof:name":"Terminal 3","mz:is_current":0,"name:preferred":["T3"]},{"wof:id":1159396167,"sfomuseum:terminal_id":"T3","wof:name":"Terminal 3","mz:is_current":0},{"wof:id":1159396169,"sfomuseum:terminal_id":"SOUTH","wof:name":"South Terminal","mz:is_current":0},{"wof:id":1159396159,"sfomuseum:terminal_id":"ITB","wof:name":"International Terminal","mz:is_current":0},{"wof:id":1159396171,"sfomuseum:terminal_id":"CENTRAL","wof:name":"Central Terminal","mz:is_current":0},{"wof:id":1159157317,"sfomuseum:terminal_id":"T1","wof:name":"Terminal 1","mz:is_current":0,"name:preferred":["T1"]},{"wof:id":1159157325,"sfomuseum:terminal_id":"T2","wof:name":"Terminal 2","mz:is_current":0,"name:preferred":["Terminal 2"],"name:variant":["T2"]},{"wof:id":1159157333,"sfomuseum:terminal_id":"ITB","wof:name":"International Terminal","mz:is_current":0,"name:preferred":["International Terminal Building","ITB"]},{"wof:id":1477855607,"sfomuseum:terminal_id":"T2","wof:name":"Terminal 2","mz:is_current":0,"name:preferred":["Terminal 2"],"name:variant":["T2"]},{"wof:id":1477855657,"sfomuseum:terminal_id":"T1","wof:name":"Terminal 1","mz:is_current":0,"name:preferred":["T1"]},{"wof:id":1477855699,"sfomuseum:terminal_id":"T3","wof:name":"Terminal 3","mz:is_current":0,"name:preferred":["T3"]},{"wof:id":1477855833,"sfomuseum:terminal_id":"ITB","wof:name":"International Terminal","mz:is_current":0,"name:preferred":["International Terminal Building","ITB"]},{"wof:id":1729792389,"sfomuseum:terminal_id":"T2","wof:name":"Terminal 2","mz:is_current":0,"name:preferred":["Terminal 2"],"name:variant":["T2"]},{"wof:id":1729792435,"sfomuseum:terminal_id":"T1","wof:name":"Terminal 1","mz:is_current":0,"name:preferred":["T1"]},{"wof:id":1729792487,"sfomuseum:terminal_id":"T3","wof:name":"Terminal 3","mz:is_current":0,"name:preferred":["T3"]},{"wof:id":1745882233,"sfomuseum:terminal_id":"T3","wof:name":"Terminal 3","mz:is_current":0,"name:preferred":["T3"]}]
[{"wof:id":1745882085,"sfomuseum:terminal_id":"T2","wof:name":"Terminal 2","mz:is_current":0,"name:preferred":["Terminal 2"],"name:variant":["T2"]},{"wof:id":1745882137,"sfomuseum:terminal_id":"T1","wof:name":"Terminal 1","mz:is_current":0,"name:preferred":["T1"]},{"wof:id":1763588123,"sfomuseum:terminal_id":"T2","wof:name":"Terminal 2","mz:is_current":1,"name:preferred":["Terminal 2"],"name:variant":["T2"]},{"wof:id":1763588175,"sfomuseum:terminal_id":"T1","wof:name":"Terminal 1","mz:is_current":1,"name:preferred":["T1"]},{"wof:id":1763588369,"sfomuseum:terminal_id":"ITB","wof:name":"International Terminal","mz:is_current":1,"name:preferred":["International Terminal Building","ITB"]},{"wof:id":1745882335,"sfomuseum:terminal_id":"ITB","wof:name":"International Terminal","mz:is_current":0,"name:preferred":["International Terminal Building","ITB"]},{"wof:id":1360521543,"sfomuseum:terminal_id":"T2","wof:name":"Terminal 2","mz:is_current":0,"name:preferred":["Terminal 2"],"name:variant":["T2"]},{"wof:id":1360521545,"sfomuseum:terminal_id":"T2","wof:name":"Terminal 2","mz:is_current":0,"name:preferred":["Terminal 2"],"name:variant":["T2"]},{"wof:id":1159157317,"sfomuseum:terminal_id":"T1","wof:name":"Terminal 1","mz:is_current":0,"name:preferred":["T1"]},{"wof:id":1159157325,"sfomuseum:terminal_id":"T2","wof:name":"Terminal 2","mz:is_current":0,"name:preferred":["Terminal 2"],"name:variant":["T2"]},{"wof:id":1159157307,"sfomuseum:terminal_id":"T3","wof:name":"Terminal 3","mz:is_current":0,"name:preferred":["T3"]},{"wof:id":1159157333,"sfomuseum:terminal_id":"ITB","wof:name":"International Terminal","mz:is_current":0,"name:preferred":["International Terminal Building","ITB"]},{"wof:id":1159396107,"sfomuseum:terminal_id":"ITB","wof:name":"International Terminal","mz:is_current":0},{"wof:id":1159396109,"sfomuseum:terminal_id":"T2","wof:name":"Terminal 2","mz:is_current":0},{"wof:id":1159396115,"sfomuseum:terminal_id":"T1","wof:name":"Terminal 1","mz:is_current":0},{"wof:id":1159396121,"sfomuseum:terminal_id":"T2","wof:name":"Terminal 2","mz:is_current":0,"name:preferred":["Terminal 2"],"name:variant":["T2"]},{"wof:id":1159396123,"sfomuseum:terminal_id":"T3","wof:name":"Terminal 3","mz:is_current":0},{"wof:id":1159396127,"sfomuseum:terminal_id":"SOUTH","wof:name":"South Terminal","mz:is_current":0},{"wof:id":1159396129,"sfomuseum:terminal_id":"NORTH","wof:name":"North Terminal","mz:is_current":0},{"wof:id":1159396131,"sfomuseum:terminal_id":"CENTRAL","wof:name":"Central Terminal","mz:is_current":0},{"wof:id":1159396133,"sfomuseum:terminal_id":"CENTRAL","wof:name":"Central Terminal","mz:is_current":0},{"wof:id":1159396135,"sfomuseum:terminal_id":"SOUTH","wof:name":"South Terminal","mz:is_current":0},{"wof:id":1159396141,"sfomuseum:terminal_id":"T3","wof:name":"Terminal 3","mz:is_current":0},{"wof:id":1159396139,"sfomuseum:terminal_id":"T1","wof:name":"Terminal 1","mz:is_current":0},{"wof:id":1159396143,"sfomuseum:terminal_id":"SOUTH","wof:name":"South Terminal","mz:is_current":0},{"wof:id":1159396145,"sfomuseum:terminal_id":"NORTH","wof:name":"North Terminal","mz:is_current":0},{"wof:id":1159396147,"sfomuseum:terminal_id":"ITB","wof:name":"International Terminal","mz:is_current":0},{"wof:id":1159396157,"sfomuseum:terminal_id":"T3","wof:name":"Terminal 3","mz:is_current":0},{"wof:id":1159396153,"sfomuseum:terminal_id":"ITB","wof:name":"International Terminal","mz:is_current":0},{"wof:id":1159396159,"sfomuseum:terminal_id":"ITB","wof:name":"International Terminal","mz:is_current":0},{"wof:id":1159396163,"sfomuseum:terminal_id":"T1","wof:name":"Terminal 1","mz:is_current":0},{"wof:id":1159396165,"sfomuseum:terminal_id":"CENTRAL","wof:name":"Central Terminal","mz:is_current":0},{"wof:id":1159396151,"sfomuseum:terminal_id":"T1","wof:name":"Terminal 1","mz:is_current":0},{"wof:id":1159396167,"sfomuseum:terminal_id":"T3","wof:name":"Terminal 3","mz:is_current":0},{"wof:id":1159396149,"sfomuseum:terminal_id":"CENTRAL","wof:name":"Central Terminal","mz:is_current":0},{"wof:id":1159396169,"sfomuseum:terminal_id":"SOUTH","wof:name":"South Terminal","mz:is_current":0},{"wof:id":1159396171,"sfomuseum:terminal_id":"CENTRAL","wof:name":"Central Terminal","mz:is_current":0},{"wof:id":1159554815,"sfomuseum:terminal_id":"SOUTH","wof:name":"South Terminal","mz:is_current":0},{"wof:id":1159554817,"sfomuseum:terminal_id":"SOUTH","wof:name":"South Terminal","mz:is_current":0},{"wof:id":1159554821,"sfomuseum:terminal_id":"NORTH","wof:name":"North Terminal","mz:is_current":0},{"wof:id":1159554819,"sfomuseum:terminal_id":"NORTH","wof:name":"North Terminal","mz:is_current":0},{"wof:id":1159554829,"sfomuseum:terminal_id":"INTL","wof:name":"International Terminal","mz:is_current":0},{"wof:id":1159554827,"sfomuseum:terminal_id":"INTL","wof:name":"International Terminal","mz:is_current":0},{"wof:id":1729792389,"sfomuseum:terminal_id":"T2","wof:name":"Terminal 2","mz:is_current":0,"name:preferred":["Terminal 2"],"name:variant":["T2"]},{"wof:id":1477855607,"sfomuseum:terminal_id":"T2","wof:name":"Terminal 2","mz:is_current":0,"name:preferred":["Terminal 2"],"name:variant":["T2"]},{"wof:id":1729792435,"sfomuseum:terminal_id":"T1","wof:name":"Terminal 1","mz:is_current":0,"name:preferred":["T1"]},{"wof:id":1477855657,"sfomuseum:terminal_id":"T1","wof:name":"Terminal 1","mz:is_current":0,"name:preferred":["T1"]},{"wof:id":1477855699,"sfomuseum:terminal_id":"T3","wof:name":"Terminal 3","mz:is_current":0,"name:preferred":["T3"]},{"wof:id":1729792487,"sfomuseum:terminal_id":"T3","wof:name":"Terminal 3","mz:is_current":0,"name:preferred":["T3"]},{"wof:id":1729792579,"sfomuseum:terminal_id":"ITB","wof:name":"International Terminal","mz:is_current":0,"name:preferred":["International Terminal Building","ITB"]},{"wof:id":1477855833,"sfomuseum:terminal_id":"ITB","wof:name":"International Terminal","mz:is_current":0,"name:preferred":["International Terminal Building","ITB"]},{"wof:id":1745882233,"sfomuseum:terminal_id":"T3","wof:name":"Terminal 3","mz:is_current":0,"name:preferred":["T3"]},{"wof:id":1763588269,"sfomuseum:terminal_id":"T3","wof:name":"Terminal 3","mz:is_current":1,"name:preferred":["T3"]}]
5 changes: 3 additions & 2 deletions galleries/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package galleries
import (
"context"
"fmt"
"io"
"sync"

"github.com/tidwall/gjson"
"github.com/whosonfirst/go-whosonfirst-feature/properties"
"github.com/whosonfirst/go-whosonfirst-iterate/v2/iterator"
"github.com/whosonfirst/go-whosonfirst-uri"
"io"
"sync"
)

// CompileGalleriesData will generate a list of `Gallery` struct to be used as the source data for an `SFOMuseumLookup` instance.
Expand Down
1 change: 1 addition & 0 deletions galleries/galleries.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package galleries
import (
"context"
"fmt"

"github.com/sfomuseum/go-sfomuseum-architecture"
)

Expand Down
1 change: 1 addition & 0 deletions galleries/geometry.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package galleries
import (
"context"
"fmt"

"github.com/paulmach/orb"
"github.com/paulmach/orb/geojson"
"github.com/paulmach/orb/planar"
Expand Down
11 changes: 8 additions & 3 deletions galleries/lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/sfomuseum/go-sfomuseum-architecture"
"github.com/sfomuseum/go-sfomuseum-architecture/data"
"io"
_ "log"
"net/http"
Expand All @@ -14,6 +12,9 @@ import (
"strings"
"sync"
"sync/atomic"

"github.com/sfomuseum/go-sfomuseum-architecture"
"github.com/sfomuseum/go-sfomuseum-architecture/data"
)

const DATA_JSON string = "galleries.json"
Expand All @@ -39,9 +40,13 @@ func init() {

// NewLookup will return an `architecture.Lookup` instance. By default the lookup table is derived from precompiled (embedded) data in `data/galleries.json`
// by passing in `sfomuseum://` as the URI. It is also possible to create a new lookup table with the following URI options:
// `sfomuseum://github`
//
// `sfomuseum://github`
//
// This will cause the lookup table to be derived from the data stored at https://raw.githubusercontent.com/sfomuseum/go-sfomuseum-architecture/main/data/galleries.json. This might be desirable if there have been updates to the underlying data that are not reflected in the locally installed package's pre-compiled data.
//
// `sfomuseum://iterator?uri={URI}&source={SOURCE}`
//
// This will cause the lookup table to be derived, at runtime, from data emitted by a `whosonfirst/go-whosonfirst-iterate` instance. `{URI}` should be a valid `whosonfirst/go-whosonfirst-iterate/iterator` URI and `{SOURCE}` is one or more URIs for the iterator to process.
func NewLookup(ctx context.Context, uri string) (architecture.Lookup, error) {

Expand Down
5 changes: 3 additions & 2 deletions galleries/lookup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package galleries

import (
"context"
"github.com/sfomuseum/go-sfomuseum-architecture"
"testing"

"github.com/sfomuseum/go-sfomuseum-architecture"
)

func TestGalleriesLookup(t *testing.T) {
Expand All @@ -21,7 +22,7 @@ func TestGalleriesLookup(t *testing.T) {
*/

wofid_tests := map[string]int64{
"2D": 1729813699, // 2020~-2021-05-25 2D Sky Terrace Platform
"2D": 1745882459, // 2D Sky Terrace Platform
}

ctx := context.Background()
Expand Down
5 changes: 3 additions & 2 deletions gates/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package gates
import (
"context"
"fmt"
"io"
"sync"

"github.com/whosonfirst/go-whosonfirst-feature/properties"
"github.com/whosonfirst/go-whosonfirst-iterate/v2/iterator"
"github.com/whosonfirst/go-whosonfirst-uri"
"io"
"sync"
)

// CompileGatesData will generate a list of `Gate` struct to be used as the source data for an `SFOMuseumLookup` instance.
Expand Down
1 change: 1 addition & 0 deletions gates/gates.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package gates
import (
"context"
"fmt"

"github.com/sfomuseum/go-sfomuseum-architecture"
)

Expand Down
11 changes: 8 additions & 3 deletions gates/lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/sfomuseum/go-sfomuseum-architecture"
"github.com/sfomuseum/go-sfomuseum-architecture/data"
"io"
_ "log"
"net/http"
Expand All @@ -14,6 +12,9 @@ import (
"strings"
"sync"
"sync/atomic"

"github.com/sfomuseum/go-sfomuseum-architecture"
"github.com/sfomuseum/go-sfomuseum-architecture/data"
)

const DATA_JSON string = "gates.json"
Expand All @@ -39,9 +40,13 @@ func init() {

// NewLookup will return an `architecture.Lookup` instance. By default the lookup table is derived from precompiled (embedded) data in `data/gates.json`
// by passing in `sfomuseum://` as the URI. It is also possible to create a new lookup table with the following URI options:
// `sfomuseum://github`
//
// `sfomuseum://github`
//
// This will cause the lookup table to be derived from the data stored at https://raw.githubusercontent.com/sfomuseum/go-sfomuseum-architecture/main/data/gates.json. This might be desirable if there have been updates to the underlying data that are not reflected in the locally installed package's pre-compiled data.
//
// `sfomuseum://iterator?uri={URI}&source={SOURCE}`
//
// This will cause the lookup table to be derived, at runtime, from data emitted by a `whosonfirst/go-whosonfirst-iterate` instance. `{URI}` should be a valid `whosonfirst/go-whosonfirst-iterate/iterator` URI and `{SOURCE}` is one or more URIs for the iterator to process.
func NewLookup(ctx context.Context, uri string) (architecture.Lookup, error) {

Expand Down
3 changes: 2 additions & 1 deletion gates/lookup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package gates

import (
"context"
"github.com/sfomuseum/go-sfomuseum-architecture"
"testing"

"github.com/sfomuseum/go-sfomuseum-architecture"
)

func TestGatesLookup(t *testing.T) {
Expand Down
Loading

0 comments on commit 78f2a87

Please sign in to comment.