Automated Testing in Python with pytest, tox, and GitHub Actions

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ก.ย. 2024

ความคิดเห็น • 353

  • @Jacob011
    @Jacob011 3 ปีที่แล้ว +665

    Finally someone discussing project setup, directory structure, git workflows etc. There needs to be more videos like this.

    • @mCoding
      @mCoding  3 ปีที่แล้ว +78

      Very welcome! Thanks for watching.

    • @syinx2301
      @syinx2301 3 ปีที่แล้ว

      superb!

    • @mandyokpoji8787
      @mandyokpoji8787 2 ปีที่แล้ว

      @@mCoding incredible work son.

    • @soyciro4623
      @soyciro4623 2 ปีที่แล้ว

      totally agree!
      Please, more videos on this!

    • @jeevan1016
      @jeevan1016 ปีที่แล้ว +1

      True! need more videos on this topic

  • @Mutual_Information
    @Mutual_Information 3 ปีที่แล้ว +161

    I've been blindly pattern matching for spinning up repos for awhile now and it's nice to see explanations for a lot of those choices. I also didn't realize all the pytest functionality I was missing. I like this longer/more detailed style too - it's necessary for training strong engineers. (Though, not sure if it's the best choice for TH-cam growth). Thanks for making this. I'll be recommending it to coworkers.

    • @mCoding
      @mCoding  3 ปีที่แล้ว +70

      We'll see how this one performs. I already have a pretty sophisticated audience so maybe they'll love it! If not I'm fine with a video tanking now and again, I know some people will still find it useful. Thanks for watching as always!

    • @alexandergazo6064
      @alexandergazo6064 3 ปีที่แล้ว +10

      @@mCoding man you are the only one with real content, with the aim to teach beyond basics. your structure is awesome. the editing style is top notch. keep it up please. you are great

  • @nathanbrown2640
    @nathanbrown2640 3 ปีที่แล้ว +103

    Utterly brilliant walkthrough!
    Our company is currently implementing automated testing for a new project and all config requirements have worried me that I have no clue what's going on and would have no clue if stuff went wrong!
    This is so clearly explained and motivated, I feel perfectly equipped to ensure we can implement it all and know all our tests are run!

    • @mCoding
      @mCoding  3 ปีที่แล้ว +14

      Amazing! I'm so glad I was able to help. Thanks for sharing 👍

  • @shibak4
    @shibak4 3 ปีที่แล้ว +32

    TH-cam is my Netflix when it comes to content related to programming, databases and DevOps, so I go through a ton of content regularly. but this video was one of THE most informative pieces of content I've ever watched. As a lower-intermediate Python programmer, making python apps installable has always been a head-scratcher for me and it hasn't been easy to find content which address almost all aspects of the process with clear guidelines. You just made my life MUCH easier and I thank you for that.

    • @mCoding
      @mCoding  3 ปีที่แล้ว +1

      Glad I could help! Thanks for sharing.

  • @tim-timman8868
    @tim-timman8868 3 ปีที่แล้ว +25

    Thank you for this great resource into the current mess of python packaging. It's something I've spent many hours trying to figure out, and now I know I missed a bunch. And with you handing a test setup on a silver platter, I now have no excuse to bring with formal testing.
    Once again, thank you. I really liked the longer format (when required) and am happy you didn't chop it up into parts.
    I would be really interested in similar in-depth videos on the things you mention in the video overview for example. If you could make a video on how to create a Python wrapper for a C library, I would be ecstatic.

    • @mCoding
      @mCoding  3 ปีที่แล้ว +4

      You're welcome! Noted on those suggestions. I have a huge list of stuff to get to ... eventually 😀

  • @LucasSilva-jd2bf
    @LucasSilva-jd2bf 3 ปีที่แล้ว +14

    Please make more videos like this. I've been having a lot of trouble when it comes to creating a github project. It's hard to find resources on project structure, git workflow, package structure, versioning, etc. If possible, it would be nice if you could create a series showing how to create and maintain a github repo. I want to understand how to increase versions, how to review pull requests and issues, how to write a good commit message, how to create tags/releases, how to create a documentation, and much more.

  • @therealplnts8533
    @therealplnts8533 3 ปีที่แล้ว +25

    Was literally trying to figure out testing for the past week, its like you know exactly what I'm struggling on!
    Great video as always

    • @mCoding
      @mCoding  3 ปีที่แล้ว +3

      Great to hear I was able to help (again?)! 😀

  • @PhilippGrafendorfer
    @PhilippGrafendorfer 3 ปีที่แล้ว +2

    one of the most important python tutorials I have ever seen. It covers a wide range of daily problems as python programmer.

    • @mCoding
      @mCoding  3 ปีที่แล้ว

      Wow thank you! Glad you enjoyed 😀

  • @JB1RD367
    @JB1RD367 3 ปีที่แล้ว +36

    The perfect amount of info to get started with automated testing. Thank you!

    • @mCoding
      @mCoding  3 ปีที่แล้ว +2

      Glad you enjoyed it! Thanks so much for the kind words!

  • @shreydixit2690
    @shreydixit2690 3 ปีที่แล้ว +17

    This is by far your most advanced tutorial. Too much info in a single video but still super helpful. Thanks !

    • @mCoding
      @mCoding  3 ปีที่แล้ว +14

      Don't feel like you have to watch it all at once. I see this very much as reference material that you can go back to over and over to get the bits you need. Thanks for watching!

    • @raffe01fu
      @raffe01fu 2 ปีที่แล้ว

      @@mCoding I think this is great, that is just how i have / is currently using it. I have a small library mostly for internal use and can only fit in some time here and there for doing work on it. So this tutorial has taken a few weeks to test out and implement. But now i will feel much better doing changes to the library as i can much easier catch if (when) i break something. Cheers!

  • @NotoriousPyro
    @NotoriousPyro 2 ปีที่แล้ว +2

    Project name: "Slap that like button" *with a characteristic look at the viewer LOL.
    You have really good oration. And good video, having recently implemented a lot of CI/CD stuff including this within the company I work for, it is great to see great tutorials on how to do this for others.
    Also, the great thing about fixtures is you can also return functions and classes and pass the parameters into that function inside the fixture by calling the fixture like fixture_name(args for the inner function of the fixture) or with a class you can also do fixture_name(args).method

    • @mCoding
      @mCoding  2 ปีที่แล้ว

      Thanks for your kind words. Glad you found my video useful!

  • @SudiptaKarmakar87
    @SudiptaKarmakar87 2 ปีที่แล้ว +2

    This is one of the best and most complete python test setup guide I have ever seen in text or video form. While I knew about all the things mentioned here, your clear and incremental explanation has definitely helped me refresh everything and their interconnections. I am going to point every newbie (to testing) to this video hereafter. Thank you.

    • @mCoding
      @mCoding  2 ปีที่แล้ว

      Thank you very much i appreciate the recommendation!

  • @adrianperez8695
    @adrianperez8695 2 ปีที่แล้ว +1

    I recently moved to a new company that uses Python for it's automated tests suites. I've had to spin up very quickly and your videos have been very helpful. Thank you for making these!

    • @mCoding
      @mCoding  2 ปีที่แล้ว

      Great to hear! Best of luck at your new company!

  • @ManuelBTC21
    @ManuelBTC21 3 ปีที่แล้ว +8

    Example code should be exemplary. I think you've done a good job.

  • @dylanalexander5163
    @dylanalexander5163 ปีที่แล้ว +1

    The discussion on the project structure was fantastic, really insightful. It such an important aspect of a Python project, yet you don't see much information on it.

  • @random1-c4y
    @random1-c4y 8 หลายเดือนก่อน +1

    This is great, I agree, finally someone talking about how to package a python project

  • @laxlyfters8695
    @laxlyfters8695 ปีที่แล้ว

    This video needs to be at millions of views this is the subtle additions to projects that add more depth to any code base and more to talk about during interviews and help you in sdnet QA and even site infrastructure developer

    • @mCoding
      @mCoding  ปีที่แล้ว

      We're on our way! Tell your friends and coworkers 😀

  • @olearydj
    @olearydj 4 หลายเดือนก่อน

    Outstanding video. The only people that say package management is the worst part of python are those that haven’t tried to decipher the topics you cover in this video. Might be time to revisit as the landscape is changing quickly. Also, more of this is welcome!

  • @raccoonteachesyou
    @raccoonteachesyou 3 ปีที่แล้ว +2

    Thank you very much, the video is clear, it goes through multiples subject deep enough to be useful, but not deep enough to get a too long video.
    Also, the rythm is very cool, you don't get bored, you go point by point, and it's a good pace.
    Again, thanks !

    • @mCoding
      @mCoding  3 ปีที่แล้ว

      You're welcome! Glad you enjoyed it.

  • @alaapsarkar
    @alaapsarkar 3 ปีที่แล้ว +5

    Thanks a lot, this helped me in many ways. I'm currently working as a software developer but new to this field. And I did slap that like button.

    • @mCoding
      @mCoding  3 ปีที่แล้ว +1

      Thanks very much!

  • @winnumber101
    @winnumber101 ปีที่แล้ว +1

    the setup cfg work that allows you to traverse across different directories to get & apply code had been so difficult for me to find concise information on (I didn't want to do any os.dir nonsense, just wanted to make my project into a recognizable package)
    you explained it so well & so quickly, that's more than I could've asked for

    • @mCoding
      @mCoding  ปีที่แล้ว

      Very glad I could provide some help!

  • @joem8251
    @joem8251 3 ปีที่แล้ว +1

    I love this subject and I love this video.
    I'm glad this guy happened to make it a week ago, because it happens to be just what I need, when I need it. I'm stubbornly committing to TDD best-practices in my projects as I currently polish a template for my pytests.

  • @marksawyer3369
    @marksawyer3369 ปีที่แล้ว

    I was originally only looking for TH-cam videos on pytest. With this video I found much more and it answered many questions that I have had regarding tox and GitHub integrations.
    Great video ... 👍👍👍

  • @yoannprigent5503
    @yoannprigent5503 3 ปีที่แล้ว +1

    Thank you for this video, goes exactly at the right pace and gives the right amount of info. I've been struggling to setup this "testing" while coding setup (coding is not my specialty, but in mechanical engineering it's becoming unavoidable nowadays to automate more and more parts of our job). You've given me a much clearer picture of what to do and how to do it. Will definitely share this to my colleagues, great job!

    • @mCoding
      @mCoding  3 ปีที่แล้ว

      Happy to help! Thanks for watching!

  • @sevdalink6676
    @sevdalink6676 2 ปีที่แล้ว

    I was looking on Udemy for some python testing courses. Then I found your video on youtube - I do not need Udemy anymore :D Thanks for the great video.

  • @aleale550
    @aleale550 3 ปีที่แล้ว +3

    Really solid and easy to follow walkthrough, I really enjoy your clear and concise style.

    • @mCoding
      @mCoding  3 ปีที่แล้ว +1

      Thanks so much for the kind words!

  • @mahdihosseinali7492
    @mahdihosseinali7492 2 ปีที่แล้ว

    This video has a lot of useful content which is very rare these days

    • @mCoding
      @mCoding  2 ปีที่แล้ว +1

      Many thanks!

  • @yash1152
    @yash1152 7 หลายเดือนก่อน

    thanks a lot for this video.
    4:14 & 7:37 > _"For automated testing, tests should run"_ [regardless the location of our source. Which's achieved by installing the project itself as a package.]
    i didn't understand the "import" part of the test_*.py files before, and got stuck there when i tried on my own several months ago.
    but this above part clears soo many things and i finally got my python pytests to work. thanks a lottttt again.
    i came here from binge watching ur latest video on python debugging. it just so happened that i was just restarting my python devt journey this time & was actually searching for some resource on pytest myself as the official doc didn't help at all. so, thanks for tooting this video there too.

    • @yash1152
      @yash1152 5 หลายเดือนก่อน

      not to self:
      * for applications using CLI arguments, do NOT use sys.argv directly.
      * use it via the formal parameter to the function (and set that to None by default).
      * this is similar to how c/java have `String[] args` as their formal parameter. oh lol, yet another approach combined from c.
      * this would allow that function to be called programmatically.
      * ... which makes writing tests for it easier and running 'em _much much_ faster.

  • @johnburke8337
    @johnburke8337 3 ปีที่แล้ว +1

    I saw your poll about this being long. Long was the right choice

    • @mCoding
      @mCoding  3 ปีที่แล้ว +1

      Thanks, I imagined a few ways of cutting it up but they just didn't make as much sense to me. I'm glad I went with this version (even though it's probably not going to get as many views, I think it's worth it).

  • @TimoRJensen
    @TimoRJensen 2 ปีที่แล้ว

    Holy shoot! Sooo many Nuggets in here! Thanks a lot! Very much appreciated!

    • @mCoding
      @mCoding  2 ปีที่แล้ว

      You're very welcome!

  • @CarelessMiss
    @CarelessMiss 3 ปีที่แล้ว +12

    Thank you, very useful!

    • @mCoding
      @mCoding  3 ปีที่แล้ว +1

      You're welcome!

  • @teresodra
    @teresodra 2 ปีที่แล้ว

    I have been a month looking for this video. Thanks for explaining how to properly create and install a package.

    • @mCoding
      @mCoding  2 ปีที่แล้ว

      You are very welcome! I'm glad it was useful to you.

  • @OnceARider
    @OnceARider 2 ปีที่แล้ว

    This is what I was looking for. Many thanks for covering these topics. I was specifically looking for how to install local package in current env, finally someone explained.

  • @Stoney-g1o
    @Stoney-g1o 2 ปีที่แล้ว +1

    An excellent companion video would be a docker file that includes the repo in this package and talks to a docker postgresql instance. I currently use a Makefile to document commands and make development easier. Such as mounting a local directory for daily development.

  • @Austin-hm6qq
    @Austin-hm6qq 2 ปีที่แล้ว +1

    Absolutely bookmarking this for the future. You just saved future me probably weeks of work

    • @mCoding
      @mCoding  2 ปีที่แล้ว

      I still go back and watch it myself from time to time! Always good to write things down!

  • @jakemuff9407
    @jakemuff9407 3 ปีที่แล้ว +1

    This is very cool and interesting. As a physics student I mainly just plug and play but good to know about all of this, especially that it seems just as 'fiddly' as using a makefile or cmake with C/C++ and external libraries.

  • @1997CWR
    @1997CWR 3 ปีที่แล้ว +9

    Your hair looks like a softmax activation function

    • @mCoding
      @mCoding  3 ปีที่แล้ว +3

      Hahahaah first time I've heard that one!

    • @gibran.zidane
      @gibran.zidane 3 ปีที่แล้ว +2

      hahahahaha nice one

  • @sebastiandix2280
    @sebastiandix2280 2 ปีที่แล้ว

    I am very grateful for this video because this is when all the setuptools pyproject.toml setup.py setup.cfg etc. finally made sense to me, aside from the actual automated testing :-)

  • @abzrg
    @abzrg 9 หลายเดือนก่อน

    Thanks for this very nice tutorial!
    I wanna also learn all the things that you mentioned that you're not gonna discuss them in this video.

  • @dexterovski
    @dexterovski 3 ปีที่แล้ว

    Great video! This is one of those topics many people have wondered about but haven't explored themselves.

    • @mCoding
      @mCoding  3 ปีที่แล้ว +1

      Glad you enjoyed it!

  • @guiorgy
    @guiorgy 3 ปีที่แล้ว +2

    This is a great guideline for getting started! Thanks a lot!

    • @mCoding
      @mCoding  3 ปีที่แล้ว +1

      You're welcome thanks for watching!

  • @shrirangmahajan9502
    @shrirangmahajan9502 2 ปีที่แล้ว +1

    Excellent video man, so clear and thorough.

    • @mCoding
      @mCoding  2 ปีที่แล้ว +1

      Thank you very much, glad you enjoyed!

  • @whamer100
    @whamer100 3 ปีที่แล้ว

    thanks to this, im finally feeling confident enough to release this one project I've been working on for reading binary data for fun. I've also just now realized how tedious getting testing to work can be, 14 commits later it works on all devices (3.8+ though because i guess Literal types are pretty new)

    • @mCoding
      @mCoding  3 ปีที่แล้ว +1

      Awesome thanks for sharing!

  • @kicknotes
    @kicknotes ปีที่แล้ว

    Great video. A good amount of substance in under 30m... Deep enough without going too deep.

  • @sany2k8
    @sany2k8 2 ปีที่แล้ว

    You're a star as always, eagerly waiting for you new videos

  • @soyciro4623
    @soyciro4623 2 ปีที่แล้ว

    Truly great and quality content.
    There should be more videos about this kind of topics.
    Please, more on this! Thanks

  • @vitaliimorskyi
    @vitaliimorskyi 3 ปีที่แล้ว

    That was a lot of pure content. Just perfect! Subscribed: D
    Good luck, I believe in you ;)

  • @sinat236
    @sinat236 2 ปีที่แล้ว

    Thank you a lot @mCoding, it was a well-structured tutorial. It would be very fantastic if you make an additional tutorial that covers automated testing on Gitlab.

  • @ApiolJoe
    @ApiolJoe 3 ปีที่แล้ว +1

    The video was super useful so I SLAPPED LIKE NOW!

    • @mCoding
      @mCoding  3 ปีที่แล้ว

      Thanks!

  • @bernardyegon4659
    @bernardyegon4659 ปีที่แล้ว

    Great content, I liked it! I have been looking for TH-cam videos with pytest for unit tests in ML as part of the project setup. Thanks!

  • @jerzyzbiaowiezy6249
    @jerzyzbiaowiezy6249 ปีที่แล้ว +1

    Great video, but a little bit tough for beginner.
    I'll watch again:)

    • @mCoding
      @mCoding  ปีที่แล้ว +1

      This is definitely a more intermediate level video and props for giving it an honest try even if you are a beginner! Good habits can go a long way!

  • @LordTeleman
    @LordTeleman 2 ปีที่แล้ว +1

    I'm probably gonna watch this a few times.

    • @mCoding
      @mCoding  2 ปีที่แล้ว

      Thanks! Glad it is helpful!

  • @suryaya441
    @suryaya441 ปีที่แล้ว

    Thanks. I used `unittest` but this guide worked well enough.

  • @DareDevilPhil
    @DareDevilPhil 2 ปีที่แล้ว +1

    Am I missing something, or when you write the tox.ini are you forgetting to install the standard dependencies?
    Seems like it wouldn't make sense to repeat the standard dependencies in the development dependencies

  • @Maric18
    @Maric18 3 ปีที่แล้ว

    i had to cobble this knowledge together from documentation of all the features piece by piece over the course of a day
    and you just did it in half an hour (less, since i actually already had unittests) :D

  • @victornoagbodji
    @victornoagbodji 3 ปีที่แล้ว

    Excellent walkthrough! 😊 Thanks for describing the current state of affairs and where things are headed. I hope we don't end up in a situation where this gets so complex that it drives new comers away from Python. I am already on the fence when it comes to the type hint craziness.

  • @kamaeff
    @kamaeff 3 ปีที่แล้ว +1

    Very impressive! SLAPP LIKE NOW

  • @arthurcpiazzi
    @arthurcpiazzi 2 ปีที่แล้ว

    This video is a gem 💎 congratulations

  • @davidmcdermott8259
    @davidmcdermott8259 2 ปีที่แล้ว +1

    This is very useful information. Thank you. It would be great to also see automated documentation via sphinx or another alternative.

  • @prnva_
    @prnva_ 6 หลายเดือนก่อน

    Amazing walkthrough!

    • @mCoding
      @mCoding  6 หลายเดือนก่อน +1

      Thanks! It might be about time to update it... !

  • @vsolyomi
    @vsolyomi ปีที่แล้ว

    "...you guessed it, another configuration file!" :))

  • @vinvic1578
    @vinvic1578 3 ปีที่แล้ว +1

    This is exactly what I needed. Thanks so much !

    • @mCoding
      @mCoding  3 ปีที่แล้ว +1

      Great to hear you found it useful! 😀

  • @ifeanyinneji7704
    @ifeanyinneji7704 2 ปีที่แล้ว

    Very informative tutorial and glad to know I've been implementing these processes in my current projects with effectiveness 😅

  • @ketanpurohit9086
    @ketanpurohit9086 2 ปีที่แล้ว

    Good job mCoding.. more like this on pytest, hypothesis, asyncio, flask etc.. punchy, high signal to noise ratio. Well done. Have subscribed.

  • @yash1152
    @yash1152 5 หลายเดือนก่อน

    16:07 > _"making a fixture called capture_stdout"_
    now, there's pytest's inbuilt fixture: "capsys" to capture sys.stdout etc stuff. :)

  • @arisweedler4703
    @arisweedler4703 3 ปีที่แล้ว +1

    Awesome! So understandable and straightforward

    • @mCoding
      @mCoding  3 ปีที่แล้ว +1

      Glad to hear you liked it! Thanks for watching!

  • @pahvalrehljkov
    @pahvalrehljkov 2 ปีที่แล้ว

    this was so clear and comprehensive...

    • @mCoding
      @mCoding  2 ปีที่แล้ว

      Thanks!

  • @FoodElitist
    @FoodElitist 2 ปีที่แล้ว

    Very high quality video

  • @kilinw
    @kilinw ปีที่แล้ว

    This is insanely good OMG

  • @nhattran536
    @nhattran536 2 ปีที่แล้ว

    Amazing tutorial - comprehensive coverage and clear explanations. Thank you sir.

    • @mCoding
      @mCoding  2 ปีที่แล้ว

      Very welcome!

  • @THEMithrandir09
    @THEMithrandir09 2 ปีที่แล้ว +1

    What do you think about the python-cookiecutter and the tools used in the hypermodern guide to python? Could be a cool video too.

    • @mCoding
      @mCoding  2 ปีที่แล้ว +3

      I've thought about this but in practice i rarely ever use cookiecutter, even though i follow templates. I just like to put the project together manually as it helps me remember what all the pieces are.

  • @shrirangmahajan9502
    @shrirangmahajan9502 2 ปีที่แล้ว +1

    Thank you so much! Now I *AM* COOOLLLLLL!!!!

    • @mCoding
      @mCoding  2 ปีที่แล้ว

      😎👍

  • @hassaanalansary
    @hassaanalansary 3 ปีที่แล้ว

    Great video, this will be my resource for setting up any project automation
    Perfect amount of information.
    Amazing work, keep it up.

    • @mCoding
      @mCoding  3 ปีที่แล้ว

      Awesome, thank you!

  • @markchadwick77
    @markchadwick77 ปีที่แล้ว

    Great tutorial! So much information.

  • @leuropeocs2
    @leuropeocs2 2 ปีที่แล้ว

    Thats amazing man... thanks for the tutorial!

  • @malteplath
    @malteplath 3 ปีที่แล้ว

    An excellent walk-through. I have shied away from even trying to set up something like this. Now I a) know I was right, and b) have a path to follow.
    Even just the part about "installable package": I have occasionally had to struggle with the situation that IDE, latest and other tools had different opinions on what the root directory was. So, for example, latest would run fine on the command line but fail to find the modules when run via the IDE. I hope that much of that will go away when I add the setuptools boilerplate.

  • @rushen8148
    @rushen8148 2 ปีที่แล้ว

    Thanks for a video! All of your videos are awesome! Keep making it.

    • @mCoding
      @mCoding  2 ปีที่แล้ว

      You're very welcome and thank you for your kind words!

  • @Supakills101
    @Supakills101 2 ปีที่แล้ว

    Extremely helpful video thank you, your channel is a goldmine for me.

  • @Taddy_Mason
    @Taddy_Mason ปีที่แล้ว

    Awesome material!

  • @dirtydan698
    @dirtydan698 3 ปีที่แล้ว +19

    Good God...
    So many config files

    • @danielgysi5729
      @danielgysi5729 3 ปีที่แล้ว +8

      Remember when Python was supposed to be simple and high level? Lol, what a mess

    • @mCoding
      @mCoding  3 ปีที่แล้ว

      Enjoy ;)

  • @Khushpich
    @Khushpich 3 ปีที่แล้ว

    Awesome video, we need more videos about good software development practices

  • @stevenicholes5649
    @stevenicholes5649 2 ปีที่แล้ว

    This guide helped a lot and was very well done. Thanks!

  • @PouriyaJamshidi
    @PouriyaJamshidi 3 ปีที่แล้ว +1

    Very informative. Thanks for sharing!

    • @mCoding
      @mCoding  3 ปีที่แล้ว +1

      Your're very welcome!

  • @thomasbates9189
    @thomasbates9189 ปีที่แล้ว

    You're awesome! Thanks for sharing this information!

    • @mCoding
      @mCoding  ปีที่แล้ว

      You're very welcome!

  • @nadavgolden
    @nadavgolden 3 ปีที่แล้ว

    7:25
    “It’s a good practice to get very specific version numbers”
    Because most of PyPi packages use semantic versioning (or some major.minor scheme) , I think it’s better to use the ~= operator to get the latest minor/major release of the dependency.
    That way you get improvements or bug/security fixes without manual intervention.
    If tests fail because of a dependency, then you can either fix your own code or revert to a specific version that does work.

    • @mCoding
      @mCoding  3 ปีที่แล้ว +1

      It's more than just common practice, semantic versioning is law: www.python.org/dev/peps/pep-0440/.
      The requirements.txt is more about deployment reproducibility, so it is more appropriate to use exact versions in your requirements file so that you get the exact same result on every deployment. The use of ~= wouldn't hurt in most cases, but when I push to prod I want the exact versions of everything specified, no guessing allowed. To me, ~= seems more appropriate for abstract dependencies (in the setup.py/setup.cfg), but I suppose my opinion on this matter isn't authoritative.

    • @nadavgolden
      @nadavgolden 3 ปีที่แล้ว

      @@mCoding that’s a good point. It is a possibility that a patch would break your deployment.
      I think a good compromise would be to have some sort of a lock file like many other languages do 😅

  • @filipemartins8380
    @filipemartins8380 8 หลายเดือนก่อน

    print("Man, thanks for this video!")
    subscription += 1

  • @fullstackspiderman
    @fullstackspiderman 2 ปีที่แล้ว +1

    Slapped that like and subscribe buttons.. 😎👍

  • @pritam-kunduu
    @pritam-kunduu 3 ปีที่แล้ว

    Very good video .. but I knew nothing about how these packages work .. definitely got something to learn

    • @mCoding
      @mCoding  3 ปีที่แล้ว

      Glad it was helpful!

  • @omerfi
    @omerfi 2 ปีที่แล้ว

    Awesome video, thanks a lot !

  • @gurkin33
    @gurkin33 2 ปีที่แล้ว

    Thank you very much! It is very informative video. It helps

  • @ramymagdy3482
    @ramymagdy3482 2 ปีที่แล้ว

    Great explanation of python CI/CD know-how, with nice multi-environments scalability, good job. Please consider the same video content for C/C++

  • @piotr780
    @piotr780 2 ปีที่แล้ว

    why both setup.cfg and requirements files contains list of packages we need ? it's redundant, so mayby we could simplify and add reference to req file in setup.cfg ?

  • @scottmiller2591
    @scottmiller2591 3 ปีที่แล้ว

    I just thought I was bad at projects, seeing all those config files and figuring there must be a better way that a better programmer would know.

    • @mCoding
      @mCoding  3 ปีที่แล้ว

      Python will get there some day! For now, I hope this helps :)

  • @UltimateGPower
    @UltimateGPower 3 ปีที่แล้ว +1

    One thing i would change is to use pre-commit hooks for the linting

    • @mCoding
      @mCoding  3 ปีที่แล้ว +1

      I'm getting there in a future video for sure! I'm sure you know there are just so many things you can do in CI/CD and it was just too much to fit it all in! But I'll get there eventually.

  • @maksimon519
    @maksimon519 ปีที่แล้ว

    this video is extremely useful👍

  • @ConsuelaPlaysRS
    @ConsuelaPlaysRS ปีที่แล้ว

    Tip for newcomers: use ruff instead of flake8 for linting... way faster

  • @PetrSzturc
    @PetrSzturc 3 ปีที่แล้ว

    Really great content and video. Thank you. I will update my project with this new knowledge.

    • @mCoding
      @mCoding  3 ปีที่แล้ว

      Glad it was helpful!

  • @cuteypatootie
    @cuteypatootie 3 ปีที่แล้ว +1

    this is exactly what I needed 👍🏽

    • @mCoding
      @mCoding  3 ปีที่แล้ว +1

      I'm glad you believe in me so much! Thanks!

    • @cuteypatootie
      @cuteypatootie 3 ปีที่แล้ว

      @@mCoding Of course... thank you! Do I need to have all of these versions of python 3.6-3.9 installed on my machine to have tox working? I'm getting interpreter not found errors for 3.6-8, but 3.9 (which I have installed) is working.

  • @tushargupta764
    @tushargupta764 3 ปีที่แล้ว +3

    Videos on topics u said "I wont be covering here".

    • @mCoding
      @mCoding  3 ปีที่แล้ว +3

      Haha okay noted ✅

  • @adarshbattu1568
    @adarshbattu1568 2 ปีที่แล้ว

    Awesome..😎
    PS: I did slash that like 👍🏼 button 😅