how should I organize my project? (beginner) anthony explains #506

preview_player
Показать описание
today I give my advice for how to organize your project: aka don't worry about it and start hacking!

==========

I won't ask for subscriptions / likes / comments in videos but it really helps the channel. If you have any suggestions or things you'd like to see please comment below!
Рекомендации по теме
Комментарии
Автор

"stick with that until it is painful" 👍😂

_Amilio_
Автор

This is a nice advice. Although I would not bare to have a file with more than 500 lines. But yeah, splitting things when the need arrives is the best way to go

fexofenadinaGenerica
Автор

so you're telling me you don't enjoy dedicating 1 file for every class!?!

ericng
Автор

At work we have main application file which contains 31k SLOC and no open source language server can handle this, have to use py charm if one want to use some fancy lsp features. Split your file guys :(

Cavema
Автор

Love the channel! I swear I go through this everytime and endup starting projects way too late lol. Question, how would you go about setting up a project that uses different python versions? For example, I have a project that requires python2.7 and python3.9. Its a drone project and its essentially 2 scripts, one for each python version. The scripts will be executed sequentially, so first the 3.9 script and then the 2.7 script. However, I am not sure if its better to use virtual environments or docker... any insight will be greatly appreciated. Thanks!

santiagoperez
Автор

I like the idea of rhe sungle file but want to add my reasoning for not doing it. Normally when coming back to a project I can't remember what is going on and the new work gets added to a new file while i explore what i am doing. Then this gets refactored as I work more on the feature.

I am not saying this a good way, only that it is my way.

jamesfitzpatrick
Автор

would you go the same way with tests? For tools like pyupgrade tests are always end to end tests and fully independent on the implementation. Although you usually don't want to test implementation, sometimes you test smaller parts individually, but while also having larger end to end tests, which may be slow. Would you split those out or mark them and use something like "-k not slow"?

theendlessriver
Автор

Yo Anthony do you know where you got that shirt it looks fire.

samuelcurrans
Автор

Or.. bundle whatever you have in a .zip with the __main__.py and it becomes a single file again! :)

walkdead
Автор

Great thoughts. Thank you for sharing. ^^

ancoopa
Автор

How DARE YOU tell me not to use $PYTHONPATH ... my setup works perfectly for me!!!!

b_rk