r/learnpython • • Aug 25 '20

How to read/understand a git repository?

I'm trying to learn how to make a python programs by looking through existing programs in a similar premise as what I'd like to achieve (learning by looking at examples). But one thing I'm having difficulty with is finding out how these github repos are organized.

So far (in the repo I have I'm viewing) I know that bin usually means terminal/command-line commands, docs is typically documentation (as one might expect), test is self explanatory, but some things I don't know is rpm and stubs, amongst others.

Is there a resource to learn how python/git programs are organized? And what to expect when looking through repos?

334 Upvotes

13 comments sorted by

View all comments

4

u/kramrm Aug 25 '20 edited Aug 25 '20

There isn’t one “right” way to organize a repo. (Though there are wrong ways). It also depends on the language(s) used. I don’t usually have a bin in my Python repos. For those, I generally have project info in the root folder and all the actual code inside src.

2

u/Decency Aug 25 '20

One rule of git repos is that they should contain only human readable things. So if you have a bin directory, pretty much by definition you're doing it wrong.

3

u/kramrm Aug 25 '20

It’s one thing to include a library file your code may need (though not as common with Python as other languages), but a compiled version of your project should be in release assets, not the repo itself.