Skip to content

Commit

Permalink
Trying to use local version of schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Meems committed Mar 14, 2019
1 parent 5d18521 commit 27ed46a
Show file tree
Hide file tree
Showing 24 changed files with 1,662 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

pushd %~dp0

REM Paul Meems: Copy schema files to schema folder in documentation:
xcopy /D /Y ..\schema\*.json source\_static\schema\

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
Expand Down
291 changes: 291 additions & 0 deletions docs/source/_static/schema/address.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,291 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/andrejellema/GlobalCoffeeDataStandard/master/schema/address.json",
"title": "The address",
"description": "An address. This is the legally registered address.",
"type": "object",
"additionalProperties": false,
"required": [
"countryName"
],
"properties": {
"streetAddress": {
"title": "Street address",
"description": "The street address. For example, 1600 Amphitheatre Pkwy.",
"type": "string"
},
"postalCode": {
"title": "Postal code",
"description": "The postal code. For example, 94043.",
"type": "string"
},
"locality": {
"title": "Locality",
"description": "The locality. For example, Mountain View.",
"type": "string"
},
"region": {
"title": "Region",
"description": "The region. For example, CA.",
"type": "string"
},
"countryName": {
"title": "Country name",
"description": "The country name. For example, United States.",
"type": "string",
"$comment": "List of countries from http://country.io/names.json",
"enum": [
"Afghanistan",
"Aland Islands",
"Albania",
"Algeria",
"American Samoa",
"Andorra",
"Angola",
"Anguilla",
"Antarctica",
"Antigua and Barbuda",
"Argentina",
"Armenia",
"Aruba",
"Australia",
"Austria",
"Azerbaijan",
"Bahamas",
"Bahrain",
"Bangladesh",
"Barbados",
"Belarus",
"Belgium",
"Belize",
"Benin",
"Bermuda",
"Bhutan",
"Bolivia",
"Bonaire, Saint Eustatius and Saba ",
"Bosnia and Herzegovina",
"Botswana",
"Bouvet Island",
"Brazil",
"British Indian Ocean Territory",
"British Virgin Islands",
"Brunei",
"Bulgaria",
"Burkina Faso",
"Burundi",
"Cambodia",
"Cameroon",
"Canada",
"Cape Verde",
"Cayman Islands",
"Central African Republic",
"Chad",
"Chile",
"China",
"Christmas Island",
"Cocos Islands",
"Colombia",
"Comoros",
"Cook Islands",
"Costa Rica",
"Croatia",
"Cuba",
"Curacao",
"Cyprus",
"Czech Republic",
"Democratic Republic of the Congo",
"Denmark",
"Djibouti",
"Dominica",
"Dominican Republic",
"East Timor",
"Ecuador",
"Egypt",
"El Salvador",
"Equatorial Guinea",
"Eritrea",
"Estonia",
"Ethiopia",
"Falkland Islands",
"Faroe Islands",
"Fiji",
"Finland",
"France",
"French Guiana",
"French Polynesia",
"French Southern Territories",
"Gabon",
"Gambia",
"Georgia",
"Germany",
"Ghana",
"Gibraltar",
"Greece",
"Greenland",
"Grenada",
"Guadeloupe",
"Guam",
"Guatemala",
"Guernsey",
"Guinea",
"Guinea-Bissau",
"Guyana",
"Haiti",
"Heard Island and McDonald Islands",
"Honduras",
"Hong Kong",
"Hungary",
"Iceland",
"India",
"Indonesia",
"Iran",
"Iraq",
"Ireland",
"Isle of Man",
"Israel",
"Italy",
"Ivory Coast",
"Jamaica",
"Japan",
"Jersey",
"Jordan",
"Kazakhstan",
"Kenya",
"Kiribati",
"Kosovo",
"Kuwait",
"Kyrgyzstan",
"Laos",
"Latvia",
"Lebanon",
"Lesotho",
"Liberia",
"Libya",
"Liechtenstein",
"Lithuania",
"Luxembourg",
"Macao",
"Macedonia",
"Madagascar",
"Malawi",
"Malaysia",
"Maldives",
"Mali",
"Malta",
"Marshall Islands",
"Martinique",
"Mauritania",
"Mauritius",
"Mayotte",
"Mexico",
"Micronesia",
"Moldova",
"Monaco",
"Mongolia",
"Montenegro",
"Montserrat",
"Morocco",
"Mozambique",
"Myanmar",
"Namibia",
"Nauru",
"Nepal",
"Netherlands",
"New Caledonia",
"New Zealand",
"Nicaragua",
"Niger",
"Nigeria",
"Niue",
"Norfolk Island",
"North Korea",
"Northern Mariana Islands",
"Norway",
"Oman",
"Pakistan",
"Palau",
"Palestinian Territory",
"Panama",
"Papua New Guinea",
"Paraguay",
"Peru",
"Philippines",
"Pitcairn",
"Poland",
"Portugal",
"Puerto Rico",
"Qatar",
"Republic of the Congo",
"Reunion",
"Romania",
"Russia",
"Rwanda",
"Saint Barthelemy",
"Saint Helena",
"Saint Kitts and Nevis",
"Saint Lucia",
"Saint Martin",
"Saint Pierre and Miquelon",
"Saint Vincent and the Grenadines",
"Samoa",
"San Marino",
"Sao Tome and Principe",
"Saudi Arabia",
"Senegal",
"Serbia",
"Seychelles",
"Sierra Leone",
"Singapore",
"Sint Maarten",
"Slovakia",
"Slovenia",
"Solomon Islands",
"Somalia",
"South Africa",
"South Georgia and the South Sandwich Islands",
"South Korea",
"South Sudan",
"Spain",
"Sri Lanka",
"Sudan",
"Suriname",
"Svalbard and Jan Mayen",
"Swaziland",
"Sweden",
"Switzerland",
"Syria",
"Taiwan",
"Tajikistan",
"Tanzania",
"Thailand",
"Togo",
"Tokelau",
"Tonga",
"Trinidad and Tobago",
"Tunisia",
"Turkey",
"Turkmenistan",
"Turks and Caicos Islands",
"Tuvalu",
"U.S. Virgin Islands",
"Uganda",
"Ukraine",
"United Arab Emirates",
"United Kingdom",
"United States Minor Outlying Islands",
"United States",
"Uruguay",
"Uzbekistan",
"Vanuatu",
"Vatican",
"Venezuela",
"Vietnam",
"Wallis and Futuna",
"Western Sahara",
"Yemen",
"Zambia",
"Zimbabwe"
]
}
}
}
23 changes: 23 additions & 0 deletions docs/source/_static/schema/average-price.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/andrejellema/GlobalCoffeeDataStandard/master/schema/average-price.json",
"title": "Average Price",
"type": "object",
"additionalProperties": false,
"required": [
"totalCoffeeRevenue",
"kgSold"
],
"properties": {
"totalCoffeeRevenue": {
"title": "Total coffee revenue",
"type": "number",
"minimum": 0
},
"kgSold": {
"title": "kg of GBE sold",
"type": "number",
"minimum": 0
}
}
}
28 changes: 28 additions & 0 deletions docs/source/_static/schema/child-labor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/andrejellema/GlobalCoffeeDataStandard/master/schema/child-labor.json",
"title": "Child labour",
"type": "object",
"additionalProperties": false,
"required": [
"schoolAgeHouseholdMembers",
"hazardousProhibition"
],
"properties": {
"schoolAgeHouseholdMembers": {
"title": "School-age household members",
"description": "% of school-age household members, under age 18, who have completed appropriate grade level for their age",
"minimum": 0,
"maximum": 100
},
"hazardousProhibition": {
"title": "Prohibition of children in hazardous working conditions",
"description": "Are young workers (those under age 18) working in hazardous conditions (applying chemical pesticides, using hazardous machinery, moving excessive weights/loads, etc.)",
"type": "string",
"enum": [
"Yes",
"No"
]
}
}
}
26 changes: 26 additions & 0 deletions docs/source/_static/schema/costs-definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/andrejellema/GlobalCoffeeDataStandard/master/schema/costs-definitionjson",
"title": "Costs definition",
"description": "The simple approach asks only about the main costs in the production system that typically account for the vast majority of total costs (and the total amount spent on each during the last production year).",
"type": "object",
"additionalProperties": false,
"required": [
"amount",
"percentage"
],
"properties": {
"amount": {
"title": "The amount of the cost",
"type": "number",
"minimum": 0
},
"percentage": {
"title": "The portion used for coffee production",
"description": "Costs should be associated with the coffee production only (i.e., if labor is hired for multiple crops, only the portion used for coffee production should be included). One way to make sure that costs are correctly associated with the production of the coffee is to ask for the percent of inputs that were used for the coffee.",
"type": "number",
"minimum": 0,
"maximum": 100
}
}
}

0 comments on commit 27ed46a

Please sign in to comment.