Vaclav Petras | 26 Jul 06:35 2014
Picon

Weekly report 10: Testing framework for GRASS GIS

1. What did you get done this week?

I significantly improved the test file page which is the central page of the report in the sense that there you can get all the details. I also added details about successful and failed (individual) tests to main index page (the one with links to all test files). Additionally, I created different set of pages which sorts the test files from the point of view of testsuite directories which might be the primary way of browsing tests since it is aligned with how tests are included in the source code. The page for a given testsuite also contains approximate information about authors of tests and authors of tested code.

Each test file has now a key-value file which contains information about success, number of tests, and other information. These files can and are collected to obtain summaries. The key-value format was selected mainly because of its usage in GRASS GIS (otherwise, for example Python documentation for inputs and outputs recommends JSON [1]).

I believe that I designed report classes in the way that they can be extended but already I can see some room for refactoring or at least for better organization. This might be a topic for week 13.

I did not created any XML output. The situation seems unclear and a lot of transformations are done to get XML working with different tools. On the other hand, with some tools even trivial XML with numbers (test statistics) should work and this should be easy to create from key-value files or directly. Also there is a unittest-xml-reporting package [2] for Python `unittest` which should create XML in the style of Ant/JUnit. In theory this should work directly with `gunittest`. I was not considering database output much but I think that it is not needed now and it can be created from key-value files if necessary.

A also did not focus on CSS of the HTML reports. They are readable but that's all. Some CSS might be added in the future.

There is currently 20 successfully running test files and 5 failing test files, 9 successfully running testsuites and 4 failing testsuites, and 686 successfully running tests and 7 failing tests (533 of the tests are from PyGRASS module test).

I also added some tests for `r.mapcalc` `rand()` function and new behavior with seed in r61355.

See the project wiki page for screenshots and more detailed description of the test report or obtain one yourself running:

# in the grass souce code directory, in grass session
python -m grass.gunittest.main gisdbasepath nc_smp_location_name nc
# open file "testreport/index.html" or "testreport/testsuites.html"

2. What do you plan on doing next week?

I plan to rewrite some of the existing tests using `gunittest` or write new ones. I already started to write something for `r.slope.aspect` and `r.mapcalc`.

If time allows, I would like to add some key-value summary files to reports, include some test metadata such as GRASS location or architecture, and also introduce more options to report generation (currently, it cannot be configured).

Additionally, It would be nice to have all path in files shortened so that they don't include `dist...` or full path to the file and also it would be nice to have an example of running the tests automatically in some trivial form.

3. Are you blocked on anything?

I think that some CSS and JavaScript can improve the reports significantly but I did not included any nice design to HTML pages because it would cost me too much time (and it was not part of the GSoC plan anyway).

Wiki with screenshots:
http://trac.osgeo.org/grass/wiki/GSoC/2014/TestingFrameworkForGRASS#Week10

[1] https://docs.python.org/2/tutorial/inputoutput.html#saving-structured-data-with-json
[2] https://github.com/xmlrunner/unittest-xml-reporting

_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
Anna Petrášová | 26 Jul 05:22 2014
Picon

Week 10: GRASS GIS 3D flowlines

Hi,

1. What did you get done this week:
I updated documentation and added flowline integration in both directions. I wrote tests (using the new testing framework) and I must still add more.

2. What do you plan on doing next week?
There are couple of options. I will experiment with different tile cache settings if any particular one would behave better. Another thing is to change the writing of the flow line vector to include the velocity value in table. Depending on time, I would like to implement r3.gradient module based on the already implemented gradient function.

3. Are you blocked on anything?
The tests broke the r3.flow compilation when the addon is installed through g.extension. So I reverted the Makefile for now, but this issue is not solved.

Anna

[1] http://trac.osgeo.org/grass/wiki/GSoC/2014/ImplementationOf3DRasterFlowLine
[2] http://trac.osgeo.org/grass/browser/grass-addons/grass7/raster3d/r3.flow
_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
Matej Krejci | 25 Jul 23:22 2014
Picon

<gsoc2014> <grass metadata> <week 10>

Hi all,

Below is my weekly report:

<work done>
  • fixed some bugs:
    • in xml exporting module
    • in wx metadata generator
  • created and tested modified jinja template for inspire and grass profile
  • worked on GUI features in g.gui.metadata
  • added and connected data-catalog
  • started with text input validator
<work to be done in the next week>
  • to create validators of text inputs
  • to start on implementation of multiple editing metadata of maps 
  • testing editor
  • consulting GUI design 
<blocks>
no


Best regards,
Matej
_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
GRASS GIS | 25 Jul 21:07 2014

[GRASS GIS] #2381: lighting/shading for vector objects backward in nviz

#2381: lighting/shading for vector objects backward in nviz
-------------------------+--------------------------------------------------
 Reporter:  cmbarton     |       Owner:  grass-dev <at> …              
     Type:  defect       |      Status:  new                      
 Priority:  normal       |   Milestone:  7.1.0                    
Component:  Tcl/Tk NVIZ  |     Version:  svn-trunk                
 Keywords:               |    Platform:  Unspecified              
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------
 I just tried to display a map with an overlay of vector points and they
 all looked black, regardless of the color I chose. Turns out that when the
 view is from the SE and the light is also from the SE (both defaults), the
 vector spheres are in shadow. If I switch the light to the NW, the face of
 the spheres are lit--but of course the shadows on the surface are going
 the other way. This reversal also applies to light height. When the light
 is low, a sphere is lit from the top; when the light is high, there is
 very oblique lighting--again reversed from the surface. So there is a
 flipped variable somewhere.

 I've attached a screenshot of a surface and points with a view from the SE
 and lighting from the SE. The shadows on the surface are to the NW
 (correct), but the spheres in completely in shadow (incorrect).

--

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2381>
GRASS GIS <http://grass.osgeo.org>

_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
GRASS GIS | 25 Jul 20:26 2014

[GRASS GIS] #2380: d.legend "use" argument makes legend disappear

#2380: d.legend "use" argument makes legend disappear
-------------------------+--------------------------------------------------
 Reporter:  cmbarton     |       Owner:  grass-dev <at> …              
     Type:  defect       |      Status:  new                      
 Priority:  normal       |   Milestone:  7.1.0                    
Component:  Display      |     Version:  svn-trunk                
 Keywords:  d.legend     |    Platform:  Unspecified              
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------
 If I put a list of values into d.legend use= , the legend disappears in
 the GUI and the attribute GUI cannot be opened again. Not sure if this is
 a d.legend problem, a GUI problem, or a combination.

--

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2380>
GRASS GIS <http://grass.osgeo.org>

_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
Martin Zbinden | 25 Jul 10:50 2014
Picon

r.in.wcs, r.soillossbare: Added my first addons, issues with g.extension

Hi everybody,

I just wanted to tell you that uploaded my first two addons for G7:
- r.in.wcs : Import data for region from WCS-server
- r.soillossbare: Calculate soilloss for bare soil according to
Neteler & Mitasova, 2008 [1]

Well, I'm open to read your feedback and learn from it. I know that it
is not yet real GRASS 7 code as I wanted to maintain some
G6-compatibility. Maybe I  should rewrite everything using pygrass.

Generally it seems to install and work. Surely there are still some
issues to solve. The first comes already during install:

Fetching <r.in.wcs> from GRASS-Addons SVN (be patient)...
Compiling...
/bin/sh: 1: cannot create /usr/local/grass-7.0.0svn/locale/s
criptstrings/r.in.wcs_to_translate.c: Directory nonexistent
sed: couldn't flush stdout: Datenübergabe unterbrochen
(broken pipe)
make: [/usr/local/grass-7.0.0svn/locale/scriptstrings/r.in.w
cs_to_translate.c] Fehler 2 (ignoriert)
Installing...
Updating metadata file...
WARNING: No metadata available
Installation of <r.in.wcs> successfully finished

Why does g.extension try to write to /usr/local , although I just want
to install for current user? Also, the minimal html doc has some
encoding problem. I have created it just with --html-description flag.

Thank you in advance for any hint.
Martin

sources:
[1] Markus Neteler and Helena Mitasova, 2008,
Open Source GIS: A GRASS GIS Approach. Third Edition.
--
Martin Zbinden
Riedacker 523
3154 Rüschegg Heubach
+41 78 628 28 82
_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
GRASS GIS | 24 Jul 16:58 2014

[GRASS GIS] #2379: g.gui.animation causes fatal IO error 11 (Resource temporarily unavailable) on X server

#2379: g.gui.animation causes fatal IO error 11 (Resource temporarily unavailable)
on X server
------------------------------------------------------------------------------------+
 Reporter:  wenzeslaus                                                              |       Owner:  grass-dev <at> …              
     Type:  defect                                                                  |      Status:  new                      
 Priority:  normal                                                                  |   Milestone:  7.1.0                    
Component:  wxGUI                                                                   |     Version:  svn-trunk                
 Keywords:  crash, data loss, rendering, m.nviz.image, 3D, g.gui.animation, d.rast  |    Platform:  Linux                    
      Cpu:  Unspecified                                                             |  
------------------------------------------------------------------------------------+
 Time to time g.gui.animation crashes the the whole user graphical session.
 The error is appearing randomly and I'm not able to reproduce it now
 although I got it yesterday and few months ago, too.

 I got the error with different data and on two different computers (on
 Fujitsu laptop another Dell desktop) both running Ubuntu 14.04 with Unity
 (which uses Compiz). I think that few months ago I got it also with Ubuntu
 12.04.

 The results seems to be different. Once the session was frozen but the
 computer was running. Another time the graphical session was ended and
 login screen appeared.

 I got the error when I had two animations in the animation tool but I'm
 not sure if this is really the cause. I'm also not sure if the problem is
 in 2D rendering, 3D rendering or wxPython. For example, it seemed to me
 that it is related to `m.nviz.image` but one 3D animation was rendered
 successfully and adding second animation which was 2D caused the crash.

 Here are the last error messages are (obtained by redirecting to a file).
 Honestly, I'm not sure if I used only `DEBUG=5` or also `WX_DEBUG=5`. This
 is few months old when I was able to repeated more than once. I'm not able
 to reproduce it now, although I got it.

 {{{
 ...
 D1/5: grass.script.core.start_command(): m.nviz.image --o
 transparency_value=0 position=0.58,0.87 format=ppm light_ambient=100
 resolution_fine=1 light_color=255:255:255 light_position=0.2,-0.79,0.98
 focus=2039,795,650 shininess_value=60.0 twist=0 bgcolor=255:255:255
 color_map=elevlid_hourly_172_glob_11.50 <at> foss4g_solar perspective=19
 elevation_map=elevlid_10_20_3ft <at> cc_lidar2013_solar
 output=/media/.../grassdata/nc_spf/foss4g_solar/.tmp/vubu32/4374.0/b64a48a130d2926bd13099cf559930db3fa3756d
 light_brightness=36 height=4985 zexag=1.0 size=796,472
 D1/5: grass.script.core.start_command(): m.nviz.image --o
 transparency_value=0 position=0.58,0.87 format=ppm light_ambient=100
 resolution_fine=1 light_color=255:255:255 light_position=0.2,-0.79,0.98
 focus=2039,795,650 shininess_value=60.0 twist=0 bgcolor=255:255:255
 color_map=elevlid_hourly_172_glob_11.00 <at> foss4g_solar perspective=19
 elevation_map=elevlid_10_20_3ft <at> cc_lidar2013_solar
 output=/media/.../grassdata/nc_spf/foss4g_solar/.tmp/vubu32/4374.0/aaf4dea3de504f40a5e251276126643357fac133
 light_brightness=36 height=4985 zexag=1.0 size=796,472

 ...


 D3/5: GS_ready_draw
 D3/5: GS_get_zrange(): min=280.89 max=503.013
 D3/5: GS_get_aspect(): left=0, right=795, top=471, bottom=0
 D3/5: GS_get_zrange(): min=280.89 max=503.013
 D3/5: GS_done_draw
 D3/5: GS_done_draw

 GRASS_INFO_MESSAGE(4462,4): m.nviz.image complete. File
 </media/.../grassdata/nc_spf/foss4g_solar/.tmp/vubu32/4374.0/f27c2642e0e5d71fbba04e6551611f507e5fe06a.ppm>
 created.
 GRASS_INFO_END(4462,4)
 XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server
 ":0.0"
       after 562 requests (562 known processed) with 0 events remaining.

 D2/5: G_file_name(): path = /media/.../grassdata/nc_spf/foss4g_solar
 D2/5: G_file_name(): path = /media/.../grassdata/nc_spf/foss4g_solar
 }}}

 I wanted to collect more information before reporting but now I got it on
 different machine and I was not able to get more information. First I also
 thought that it is a local hardware problem but now I got it with
 different machine, although both are running the same system, Ubuntu
 14.04.

--

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2379>
GRASS GIS <http://grass.osgeo.org>

_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
GRASS GIS | 24 Jul 06:05 2014

[GRASS GIS] #2378: t.list output lines mixed in wxGUI

#2378: t.list output lines mixed in wxGUI
----------------------------------------------+-----------------------------
 Reporter:  wenzeslaus                        |       Owner:  grass-dev <at> …              
     Type:  defect                            |      Status:  new                      
 Priority:  normal                            |   Milestone:  7.1.0                    
Component:  wxGUI                             |     Version:  svn-trunk                
 Keywords:  temporal, t.list, stdout, stderr  |    Platform:  Linux                    
      Cpu:  Unspecified                       |  
----------------------------------------------+-----------------------------
 When I use `t.list` in wxGUI Command console or from the generated dialog
 (form), I first get the section labels and then I get dataset names, so
 dataset are not printed in the right sections (i.e. mapsets).

 It works OK in the standard command line. First I think that the problem
 is in GUI but it behaves nicely with `g.mlist` (can it be just a lucky
 coincidence that it works?). So, I don't know.

 For example:

 {{{
 t.list columns=id,name
 }}}

 gives:

 {{{
 ----------------------------------------------
 Space time raster datasets with absolute time available in
 mapset <climate_2000_2012>:
 Space time raster datasets with relative time available in
 mapset <NagsHead_series>:
 precip_sum <at> climate_2000_2012|precip_sum
 tempmean <at> climate_2000_2012|tempmean
 tempmean_2010 <at> climate_2000_2012|tempmean_2010
 tempmean_F_summer <at> climate_2000_2012|tempmean_F_summer
 tempmean_seasonal <at> climate_2000_2012|tempmean_seasonal
 NagsHead_99_08 <at> NagsHead_series|NagsHead_99_08
 }}}

 instead of (obtained in command line):

 {{{
 ----------------------------------------------
 Space time raster datasets with absolute time available in mapset
 <climate_2000_2012>:
 precip_sum <at> climate_2000_2012
 tempmean <at> climate_2000_2012
 tempmean_2010 <at> climate_2000_2012
 tempmean_F_summer <at> climate_2000_2012
 tempmean_seasonal <at> climate_2000_2012
 Space time raster datasets with relative time available in mapset
 <NagsHead_series>:
 NagsHead_99_08 <at> NagsHead_series
 }}}

 While

 {{{
 g.mlist -p type=rast
 }}}

 works as expected:

 {{{
 ----------------------------------------------
 raster files available in mapset <NagsHead_series>:
 NH_1999_1m          NH_2002_1m_interp   NH_2005_1m          NH_2008_1m
 NH_2000_1m_interp   NH_2003_1m_interp   NH_2006_1m_interp
 NH_2008_1m_0.05
 NH_2001_1m          NH_2004_1m          NH_2007_1m
 raster files available in mapset <PERMANENT>:
 elev_state_500m
 }}}

 By the way, now I also see that `t.list` lists all mapsets while `g.mlist`
 just search path but this is for different ticket.

--

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2378>
GRASS GIS <http://grass.osgeo.org>

_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
GRASS GIS | 23 Jul 14:29 2014

[GRASS GIS] #2377: wxGUI mapswipe: refresh issue

#2377: wxGUI mapswipe: refresh issue
-------------------------+--------------------------------------------------
 Reporter:  neteler      |       Owner:  grass-dev <at> …              
     Type:  defect       |      Status:  new                      
 Priority:  normal       |   Milestone:  7.0.0                    
Component:  wxGUI        |     Version:  svn-releasebranch64      
 Keywords:  mapswipe     |    Platform:  Unspecified              
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------
 The current mapswipe versions in trunk and relbr7 have an display
 refresh issue in the "Mirror" mode.

 I have attached a screenshot (black "noise" generated from mouse
 movement).

--

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/2377>
GRASS GIS <http://grass.osgeo.org>

_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
Paulo van Breugel | 23 Jul 14:18 2014
Picon

compiling grass 7 fails, complains about not finding gdal (which however is there)

I am trying to compile grass 7, with configuration settings:

./configure --prefix=/usr/local/grass7 --enable-64bit --with-libs=/lib64 --with-sqlite --with-odbc --with-cairo --with-geos --with-cxx=yes --with-gdal=/usr/bin/gdal/bin/ --with-python=yes --with-wxwidgets=/usr/bin/wx-config --with-readline --with-freetype --with-freetype-includes=/usr/include/freetype2 --enable-largefile --with-motif --with-motif-includes=/usr/include --with-proj-share=/usr/share/proj --with-pthread --with-postgres --with-postgres-libs=/usr/include/postgresql/libpq --with-postgres-includes=/usr/include/postgresql --with-lapack --with-blas

It stops halfway, with  the error message below:

checking for gdal-config... /usr/local/gdal/bin/gdal-config
configure: error: *** Unable to locate GDAL library.

However, the gdal-config is there (and works without problem from the command line), the path has been defined in the .bashrc and .configure files in my home directory. Also, nothing has changed since the last time I compiles grass (successfully), so I am at loss what to do next. Any ideas?

_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
GRASS GIS | 23 Jul 13:52 2014

[GRASS GIS] #2376: Add p-value for regression slope in r series

#2376: Add p-value for regression slope in r series
-----------------------------------------+----------------------------------
 Reporter:  mastho                       |       Owner:  grass-dev <at> …              
     Type:  enhancement                  |      Status:  new                      
 Priority:  normal                       |   Milestone:                           
Component:  Raster                       |     Version:  unspecified              
 Keywords:  r.series p-value regression  |    Platform:  Unspecified              
      Cpu:  Unspecified                  |  
-----------------------------------------+----------------------------------
 The calculation of t-values has been added to r.series in r53742
 (method=tvalue). It would be nice to have also the corresponding p-values
 for the regression as method in r.series.

 Also discussed here:
 http://osgeo-org.1560.x6.nabble.com/Calculate-p-value-for-regression-

 slope-in-r-series-td5014228.html

--

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/2376>
GRASS GIS <http://grass.osgeo.org>

_______________________________________________
grass-dev mailing list
grass-dev <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Gmane