Skip to content

python project management - #43

Open
awurno wants to merge 1 commit into
gh-pagesfrom
pythonstructure
Open

python project management#43
awurno wants to merge 1 commit into
gh-pagesfrom
pythonstructure

Conversation

@awurno

@awurno awurno commented Aug 27, 2026

Copy link
Copy Markdown

No description provided.

@awurno
awurno requested a review from GreatEmerald August 27, 2026 14:53

@GreatEmerald GreatEmerald left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, some points to revise here. I couldn't see all the changes due to the newlines change, which should be reverted anyway (see below).

Comment thread finding_help.Rmd
This is why, at least in Bash and R, it is recommended to first look at the built-in documentation, instead of trying to look it up online.
In addition, online sources sometimes provide a workaround but not a real solution to the problem.
And, of course, some of the solutions may be outright wrong and not work for you.
Whichever online source you use, you need to be critical about the information you find on the internet. Some of the information you find may refer to older versions of the software than what you are using, resulting in a mismatch. This is why, at least in Bash and R, it is recommended to first look at the built-in documentation, instead of trying to look it up online. In addition, online sources sometimes provide a workaround but not a real solution to the problem. And, of course, some of the solutions may be outright wrong and not work for you.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is the wrong style of formatting. We want each sentence on a new line. Otherwise looking at git diffs is a matter of finding a needle in a haystack...

Comment thread finding_help.Rmd
But how do we know *how* and *what* to write in the first place? Even the most experienced programmers run into these questions, so it's important to know how to find answers to them.

There are many places where help can be found on the internet. So in case the documentation is not sufficient for what you are trying to achieve, a search engine like Google is your best friend. Most likely by searching the right keywords relating to your problem, the search engine will direct you to online documentation, a tutorial, or to some discussions on [Stack Exchange](https://stackexchange.com/). It is quite likely that the problem you are trying to figure out has already been answered before, and using these resources you should be able to solve your particular problem as well.
There are many places where help can be found on the internet. So in case the documentation is not sufficient for what you are trying to achieve, a search engine like Google is your best friend. Most likely by searching the right keywords relating to your problem, the search engine will direct you to online documentation, a tutorial, or to some discussions on [Stack Exchange](https://stackexchange.com/). Nowadays search engines even use return preliminary AI generated answers. It is quite likely that the problem you are trying to figure out has already been answered before, and using these resources you should be able to solve your particular problem as well.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
There are many places where help can be found on the internet. So in case the documentation is not sufficient for what you are trying to achieve, a search engine like Google is your best friend. Most likely by searching the right keywords relating to your problem, the search engine will direct you to online documentation, a tutorial, or to some discussions on [Stack Exchange](https://stackexchange.com/). Nowadays search engines even use return preliminary AI generated answers. It is quite likely that the problem you are trying to figure out has already been answered before, and using these resources you should be able to solve your particular problem as well.
There are many places where help can be found on the internet. So in case the documentation is not sufficient for what you are trying to achieve, a search engine like Google is your best friend. Most likely by searching the right keywords relating to your problem, the search engine will direct you to online documentation, a tutorial, or to some discussions on [Stack Exchange](https://stackexchange.com/). Nowadays, search engines often even provide you with preliminary AI generated answers. It is quite likely that the problem you are trying to figure out has already been answered before, and using these resources you should be able to solve your particular problem as well.

Comment thread finding_help.Rmd
Some of the code completion tools:

* [GitHub Copilot](https://github.com/features/copilot) - GitHub AI, you get more free credit if you get the Education Pack from GitHub. Integrated into most IDEs.
* [GitHub Copilot](https://github.com/features/copilot) - GitHub AI, you get more free credit if you get the Education Pack from GitHub. Integrated into most IDEs.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why the extra space at the end?

Comment thread finding_help.Rmd
RStudio is cross-platform and open-source.
It comes in two types: *RStudio Desktop* is a regular desktop app, and *RStudio Server* is meant for running on a remote server, to which you can connect through your web browser.
Interestingly enough, the desktop version is in fact just *RStudio Server* running locally, with an integrated web browser based on *Google Chrome*.
Posit recently released a new IDE called positron. Although posit does not say it definitively and they will keep maintaining RStudio, new features will be [primarily implemented](https://positron.posit.co/faqs.html) in Positron

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need to expand this quite a lot more, and reduce RStudio info. We should already think about how this will look like next year, so we don't need to update it again.

Comment thread finding_help.Rmd
* As we will be working with multiple languages throughout this course, we will keep things organized by placing scripts in a directory per language.
* For R and Bash we will use the directories `R/` and `Bash/`. These directories should contain functions you have defined as part of your project.
* In python functions are stored in a directory with a name relevant to the project. For example when working on flood mapping, you would put functions in a directory called `floodmapping`. For smaller projects (< 5) functions, all functions can go in 1 script. For bigger projects functions are stored in multiple files, split by functionality. More on python project organization see the [Hitchhiker's guide to Python](https://docs.python-guide.org/writing/structure/#structure-of-code-is-key).
* Functions should be as generic as possible and are imported and called by the `main` script. In R you would write `source(R/myFunction.R)`, in python you would write `from floodmapping import *`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is that really what we want to teach students here? I would think it's better to say that in Python you would do import floodmapping (optionally as fm) and then use floodmapping.myFunction().

Comment thread finding_help.Rmd

# Import functions
import Python.download as download
# The "as download" part is used to scode functions. In this example, we can distinghuish our own implemented download functions from other functions called download_data

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This comment is not very clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants