[GRASS-dev] [Bug] Fix currently ignored Flake8 warnings #1522

Respected sir/mam,
This is with reference to the bug mentioned in the subject line. I had commented on GitHub regarding this bug, that I’m new to open source projects and coding, but I’m interested to work on it. One of the respected members replied and told me to first clone and compile the code. I have cloned the code. After that, I executed the following two commands:
git remote add upstream https://github.com/OSGeo/grass

git remote -v

After this can I directly start editing the code? Or compilation is still required? I am new to this and I’m not able to understand the compilation. I am using Ubuntu 20.04 Kindly help me with this.
Regards,
Shubham Swati

Hi Shubham Swati,

On Thu, Apr 22, 2021 at 6:08 PM Shubham Swati Prasad
<h20200049@goa.bits-pilani.ac.in> wrote:

Respected sir/mam,
This is with reference to the bug mentioned in the subject line. I had commented on GitHub regarding this bug, that I'm new to open source projects and coding, but I'm interested to work on it.

First of all, welcome here!

One of the respected members replied and told me to first clone and compile the code. I have cloned the code. After that, I executed the following two commands:
git remote add upstream https://github.com/OSGeo/grass
git remote -v
After this can I directly start editing the code? Or compilation is still required? I am new to this and I'm not able to understand the compilation. I am using Ubuntu 20.04 Kindly help me with this.

Your questions are right. When looking at this document (which I
initially thought to send as an answer) I see the documentation gap
therein:
https://github.com/OSGeo/grass/blob/master/CONTRIBUTING.md#first-time-setup

NOTE TO Devs: We should expand the "first time setup" part and add
some hints concerning the source code compilation.

Here my attempt to

General concept:
GRASS GIS is written in a small (and happy) mixture of programming
languages. The major part of the source code is written in C language
which requires a compiler to be turned into executables ("binaries").
About 30% is written in Python which is an interpreted language, hence
"just" needs the Python program to be installed.
Now, to turn the source code package into an installed binary package,
the so-called "compilation" is needed. While the source code consists
of thousands of C and Python files (plus HTML documentation), the
"Makefile" system included does the job of compiling the source code
in the right order, generating the manual pages, etc.

In essence, the way of installation of the compiler tools + Python
depends on the operating system. To facilitate this, we have collected
copy-paste instructions for most operating systems in our Wiki:
https://grasswiki.osgeo.org/wiki/Compile_and_Install

What's next:
Please check the Wiki page (hope the attempt of an intro above helps;
pls ask otherwise here in the list) and give it a try.
I am happy to add an extra section to the CONTRIBUTING.md file (or
another place, if the devs prefer) to fill the gap in the document.

Best,
Markus

--
Markus Neteler, PhD
https://www.mundialis.de - free data with free software
https://grass.osgeo.org
https://courses.neteler.org/blog

---------- Forwarded message ---------
From: Shubham Swati Prasad <h20200049@goa.bits-pilani.ac.in>
Date: Thu, 6 May 2021, 19:04
Subject: Re: [GRASS-dev] [Bug] Fix currently ignored Flake8 warnings #1522
To: Markus Neteler <neteler@osgeo.org>

Respected sir,
I have cloned the repository and after that I’m totally stuck. I don’t know how to proceed further. I want to start working on the bug as soon as possible. Kindly guide me.
Regards
Shubham Swati

On Thu, Apr 22, 2021 at 11:20 PM Markus Neteler <neteler@osgeo.org> wrote:

Hi Shubham Swati,

On Thu, Apr 22, 2021 at 6:08 PM Shubham Swati Prasad
<h20200049@goa.bits-pilani.ac.in> wrote:

Respected sir/mam,
This is with reference to the bug mentioned in the subject line. I had commented on GitHub regarding this bug, that I’m new to open source projects and coding, but I’m interested to work on it.

First of all, welcome here!

One of the respected members replied and told me to first clone and compile the code. I have cloned the code. After that, I executed the following two commands:
git remote add upstream https://github.com/OSGeo/grass
git remote -v
After this can I directly start editing the code? Or compilation is still required? I am new to this and I’m not able to understand the compilation. I am using Ubuntu 20.04 Kindly help me with this.

Your questions are right. When looking at this document (which I
initially thought to send as an answer) I see the documentation gap
therein:
https://github.com/OSGeo/grass/blob/master/CONTRIBUTING.md#first-time-setup

NOTE TO Devs: We should expand the “first time setup” part and add
some hints concerning the source code compilation.

Here my attempt to

General concept:
GRASS GIS is written in a small (and happy) mixture of programming
languages. The major part of the source code is written in C language
which requires a compiler to be turned into executables (“binaries”).
About 30% is written in Python which is an interpreted language, hence
“just” needs the Python program to be installed.
Now, to turn the source code package into an installed binary package,
the so-called “compilation” is needed. While the source code consists
of thousands of C and Python files (plus HTML documentation), the
“Makefile” system included does the job of compiling the source code
in the right order, generating the manual pages, etc.

In essence, the way of installation of the compiler tools + Python
depends on the operating system. To facilitate this, we have collected
copy-paste instructions for most operating systems in our Wiki:
https://grasswiki.osgeo.org/wiki/Compile_and_Install

What’s next:
Please check the Wiki page (hope the attempt of an intro above helps;
pls ask otherwise here in the list) and give it a try.
I am happy to add an extra section to the CONTRIBUTING.md file (or
another place, if the devs prefer) to fill the gap in the document.

Best,
Markus


Markus Neteler, PhD
https://www.mundialis.de - free data with free software
https://grass.osgeo.org
https://courses.neteler.org/blog

Hi,

On Thu, May 6, 2021 at 5:47 PM Shubham Swati Prasad
<h20200049@goa.bits-pilani.ac.in> wrote:

Respected sir,
I have cloned the repository and after that I'm totally stuck. I don't know how to proceed further. I want to start working on the bug as soon as possible. Kindly guide me.

Since you have Ubuntu, please follow the instructions here:

https://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu#Quick_instructions

Best,
Markus

Respected sir/madam
I have compiled the code now. Can I start working on the issue now? Or is there something else I need to configure before I start working on it?
Kindly guide me.
Regards
Shubham Swati

On Fri, May 7, 2021 at 10:31 PM Markus Neteler <neteler@osgeo.org> wrote:

You wrote to grass-dev before. Please continue with that.

Regards

Shubham Swati Prasad <h20200049@goa.bits-pilani.ac.in> schrieb am Fr., 7. Mai 2021, 18:46:

I beg your pardon, but which list I have to write in to? Does it mean that I can start working on the issue? Can you explain please.

On Fri, May 7, 2021 at 10:09 PM Markus Neteler <neteler@osgeo.org> wrote:

Great. Please write to the list, thanks.

Shubham Swati Prasad <h20200049@goa.bits-pilani.ac.in> schrieb am Fr., 7. Mai 2021, 18:38:

Sir, thanks for sharing the above link. I have finished the compilation process. Now can I start working on the issue or are there more things to configure before I start working on it? Kindly guide.
Regards
Shubham Swati

On Fri, May 7, 2021 at 1:16 AM Markus Neteler <neteler@osgeo.org> wrote:

Hi,

On Thu, May 6, 2021 at 5:47 PM Shubham Swati Prasad
<h20200049@goa.bits-pilani.ac.in> wrote:

Respected sir,
I have cloned the repository and after that I’m totally stuck. I don’t know how to proceed further. I want to start working on the bug as soon as possible. Kindly guide me.

Since you have Ubuntu, please follow the instructions here:

https://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu#Quick_instructions

Best,
Markus

Hi Shubham Swati,

Assuming you are working on that Ubuntu machine, make sure you have python3 and pip3. Then, install black and flake8 with pip3 (just search for this sentence online if pip is new to you). That is all tools you need. (Definitely check what black and esp. flake8 commands do if this is your first time seeing them. And of course, there is at least one text editor on Ubuntu by default - gedit. You can just open any text file including .py files there.

Then you need to just start. Sift through the issues, pick a random one or whatever approach works for you. Remember that if it would be trivial it would be fixed already, so don’t be surprised when you will need to spend some time searching (online and in the code base) and experimenting (with the code or standalone examples).

You are certainly welcome to work on any issue any time, but a nice setup makes success more likely. Good luck!

Vaclav

On Fri, May 7, 2021 at 1:11 PM Shubham Swati Prasad <h20200049@goa.bits-pilani.ac.in> wrote:

Respected sir/madam
I have compiled the code now. Can I start working on the issue now? Or is there something else I need to configure before I start working on it?
Kindly guide me.
Regards
Shubham Swati

On Fri, May 7, 2021 at 10:31 PM Markus Neteler <neteler@osgeo.org> wrote:

You wrote to grass-dev before. Please continue with that.

Regards

Shubham Swati Prasad <h20200049@goa.bits-pilani.ac.in> schrieb am Fr., 7. Mai 2021, 18:46:

I beg your pardon, but which list I have to write in to? Does it mean that I can start working on the issue? Can you explain please.

On Fri, May 7, 2021 at 10:09 PM Markus Neteler <neteler@osgeo.org> wrote:

Great. Please write to the list, thanks.

Shubham Swati Prasad <h20200049@goa.bits-pilani.ac.in> schrieb am Fr., 7. Mai 2021, 18:38:

Sir, thanks for sharing the above link. I have finished the compilation process. Now can I start working on the issue or are there more things to configure before I start working on it? Kindly guide.
Regards
Shubham Swati

On Fri, May 7, 2021 at 1:16 AM Markus Neteler <neteler@osgeo.org> wrote:

Hi,

On Thu, May 6, 2021 at 5:47 PM Shubham Swati Prasad
<h20200049@goa.bits-pilani.ac.in> wrote:

Respected sir,
I have cloned the repository and after that I’m totally stuck. I don’t know how to proceed further. I want to start working on the bug as soon as possible. Kindly guide me.

Since you have Ubuntu, please follow the instructions here:

https://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu#Quick_instructions

Best,
Markus


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