Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new addon r.area.createweight #597

Merged
merged 13 commits into from
Aug 23, 2021
Merged

Conversation

CharlotteFlasse
Copy link
Contributor

Hi developpers,

We are pleased to push a new add-on for GRASS GIS. It can be used to create a weighting layer for dasymetric mapping using a Random Forest model.

Looking forward for your feedback.

CharlotteFlasse and others added 5 commits August 3, 2021 16:50
This add-on can be used to create a weighting layer for dasymetric mapping using a Random Forest model.
Correct some formatting errors (Flake8)
@tgrippa
Copy link

tgrippa commented Aug 6, 2021

Hi all,
After an initial pull request, we get notified that Flake8 and Black quality check failed. So, we (@CharlotteFlasse and me @tgrippa) fix the different PEP8 issues in our add-on. We successfully run the Flake8 check and also Black on our own computer. Then, we commit and push the modification back to the forked repository that conducted to a new automatic check here in the ongoing pull request. However, the last check failed on both Black and Flake8 while it was not the case on our computer. We are not familiar with all these procedure for add-on submission so we are waiting for you to know what we are supposed to do now :)

Thanks

@marisn
Copy link
Contributor

marisn commented Aug 7, 2021

However, the last check failed on both Black and Flake8 while it was not the case on our computer. We are not familiar with all these procedure for add-on submission so we are waiting for you to know what we are supposed to do now :)

Most likely your version of black is too old. My Ubuntu 20.10 ships with black 19.x and it is too old. To format GRASS code, I have created a virtual environment with black 21.x from pip. This version is good enough to pass CI checks.

@tgrippa
Copy link

tgrippa commented Aug 9, 2021

Hi @marisn and thanks for the tip. I installed black 21.x to be sure, but I realized that I misinterpret the check performed on Github. I thought the Black check do a reformatting while it is just a --check --diff without modification. I didn't pushed the modified version on commit 3084764. Now it is done on de43005.

Copy link
Contributor

@veroandreo veroandreo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went through the manual page and made some grammar suggestions; hopefully someone else can have a look at the code

src/raster/r.area.createweight/r_area_createweight.html Outdated Show resolved Hide resolved
src/raster/r.area.createweight/r_area_createweight.html Outdated Show resolved Hide resolved
src/raster/r.area.createweight/r_area_createweight.html Outdated Show resolved Hide resolved
src/raster/r.area.createweight/r_area_createweight.html Outdated Show resolved Hide resolved
src/raster/r.area.createweight/r_area_createweight.html Outdated Show resolved Hide resolved
src/raster/r.area.createweight/r_area_createweight.html Outdated Show resolved Hide resolved
src/raster/r.area.createweight/r_area_createweight.html Outdated Show resolved Hide resolved
src/raster/r.area.createweight/r_area_createweight.html Outdated Show resolved Hide resolved
src/raster/r.area.createweight/r_area_createweight.html Outdated Show resolved Hide resolved
src/raster/r.area.createweight/r_area_createweight.html Outdated Show resolved Hide resolved
@tgrippa
Copy link

tgrippa commented Aug 11, 2021

Thank you @veroandreo and @wenzeslaus for the review. I integrated all the requested changes. Let me know if an extra action is needed from my side.

@tgrippa tgrippa merged commit f993f2f into OSGeo:grass7 Aug 23, 2021
@veroandreo veroandreo added the new addon PR contains a new addon or issue proposes one label Oct 19, 2021
IvanMarchesini pushed a commit to IvanMarchesini/grass-addons that referenced this pull request Feb 24, 2022
* create r.area.createweight

* remove empty folder

* Add files for new add-on r.area.createweight

This add-on can be used to create a weighting layer for dasymetric mapping using a Random Forest model.

* Update r.area.createweight.py

Correct some formatting errors (Flake8)

* fix Pep8 syntax

* attempt to fix Black formating issue

* Apply suggestions from code review

Co-authored-by: Veronica Andreo <veroandreo@gmail.com>

* Apply suggestions from code review

* Apply suggestions from code review

* Remove njob check as suggested

* Apply Black formating

* fix multi-line option description

* fix 2 issues with multi-line in module description

Co-authored-by: Tais Grippa <tgrippa@ulb.ac.be>
Co-authored-by: Grippa Tais <tais.grippa@ulb.be>
Co-authored-by: Veronica Andreo <veroandreo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new addon PR contains a new addon or issue proposes one
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants