-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[back-end] Add test data and fix tests (#24)
- Loading branch information
Showing
12 changed files
with
224 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
{ | ||
"prefixes": { | ||
"https://dev.lod.coop/essglobal/2.1/standard/activities-ica/": "aci", | ||
"https://dev.lod.coop/essglobal/2.1/standard/base-membership-type/": "bmt", | ||
"https://dev.lod.coop/essglobal/2.1/standard/organisational-structure/": "os" | ||
}, | ||
"languages": ["en", "fr"], | ||
"fields": { | ||
"uid": "value", | ||
"name": "value", | ||
"description": "value", | ||
"website": { | ||
"type": "multi", | ||
"of": { | ||
"type": "value" | ||
} | ||
}, | ||
"dc_domains": { | ||
"type": "multi", | ||
"of": { "type": "value" } | ||
}, | ||
"country_id": { | ||
"type": "vocab", | ||
"uri": "coun" | ||
}, | ||
"primary_activity": { | ||
"type": "vocab", | ||
"uri": "aci", | ||
"titleUri": "ui:primary_activity" | ||
}, | ||
"organisational_structure": { | ||
"type": "vocab", | ||
"uri": "os", | ||
"titleUri": "ui:organisational_structure" | ||
}, | ||
"typology": { | ||
"type": "vocab", | ||
"uri": "bmt", | ||
"titleUri": "ui:typology" | ||
}, | ||
"latitude": "value", | ||
"longitude": "value", | ||
"geocontainer_lat": "value", | ||
"geocontainer_lon": "value", | ||
"geocoded_addr": "value", | ||
"data_sources": { | ||
"type": "multi", | ||
"of": { "type": "vocab", "uri": "dso" } | ||
} | ||
}, | ||
"vocabs": { | ||
"aci": { | ||
"en": { | ||
"title": "Economic Activity", | ||
"terms": { | ||
"ICA210": "Housing", | ||
"ICA220": "Transport", | ||
"ICA230": "Utilities" | ||
} | ||
}, | ||
"fr": { | ||
"title": "Secteur économique", | ||
"terms": { | ||
"ICA210": "Logement", | ||
"ICA220": "Transports", | ||
"ICA230": "Services publics" | ||
} | ||
} | ||
}, | ||
"bmt": { | ||
"en": { | ||
"title": "Typology", | ||
"terms": { | ||
"BMT10": "Consumer/Users", | ||
"BMT20": "Producers", | ||
"BMT30": "Workers" | ||
} | ||
}, | ||
"fr": { | ||
"title": "Typologie", | ||
"terms": { | ||
"BMT10": "Consommateurs/usagers", | ||
"BMT20": "Producteurs", | ||
"BMT30": "Travailleurs" | ||
} | ||
} | ||
}, | ||
"os": { | ||
"en": { | ||
"title": "Structure Type", | ||
"terms": { | ||
"OS60": "Workers cooperative", | ||
"OS80": "Consumer/User coops", | ||
"OS90": "Producer cooperative" | ||
} | ||
}, | ||
"fr": { | ||
"title": "Type de structure", | ||
"terms": { | ||
"OS50": "Entreprise (autre)", | ||
"OS60": "Coopératives de travail associé", | ||
"OS80": "Coopératives de consommateurs", | ||
"OS90": "Coopératives de producteurs" | ||
} | ||
} | ||
}, | ||
"coun": { | ||
"en": { | ||
"title": "Country", | ||
"terms": { | ||
"GB": "United Kingdom", | ||
"FR": "France" | ||
} | ||
}, | ||
"fr": { | ||
"title": "Pays", | ||
"terms": { | ||
"GB": "Royaume-Uni", | ||
"FR": "France" | ||
} | ||
} | ||
}, | ||
"dso": { | ||
"en": { | ||
"title": "Data Source", | ||
"terms": { | ||
"CUK": "Co-operatives UK", | ||
"DC": "DotCoop", | ||
"ICA": "International Cooperative Alliance", | ||
"NCBA": "National Cooperative Business Association (USA)" | ||
} | ||
}, | ||
"fr": { | ||
"title": "Source de données", | ||
"terms": { | ||
"CUK": "Co-operatives UK", | ||
"DC": "DotCoop", | ||
"ICA": "Alliance coopérative internationale", | ||
"NCBA": "National Cooperative Business Association (USA)" | ||
} | ||
} | ||
}, | ||
"ui": { | ||
"en": { | ||
"primary_activity": "Primary Activity", | ||
"organisational_structure": "Organisational Structure", | ||
"typology": "Typology" | ||
}, | ||
"fr": { | ||
"primary_activity": "Activité principale", | ||
"organisational_structure": "Structure organisationnelle", | ||
"typology": "Typologie" | ||
} | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
apps/back-end/test/data/datasets/dataset-A/initiatives/0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"uid": "test/cuk/R000001", | ||
"name": "Apples Co-op", | ||
"description": "We sell apples", | ||
"website": "https://apples.coop", | ||
"dc_domains": ["apples.coop", "orchards.coop"], | ||
"country_id": "coun:GB", | ||
"primary_activity": "aci:ICA210", | ||
"organisational_structure": "os:OS60", | ||
"typology": "bmt:BMT20", | ||
"latitude": 51.507476, | ||
"longitude": -0.127825, | ||
"geocontainer_lat": 51.50747643, | ||
"geocontainer_lon": -0.12782464, | ||
"geocoded_addr": "1 West Street, Sheffield, S1 2AB, UK", | ||
"data_sources": ["dso:DC", "dso:CUK"] | ||
} |
17 changes: 17 additions & 0 deletions
17
apps/back-end/test/data/datasets/dataset-A/initiatives/1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"uid": "test/cuk/R000002", | ||
"name": "Pears United", | ||
"description": "We sell pears", | ||
"website": "https://pears.coop", | ||
"dc_domains": ["pears.coop", "pearsunited.coop"], | ||
"country_id": "coun:FR", | ||
"primary_activity": "aci:ICA230", | ||
"organisational_structure": "os:OS90", | ||
"typology": "bmt:BMT30", | ||
"latitude": 50.850452, | ||
"longitude": 0.924728, | ||
"geocontainer_lat": 50.85045216, | ||
"geocontainer_lon": 0.92472819, | ||
"geocoded_addr": "79 rue de la Mare aux Carats, 34090 Montpellier, France", | ||
"data_sources": ["dso:DC"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[ | ||
[-0.12783, 51.50748], | ||
[0.92473, 50.85045] | ||
] |
16 changes: 16 additions & 0 deletions
16
apps/back-end/test/data/datasets/dataset-A/searchable.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[ | ||
{ | ||
"country_id": "coun:GB", | ||
"primary_activity": "aci:ICA210", | ||
"organisational_structure": "os:OS60", | ||
"typology": "bmt:BMT20", | ||
"searchString": "test co-op 1 west street sheffield s1 2ab uk test.coop" | ||
}, | ||
{ | ||
"country_id": "coun:FR", | ||
"primary_activity": "aci:ICA230", | ||
"organisational_structure": "os:OS90", | ||
"typology": "bmt:BMT30", | ||
"searchString": "pears united 79 rue de la mare aux carats 34090 montpellier france pears.coop" | ||
} | ||
] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
apps/back-end/test/data/datasets/test-A/search/a:foo/b:bar/text.json
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters