Hi, I am an PhD. candidate on FIIT STU, open-source enthusiast who likes hiking and peppers. I use macOS on my workstation, Linux in my containers and servers. I use Python, C++ in my projects.
Location
Bratislava, Slovakia
Education
Faculty of Informatics and Information Technologies, Slovak University of Technology in Bratislava
Hello, I just want to add a quick note to the meaning of the src folder. From my personal point of view, I always liked the idea of separating source code from the rest of the repository.
I like to keep in my root basic configuration files (linters, editor config and so on), docs, srcor the module folder (I am a Python developer). I think repository is then much more cleaner because you don't have source code mixed with files and folders like .github and other stuff that comes in the way during the project.
Hi, I am an PhD. candidate on FIIT STU, open-source enthusiast who likes hiking and peppers. I use macOS on my workstation, Linux in my containers and servers. I use Python, C++ in my projects.
Location
Bratislava, Slovakia
Education
Faculty of Informatics and Information Technologies, Slovak University of Technology in Bratislava
Hi Victor, I don't want to say that it's some kind of standard. There is no such thing as a standardized project structure (not even in Python PEPs). As I said in the previous comment, the project repository is not only a source code but lots of accompanying files such as configs and documentation. The src folder is not just a Python thing but it's very common in many other languages such as C++ or Java. It comes from the necessity to separate source code from the rest of the project files in larger projects. Here are a few examples of popular projects that come to my mind:
Hello, I just want to add a quick note to the meaning of the
src
folder. From my personal point of view, I always liked the idea of separating source code from the rest of the repository.I like to keep in my root basic configuration files (linters, editor config and so on),
docs
,src
or the module folder (I am a Python developer). I think repository is then much more cleaner because you don't have source code mixed with files and folders like.github
and other stuff that comes in the way during the project.Hello Jakub! I see many devs in the comment section prefer the src folder as well. Is this a standard in python or just a preference?
Hi Victor, I don't want to say that it's some kind of standard. There is no such thing as a standardized project structure (not even in Python PEPs). As I said in the previous comment, the project repository is not only a source code but lots of accompanying files such as configs and documentation. The
src
folder is not just a Python thing but it's very common in many other languages such as C++ or Java. It comes from the necessity to separate source code from the rest of the project files in larger projects. Here are a few examples of popular projects that come to my mind:Also, there is a lot of popular projects which are not using such a structure.
To sum up, it's always a preference of a maintainer or the community. But usage of the
src
folder makes perfect sense for me.