News - opentraveldata/geobases GitHub Wiki
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:
fuzzyGetis nowfuzzyFindfuzzyGetCachedis nowfuzzyFindCachedgetKeysWhereis nowfindWithgetLocationnow raisesKeyErroron unknown key (do not swallow all exceptions anymore)setandsetFromDicthave been combined into onesetmethod, using the keyword argument syntax to add several fields, likeset('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):
sourceoption is nowpathsand supports mode complex sourcesindexesoption is nowkey_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/--warningsis now-v/--verbose-v/--versionis now-V/--version-g/--gridlessis now-d/--disable-grid-A/--anyis now-O/--or-E/--exact-propertyis now-E/--exact-field-F/--fuzzy-propertyis now-F/--fuzzy-field-P/--phonetic-propertyis now-P/--phonetic-field-u/--updateand-U/--update-forcehave been removed, use-A/--admininstead
New stuff
Python API
New methods have appeared too:
addIndex,dropIndex,updateIndex,hasIndexto play with indexesaddGrid,dropGrid,updateGrid,hasGridto play with the geographical indexationphonemes,phoneticFindto perform phonetic searcheshasJoin,getJoinBase, newext_fieldparameter forget, 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_dirargument 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:
skipto skip the first lines of a filelimitto limit the number of loaded linesindicesto define single or multiple indices on fieldsjointo 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/--graphdisplay, 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-typestoggles typed nodes, meaning we create separate nodes for data from separate fields- new
-D/--output-diroption to change the temporary files directory of--mapand--graph - enhance
-i/--indexationpossibilities to define join clauses and subdelimiters (check--help) - to display join fields from external base, use the
--show field:external_fieldsyntax, for exampleGeoBase --show country_code:namewill use the join clause on thecountry_codeto get thenameof the country in thecountriessource - new
-S/--show-additionaloption to add new fields to the default display (whereas-s/--show field1 field2displays onlyfield1andfield2, this new option would addfield1andfield2to the default displayed fields) - new admin mode with
-A/--adminto configure sources (persistent changes) - new learning mode with
-a/--askto learn of the CLI works