Skip to content
Permalink
Browse files

Add CONTRIBUTING.md

  • Loading branch information...
kernc committed Apr 24, 2017
1 parent 3dd33dd commit 648afda7f021881e7a0151685a9bca0622e7408e
Showing with 67 additions and 1 deletion.
  1. +51 −0 CONTRIBUTING.md
  2. +8 −0 README.md
  3. +8 −1 orangecontrib/geo/mapper.py
@@ -0,0 +1,51 @@
Contributing guidelines
=======================

Guidelines:

1. Approximately adhere to [Orange's contributing guidelines].

[Orange's contributing guidelines]: https://github.com/biolab/orange3/blob/master/CONTRIBUTING.md


Building missing GeoJSON files
------------------------------

Due to its size, GeoJSON files aren't tracked in the same repository branch.
Built JSONs can be found in _json_ branch. You can merge the files into your
current development branch with:

git checkout topic-branch
git checkout json orangecontrib/geo/geojson/*.json
git reset HEAD orangecontrib/geo/geojson/*.json

When re-building the JSON files due to upstream region shape changes, the
following should work:

git checkout master
git branch -D json
git checkout --orphan json
git reset HEAD .

cd orangecontrib/geo/geojson
./make-geojson.sh

git add admin*.json
git commit -m "Add binary GeoJSON files"

# force-push to overwrite remote binary json branch
git push --force

When building the source distribution package, the following workflow
works for me:

git checkout master
git checkout -b build
git checkout json orangecontrib/geo/geojson/*.json
git reset HEAD .
python setup.py sdist
# ... upload built tgz
git checkout --force master
git branch -D build
@@ -4,3 +4,11 @@ Orange3-Geo
[Orange] add-on for dealing with geography and geo-location.

[Orange]: http://orange.biolab.si


Installing
----------
Installing from source requires merging GeoJSON files from _json_ branch.
See [CONTRIBUTING] for more info.

[CONTRIBUTING]: ./CONTRIBUTING.md
@@ -37,7 +37,14 @@ def _admin_cc(filename):
cc_shapes = {}
id_regions = {}
us_states = {}
for filename in glob(path.join(GEOJSON_DIR, 'admin*.json')):

files = glob(path.join(GEOJSON_DIR, 'admin*.json'))
if not files:
raise RuntimeError('Missing GeoJSON files. '
'In development environments, merge in the "json" '
'branch. See CONTRIBUTING.md')

for filename in files:
admin, cc = _admin_cc(filename)

with open(filename) as f:

0 comments on commit 648afda

Please sign in to comment.
You can’t perform that action at this time.