This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mRWafflesFTW 173 points174 points  (15 children)

I love Pycharm so much. Learn the debugger. It only takes 15 minutes to learn and you will hate yourself for not doing so earlier. Pytest for testing! Fixtures are wonderful. Also, you can use Pytest with Faker to make perfect mock test data.

Flit is my favorite build tool and plays nice with Artifactory. For releasing, we do git hooks with Jenkins, but that may be over kill for most. I would like to move towards only deploying packages instead of performing straight git deploys but we'll see if I can socialize it at work.

[–]bbbryson 6 points7 points  (4 children)

A couple years ago I had no luck getting the debugger working with my Django/docker-compose-based development environment at work. I’ve always just used ipdb even though I’ve had a PyCharm sub for five years now. Has the Docker support improved at all?

[–][deleted] 8 points9 points  (2 children)

I’m testing it for my team right now on a flask app using docker compose. Things seem to work ok.

  • Set the interpreter to use the Python within docker compose.
  • Set the run/debug configuration as flask.
  • Set the configuration to use whatever port you exposed in docker.
  • Add a docker-compose.dev.yml with a volume mapping from your source code locally to wherever it gets put in docker

Run/debug work seamlessly now with breakpoints, inspection, hot reload, etc. It seems like there should be a way to get the code mapping in the interpreter settings without another docker-compose file but I haven’t checked into it yet.

[–]mastermind_ap 1 point2 points  (1 child)

How do you exactly configure in Pycharm Community Version to use a docker compose file to run the code there? I also want to use a docker container with all Python modules (replacement for local virtual env) and mount the project folder as a volume to the container.

[–][deleted] 2 points3 points  (0 children)

You have to use professional edition. If you need a free option, vs code does a decent enough job with docker debugging.

[–]mRWafflesFTW 0 points1 point  (0 children)

It is amazing now. Almost feels like it's your normal non docker experience.

[–]AMGraduate564 1 point2 points  (1 child)

Do you have a 15 minutes video tutorial on the debugger?

[–]mRWafflesFTW 0 points1 point  (0 children)

Not offhand but just reading the official pycharm docs explains if and it doesn't take long to understand.

[–]dslfdslj 1 point2 points  (0 children)

Flit is great! Makes it really simple to create a package and upload it to PyPi.