-
Notifications
You must be signed in to change notification settings - Fork 57
icss style guide
Philip (flip) Kromer edited this page May 9, 2012
·
1 revision
This is the collection of datasets and types from the infochimps data catalog
- Data sets' namespace should be: category.subcategory.source -- eg.
geo.location.foursquare
- Wherever possible, the data set name should be the pluralized name of the most applicable type -- eg.
places
,ufo_sightings
- Path to the file should match the namespace; the file name should match the data set name
- The response name should be chosen independently. They will often, but not necessarily, live near or in the same namespace as their data set:
encyclopedic.wikipedia.wikipedia_article
is returned byencyclopedic.wikipedia.dbpedia.wikipedia_articles
- You may put non-core types directly in the dataset's ICSS file (but use a fully-qualified name if the namespaces don't match)
- Write a good, multi-paragraph doc string or check in with the person who will author it.
- Are there messages present?
- The first line of a property's doc string (field's doc string) MUST be < 50 characters
- the remainder should be fully descriptive. One additional sentence is plenty.
- Be sure that structured types, map, array, etc, are sub-hashes (indented):
- good:
:type: { :type: 'array', :items: 'string' }
- bad:
:type: 'array', :items: 'string'
- good:
-
domain -- cat/subcat, eg
sports/baseball
- source -- the source slug: a short unique name for this provider
-
data set name -- a unique slug for this dataset, often but not always the pluralized name of the response type:
wikipedia_articles
ortopline
. - action -- the request to execute: search, show, list, etc
- Request name should be 'params'
- Request type should be bare (so it is namespaced)
Query params:
-
f.{whatever}
-- filter -
g.{whatever}
-- geolocator anchor -
lim.{whatever}
-- limiter -
l
-- layer -
out.
-
shape
-- data structure -
callback
-- json-p -
pretty
-- pretty-print -
wrapper
-- htmlwrapper
-
-
meta.{whatever}
-- meta-control (error, etc) -
vers.{whatever}
-- versioning -
apikey
-- authentication -
format is implied by normal HTTP accepts &/or extension but goliath figures that out
- The first line of a property's doc string (field's doc string) MUST be < 50 characters
- Include a period at the end of the doc.
- search (not search_nearby)
- show (not direct_lookup)
- list (contents by tile_id) (intersects is a special dataset, list is its verb)
Utility / Primitive calls:
- geo/utils ... geolocate is the verb
Digest::MD5.hexdigest("#{domain_slug}:#{domain_id}")
- Relationships should have explicit valence or explicit symmetry. That is,
same_as
is always symmetric.hyperlinks_to
andfollows
- reading the type name as "