inasafe / inasafe

InaSAFE - QGIS plugin for estimating impact from natural disasters
www.inasafe.org
GNU General Public License v3.0
259 stars 135 forks source link

Next plugin version? #310

Closed maning closed 10 years ago

maning commented 12 years ago

Is there a target timeline to get the 0.5 version via QGIS Plugin repository? Or, what is the procedure to compile on my own?

misugijunz commented 12 years ago

Hi, (I assume you are using linux)

you can follow these step-by-steps procedure: http://inasafe.org/developer-docs/platform_linux.html

Usually, after installing the fresh code from repository you need to sym link the sandbox folder to inside qgis plugin folder directory

maning commented 12 years ago

Following this section: http://inasafe.org/developer-docs/platform_linux.html#quick-installation-guide-linux-debian-based

I downloaded the inasafe-dev.0.5.0alpha2.zip — InaSAFE v0.5.0 release candidate. Unzip and run:

make test
make: *** No rule to make target `test'.  Stop.
misugijunz commented 12 years ago

inside what folder do you run the test?

maning commented 12 years ago

Following the docs, I tried the main inasafe-dev directory. Trying with inasafe-dev/safe_qgis, I get mostly PEP8 errors:

~/Downloads/inasafe-dev/safe_qgis (1.957 Mb)
! make test
----------------------
Regresssion Test Suite
----------------------
nosetests -v --with-id --with-coverage --cover-package=.
make: nosetests: No such file or directory
make: [test_suite] Error 1 (ignored)

-----------
PEP8 issues
-----------
pep8 --repeat --ignore=E203 --exclude help_base.py,dock_base.py,resources.py,resources_rc.py .
./clipper.py:41:28: E128 continuation line under-indented for visual indent
./clipper.py:42:28: E128 continuation line under-indented for visual indent
./clipper.py:131:17: E128 continuation line under-indented for visual indent
./clipper.py:157:16: E128 continuation line under-indented for visual indent
./clipper.py:182:16: E128 continuation line under-indented for visual indent
./clipper.py:183:13: E128 continuation line under-indented for visual indent
./clipper.py:212:19: E128 continuation line under-indented for visual indent
./clipper.py:292:16: E128 continuation line under-indented for visual indent
./clipper.py:300:12: E128 continuation line under-indented for visual indent
....
./utilities.py:411:15: E128 continuation line under-indented for visual indent
./utilities.py:422:13: E128 continuation line under-indented for visual indent
./utilities.py:445:12: E128 continuation line under-indented for visual indent
make: *** [pep8] Error 1
misugijunz commented 12 years ago

'make test' or 'make quicktest' is intended to run tests suite and checking the python coding guideline (applied pep8/pylint) whether is it followed or not. Please try 'make quicktest'

maning commented 12 years ago

I get this:

~/Downloads/inasafe-dev/safe_qgis
! make quicktest
make: *** No rule to make target `quicktest'.  Stop.
misugijunz commented 12 years ago

trying under the inasafe-dev folder not from safe_qgis

maning commented 12 years ago

Same error:

~/Downloads/inasafe-dev
! make quicktest
make: *** No rule to make target `quicktest'.  Stop.
ismailsunni commented 12 years ago

@maning if you download inasafe-dev.0.5.0alpha2.zip — InaSAFE v0.5.0 release candidate from https://github.com/AIFDR/inasafe/downloads you won't be able to do the make test or make quick test since there is not Makefile inside the zip file.

I don't see why you download the inasafe-dev.0.5.0alpha2.zip — InaSAFE v0.5.0 release candidate , since there is not any step mention it in http://inasafe.org/developer-docs/platform_linux.html#quick-installation-guide-linux-debian-based

My advice, just follow the step http://inasafe.org/developer-docs/platform_linux.html#quick-installation-guide-linux-debian-based if you want the development mode of InaSAFE

maning commented 12 years ago

Following the install_safe script, the source was downloaded from git but the symlink created was /home/maning/inasafe-dev instead of the /home/maning/sandobx/safe-dev.

~/sandbox ~/sandbox
From github.com:AIFDR/inasafe
 * branch            master     -> FETCH_HEAD
Already on 'master'
~/sandbox
Create symlink /home/maning/inasafe-dev from QGis plugin area
~/.qgis/python/plugins ~/sandbox
~/sandbox
Downloading test and demo data
dir /home/maning/inasafe-dev
-bash: pushd: /home/maning/inasafe-dev: No such file or directory
make: *** No rule to make target `testdata'.  Stop.
-bash: popd: directory stack empty

Congratulations, you have installed InaSAFE - QGIS

To verify that the installation works, you can run the test suite
cd /home/maning/inasafe-dev

Then compiling with in /home/maning/sandbox/inasafe-dev with make quicktest, I get these:

~/sandbox/inasafe-dev$ make quicktest
Bearing due west (270 deg) is correct within double precision ... ok
Bearing due north (0 deg) correct within double precision ... ok
Bearing due south (180 deg) is correct within double precision ... ok
Bearing due west (270 deg) is correct within double precision ... ok
Distance and bearing of real example (quake -> Muncar) are correct ... ok
Distance and bearing of real example (RSISE -> Home) are correct ... ok
Distance and bearing of real example (RSISE -> Kbh) are correct ... ok
Distance and bearing of real example (RSISE -> Nadi) are correct ... ok
Distance and bearing of real example (RSISE -> Syd) are correct ... ok
Distance and bearing of real example (near equator) are correct ... ok
A circle with a given radius can be generated correctly ... ok
Interpolation library works for 1D piecewise constant function ... ok
Interpolation library works for a 1D linear function - basic test ... ok
Interpolation library works for piecewise constant function ... ok
Interpolation library returns NaN for incomplete grid points ... ok
Interpolation library works for raster data ... ok
Interpolation library works for linear function - basic test ... ok
Interpolation library works (linear mode) with grid points being NaN ... ok
Interpolation library works with interpolation points being NaN ... ok
Grid axes can be converted to point coordinates for all pixels ... ok
Raster grids can be converted to point data ... ok
Corner case where all points are inside polygon works ... ok
Corner case where all points are outside polygon works ... ok
Composite lines are clipped and classified by polygon ... ok
Polygon line clipping works for special cases ... ok
Simple lines are clipped and classified by polygon ... ok
Multiple composite lines are clipped by multiple polygons ... ok
Multiple composite lines are clipped and classified by polygon ... ok
Polygons can have duplicate points without problems ... ok
Set of points is correctly separated according to polygon (2) ... ok
Points can be classified as either inside or outside polygon (2) ... ok
Indices of points inside polygon are correct ... ok
Intersection of two simple lines works ... ok
Intersection point is independent of direction ... ok
Intersection point is independent of direction (2) ... ok
Intersection of lines with coinciding endpoints works ... ok
Parallel lines are correctly detected in intersection code ... ok
Points are classified as either inside polygon or not ... ok
Consecutive line segments can be joined into continuous line ... ok
Lines that don't intersect return None as expected ... ok
Points are classified as either outside polygon or not ... ok
Points are classified as either outside polygon or not (2) ... ok
Points coinciding with lines are correctly detected ... ok
Points coinciding with lines are correctly detected (vector version) ... ok
Polygon clipping checks input as expected ... ok
Polygon can be populated by random points ... ok
Points can be separated by polygon ... ok
Set of points is correctly separated according to polygon ... ok
Numpy version of polygon clipping agrees with python version ... ok
Points on polygon edge correctly detected ... ok
Vectorised intersection of multiple lines works 1 ... ok
Vectorised intersection of multiple lines works 2 ... ok
Test we can make a cell as a <th> element ... ok
Test cell links work ... ok
Testing column spanning ... ok
Test to retrieve all element in a column. ... ok
Test nested table in cell ... ok
Test row from string - it should span to the table width too ... ok
Testing row spanning ... ok
Test simple table creation ... ok
Test table from infividual rows ... ok
Test table caption ... ok
Test table from individual cells ... ok
Test table from string - should be a single cell in a single row ... ok
Table columns can be right justified ... ok
Test html render of a table with header row(s). ... ok
Fatalities from ground shaking can be computed correctly ... ERROR 4: `/home/maning/sandboxinasafe_data/test/itb_test_mmi.asc' does not exist in the file system,
and is not recognised as a supported dataset name.

ERROR

======================================================================
ERROR: Fatalities from ground shaking can be computed correctly
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/maning/sandbox/inasafe-dev/safe/engine/test_engine.py", line 195, in test_ITB_earthquake_fatality_estimation
H = read_layer(hazard_filename)
  File "/home/maning/sandbox/inasafe-dev/safe/storage/core.py", line 26, in read_layer
return Raster(filename)
  File "/home/maning/sandbox/inasafe-dev/safe/storage/raster.py", line 80, in __init__
self.read_from_file(data)
  File "/home/maning/sandbox/inasafe-dev/safe/storage/raster.py", line 161, in read_from_file
raise ReadLayerError(msg)
ReadLayerError: Could not find file /home/maning/sandbox/inasafe_data/test/itb_test_mmi.asc

----------------------------------------------------------------------
Ran 67 tests in 0.268s

FAILED (errors=1)
make: [test_suite_quick] Error 1 (ignored)

-----------
PEP8 issues
-----------
/bin/bash: pep8: command not found

-----------------
Pylint violations
-----------------
/bin/bash: pylint: command not found

------------------------------------------------
List of unwanted dependencies in InaSAFE library
------------------------------------------------

------------------------------
Strings that should be deleted
------------------------------

-----------------------------------
Audit of IP status for bundled data
-----------------------------------

----------------------------------------------------------------
Missing translations - for more info run: make translation-stats
----------------------------------------------------------------
maning commented 12 years ago

It seems everything is working now using the inasafe_install script. One minor bug is the symlink from the inasafe-dev directory to the .qgis/python/plugins (https://github.com/AIFDR/inasafe/blob/master/scripts/inasafe-install#L80). Particularly when the repository is cloned in a different path.

uniomni commented 12 years ago

Great thanks.

I think the problem for some reason is that the .qgis dir is owned by root. This used to work well, but perhaps we just need to change ownership?

maning commented 12 years ago

No, my .qgis is owned by the logged user (me).

uniomni commented 12 years ago

Will ship 0.5.x today