Skip to content
This repository has been archived by the owner on Jun 14, 2021. It is now read-only.
alexprengere edited this page Mar 13, 2013 · 14 revisions

Currently you will see that version numbers update quickly, thanks to all the feedback we are getting at the moment! Thanks!

You can check out the latest news on the twitter account. There is a develop branch containing the next release of GeoBases, otherwise use the public branch for the stable version.

V5 release

Summary

The version 5 of GeoBases is now available. You can check the not-user-friendly-release-notes here.

Main stuff for this new version:

  • sub-indexes
  • join clauses (check Join clauses tutorial)
  • better zsh autocomplete
  • admin mode: GeoBase --admin (check Admin mode tutorial)
  • learning mode: GeoBase --ask
  • phonetic search: GeoBase --phonetic Roma
  • graph display: GeoBase --graph

Upgrade guide

Python API

There are some backward incompatible changes. Most of them concern methods renaming for better consistency accross the API:

  • methods named get_something are simple data fetching in the main structure
  • methods named find_something are methods iterating over the structre to find something having some properties (or using an index, geographical or not)

In a nutshell:

  • fuzzyGet is now fuzzyFind
  • fuzzyGetCached is now fuzzyFindCached
  • getKeysWhere is now findWith
  • getLocation now raises KeyError on unknown key (do not swallow all exceptions anymore)
  • set and setFromDict have been combined into one set method, using the keyword argument syntax to add several fields, like set('the_key', name='the_name', lat=42)

That's about it for the backward incompatible stuff for the Python API.

Configuration file

There are some internal changes who should not affect end users (only if you play with the file defining all data sources):

  • source option is now paths and supports mode complex sources
  • indexes option is now key_fields (to define the key columns)

Command line interface

For the command line interface, here is a list of things that might break existing stuff:

  • -w/--warnings is now -v/--verbose
  • -v/--version is now -V/--version
  • -g/--gridless is now -d/--disable-grid
  • -A/--any is now -O/--or
  • -E/--exact-property is now -E/--exact-field
  • -F/--fuzzy-property is now -F/--fuzzy-field
  • -P/--phonetic-property is now -P/--phonetic-field
  • -u/--update and -U/--update-force have been removed, use -A/--admin instead

New stuff

Python API

New methods have appeared too:

  • addIndex, dropIndex, updateIndex, hasIndex to play with indexes
  • addGrid, dropGrid, updateGrid, hasGrid to play with the geographical indexation
  • phonemes, phoneticFind to perform phonetic searches
  • hasJoin, getJoinBase, new ext_field parameter for get, to play with join clauses
  • empty delimiter is allowed and splits on every character
  • __gar__ is no longer flatten, and now a is list of uncollected data
  • visualization methods have a new output_dir argument to change the directory of temporary files
  • syncFields, a method to synchronize global fields from underlying data

Configuration file

For the configuration file, some new options:

  • skip to skip the first lines of a file
  • limit to limit the number of loaded lines
  • indices to define single or multiple indices on fields
  • join to define join clauses between sources
  • url and zip archives are allowed as sources, temporary files are put in a cache directory

Command line interface

For the command line interface, here are the notables changes:

  • new -g/--graph display, configurable with -G/--graph-fields, -W/--graph-weight, -w/--with-types:
  • nodes are data from fields defined with -G/--graph-fields
  • edges weight is defined with -W/--graph-weight
  • -w/--with-types toggles typed nodes, meaning we create separate nodes for data from separate fields
  • new -D/--output-dir option to change the temporary files directory of --map and --graph
  • enhance -i/--indexation possibilities to define join clauses and subdelimiters (check --help)
  • to display join fields from external base, use the --show field:external_field syntax, for example GeoBase --show country_code:name will use the join clause on the country_code to get the name of the country in the countries source
  • new -S/--show-additional option to add new fields to the default display (whereas -s/--show field1 field2 displays only field1 and field2, this new option would add field1 and field2 to the default displayed fields)
  • new admin mode with -A/--admin to configure sources (persistent changes)
  • new learning mode with -a/--ask to learn of the CLI works