[GRASS-dev] Python Unit-test On "r.basins.fill"

Hello all,

Luca, I am so sorry, for the very very big delay was having my finals, and today I finally completed writing test on r.basins.fill.

All, I am Sunveer Singh, 15 years old from India, Google Code-in 2017 Winner with OSGeo, I completed 16 tasks for GRASS GIS, within Google Code-in, and contributed test for r.info, i.vi, v.extract, v.univar, v.select, r.report, r.texture, v.vect.stats, r.recode, r.in.ascii and r.to.vect. And created a video on How to create a location: Link to Video.

Due to my finals, I was unable to contribute to GRASS, but know I will start Contributing again.

I have attached my test written in python for r.basins.fill. If any improvement is needed in the test, please let me know.

Thank You for Your Precious Time.

(attachments)

testrbf.py (2.64 KB)

···

Thank You

Sunveer
https://sunveersingh.github.io/

On 23 March 2018 at 04:12, Sunveer Singh <singhsunveer54@gmail.com> wrote:

Hello all,

Hi Sunveer,

Luca, I am so sorry, for the very very big delay was having my finals, and
today I finally completed writing test on r.basins.fill.

no problem, take care of your studies...

All, I am Sunveer Singh, 15 years old from India, Google Code-in 2017 Winner
with OSGeo, I completed 16 tasks for GRASS GIS, within Google Code-in, and
contributed test for r.info, i.vi, v.extract, v.univar, v.select, r.report,
r.texture, v.vect.stats, r.recode, r.in.ascii and r.to.vect. And created a
video on How to create a location: Link to Video.

Due to my finals, I was unable to contribute to GRASS, but know I will start
Contributing again.

I have attached my test written in python for r.basins.fill. If any
improvement is needed in the test, please let me know.

Great the test is working well with nc_spm8_08_grass7, but most of the
actual test [0] are run in nc_basic_spm_grass7 [1].
You should change some input data and also the name of some variable
like cnetwork or tnetwork because they aren't much clear.

Please if you need more help let me/us know

Thank You for Your Precious Time.

thanks to you

Thank You
Sunveer
https://sunveersingh.github.io/

[0] http://fatra.cnr.ncsu.edu/grassgistests/summary_report/nc/index.html
[1] https://grass.osgeo.org/sampledata/north_carolina/nc_basic_spm_grass7.tar.gz

--
ciao
Luca

www.lucadelu.org

Hi,

Thanks for the feedback, I have attached the complete working test, run on nc_basic_spm_grass7

(attachments)

testrbf.py (2.59 KB)

···

On Fri, Mar 23, 2018 at 10:07 PM, Luca Delucchi <lucadeluge@gmail.com> wrote:

On 23 March 2018 at 04:12, Sunveer Singh <singhsunveer54@gmail.com> wrote:

Hello all,

Hi Sunveer,

Luca, I am so sorry, for the very very big delay was having my finals, and
today I finally completed writing test on r.basins.fill.

no problem, take care of your studies…

All, I am Sunveer Singh, 15 years old from India, Google Code-in 2017 Winner
with OSGeo, I completed 16 tasks for GRASS GIS, within Google Code-in, and
contributed test for r.info, i.vi, v.extract, v.univar, v.select, r.report,
r.texture, v.vect.stats, r.recode, r.in.ascii and r.to.vect. And created a
video on How to create a location: Link to Video.

Due to my finals, I was unable to contribute to GRASS, but know I will start
Contributing again.

I have attached my test written in python for r.basins.fill. If any
improvement is needed in the test, please let me know.

Great the test is working well with nc_spm8_08_grass7, but most of the
actual test [0] are run in nc_basic_spm_grass7 [1].
You should change some input data and also the name of some variable
like cnetwork or tnetwork because they aren’t much clear.

Please if you need more help let me/us know

Thank You for Your Precious Time.

thanks to you

Thank You
Sunveer
https://sunveersingh.github.io/

[0] http://fatra.cnr.ncsu.edu/grassgistests/summary_report/nc/index.html
[1] https://grass.osgeo.org/sampledata/north_carolina/nc_basic_spm_grass7.tar.gz


ciao
Luca

www.lucadelu.org

Thank You
Sunveer
https://sunveersingh.github.io/

On 24 March 2018 at 03:33, Sunveer Singh <singhsunveer54@gmail.com> wrote:

Hi,

Hi Sunveer,

Thanks for the feedback, I have attached the complete working test, run on
nc_basic_spm_grass7

thanks a lot, submitted in r72546.
https://trac.osgeo.org/grass/changeset/72546

Thank You
Sunveer
https://sunveersingh.github.io/

--
ciao
Luca

www.lucadelu.org

Thanks a lot.

Now on which module should I write test?

Thank You
Sunveer
https://sunveersingh.github.io

On Sat, 24 Mar 2018, 14:37 Luca Delucchi, <lucadeluge@gmail.com> wrote:

On 24 March 2018 at 03:33, Sunveer Singh <singhsunveer54@gmail.com> wrote:

Hi,

Hi Sunveer,

Thanks for the feedback, I have attached the complete working test, run on
nc_basic_spm_grass7

thanks a lot, submitted in r72546.
https://trac.osgeo.org/grass/changeset/72546

Thank You
Sunveer
https://sunveersingh.github.io/


ciao
Luca

www.lucadelu.org

Hi Sunveer,

It’s great to have you back!! Thanks much for your contributions and enthusiasm!

Here are some modules that are lacking tests:

  • v.to.db

  • v.to.rast

  • v.support

  • r.what

  • several r.out.* modules

  • i.pca

Cheers from the code sprint in Bonn :slight_smile:

Vero

···

2018-03-24 10:08 GMT+01:00 Sunveer Singh <singhsunveer54@gmail.com>:

Thanks a lot.

Now on which module should I write test?

Thank You
Sunveer
https://sunveersingh.github.io

On Sat, 24 Mar 2018, 14:37 Luca Delucchi, <lucadeluge@gmail.com> wrote:

On 24 March 2018 at 03:33, Sunveer Singh <singhsunveer54@gmail.com> wrote:

Hi,

Hi Sunveer,

Thanks for the feedback, I have attached the complete working test, run on
nc_basic_spm_grass7

thanks a lot, submitted in r72546.
https://trac.osgeo.org/grass/changeset/72546

Thank You
Sunveer
https://sunveersingh.github.io/


ciao
Luca

www.lucadelu.org


grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Hi,

Let’s, start with v.to.db, I attached the test for it.

if any improvements are needed, please let me know.

(attachments)

testvtd.py (1.87 KB)

···

On Sat, Mar 24, 2018 at 5:19 PM, Veronica Andreo <veroandreo@gmail.com> wrote:

Hi Sunveer,

It’s great to have you back!! Thanks much for your contributions and enthusiasm!

Here are some modules that are lacking tests:

  • v.to.db

  • v.to.rast

  • v.support

  • r.what

  • several r.out.* modules

  • i.pca

Cheers from the code sprint in Bonn :slight_smile:

Vero

Thank You
Sunveer
https://sunveersingh.github.io/

2018-03-24 10:08 GMT+01:00 Sunveer Singh <singhsunveer54@gmail.com>:

Thanks a lot.

Now on which module should I write test?

Thank You
Sunveer
https://sunveersingh.github.io

On Sat, 24 Mar 2018, 14:37 Luca Delucchi, <lucadeluge@gmail.com> wrote:

On 24 March 2018 at 03:33, Sunveer Singh <singhsunveer54@gmail.com> wrote:

Hi,

Hi Sunveer,

Thanks for the feedback, I have attached the complete working test, run on
nc_basic_spm_grass7

thanks a lot, submitted in r72546.
https://trac.osgeo.org/grass/changeset/72546

Thank You
Sunveer
https://sunveersingh.github.io/


ciao
Luca

www.lucadelu.org


grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

On 24 March 2018 at 16:48, Sunveer Singh <singhsunveer54@gmail.com> wrote:

Hi,

Hi Sunveer,

Let's, start with v.to.db, I attached the test for it.

if any improvements are needed, please let me know.

I'm sorry but you should change something.
In setUpClass you should copy the geology map because I run the script
in user1 mapset and it failed.
In tearDownClass you should remove the created map.

Thank You
Sunveer
https://sunveersingh.github.io/

--
ciao
Luca

www.lucadelu.org

Hi,

Done, attached the working file!

(attachments)

testvtd.py (2.03 KB)

···

On Sun, Mar 25, 2018 at 5:59 AM, Luca Delucchi <lucadeluge@gmail.com> wrote:

On 24 March 2018 at 16:48, Sunveer Singh <singhsunveer54@gmail.com> wrote:

Hi,

Hi Sunveer,

Let’s, start with v.to.db, I attached the test for it.

if any improvements are needed, please let me know.

I’m sorry but you should change something.
In setUpClass you should copy the geology map because I run the script
in user1 mapset and it failed.
In tearDownClass you should remove the created map.

Thank You
Sunveer
https://sunveersingh.github.io/


ciao
Luca

www.lucadelu.org

Thank You
Sunveer
https://sunveersingh.github.io/

On 25 March 2018 at 06:56, Sunveer Singh <singhsunveer54@gmail.com> wrote:

Hi,

Hi Sunveer,

Done, attached the working file!

yes it is working and it finish but I get several errors (attached to log file).
Some other suggestion:
- rename the copied vector with a different name
- in the copied vector create a new column and use this one to update the values

Thank You

thanks to you

Sunveer
https://sunveersingh.github.io/

--
ciao
Luca

www.lucadelu.org

On 25 March 2018 at 12:19, Luca Delucchi <lucadeluge@gmail.com> wrote:

yes it is working and it finish but I get several errors (attached to log file).

Sorry I forget the file

--
ciao
Luca

www.lucadelu.org

(attachments)

error.7z (2.03 KB)

Hi,

Sorry, but I don’t get you if I rename the mapold, I also have to rename the main map.

Can you please explain more

···

On Sun, Mar 25, 2018 at 3:56 PM, Luca Delucchi <lucadeluge@gmail.com> wrote:

On 25 March 2018 at 12:19, Luca Delucchi <lucadeluge@gmail.com> wrote:

yes it is working and it finish but I get several errors (attached to log file).

Sorry I forget the file


ciao
Luca

www.lucadelu.org

Thank You
Sunveer
https://sunveersingh.github.io/

On 25 March 2018 at 12:59, Sunveer Singh <singhsunveer54@gmail.com> wrote:

Hi,

Hi,

Sorry, but I don't get you if I rename the mapold, I also have to rename the
main map.

no no you have to assign new name to mapold (no geology) and probably
could make sense to use a different name per mapold (like mapused or
similar)

Can you please explain more

--
ciao
Luca

www.lucadelu.org

Hi,

The error we were getting are now fixed. :slight_smile:

File Attached, if any improvements are needed please let me know.

(attachments)

testvtd.py (2.11 KB)

···

On Sun, Mar 25, 2018 at 6:30 PM, Luca Delucchi <lucadeluge@gmail.com> wrote:

On 25 March 2018 at 12:59, Sunveer Singh <singhsunveer54@gmail.com> wrote:

Hi,

Hi,

Sorry, but I don’t get you if I rename the mapold, I also have to rename the
main map.

no no you have to assign new name to mapold (no geology) and probably
could make sense to use a different name per mapold (like mapused or
similar)

Can you please explain more


ciao
Luca

www.lucadelu.org

Thank You
Sunveer
https://sunveersingh.github.io/