Giter Site home page Giter Site logo

talkpython / mastering-pycharm-course Goto Github PK

View Code? Open in Web Editor NEW
1.1K 76.0 696.0 9.46 MB

Course demos and handouts for Talk Python's Effective PyCharm course

Home Page: https://training.talkpython.fm/courses/explore_pycharm/mastering-pycharm-ide

License: GNU General Public License v2.0

Python 54.04% HTML 0.55% CSS 0.11% JavaScript 0.24% Jupyter Notebook 44.91% Less 0.14%
python python3 pycharm ide editor video tutorials course

mastering-pycharm-course's Introduction

Effective PyCharm course

Visit course page

Resources

JetBrain's PyCharm Cheat Sheet

Course Summary

PyCharm is the premier Python IDE (integrated development environment). You will be hard-pressed to find an editor that gives a more holistic way to build Python applications. While powerful, IDEs can be daunting to learn with all their features. That's why this course shows you how they all work.

What's this course about and how is it different?

This course will teach you to be extremely proficient with PyCharm.

We dive deep into every aspect of the IDE. From project management and using the editor to advanced database management features and the refactoring tools, you will see PyCharm in action and try them out for yourself.

In this course, you will:

  • Learn to manage Python projects in PyCharm (large and small)
  • Create web applications (Pyramid, Flask, Django, and more)
  • Use PyCharm's special data science mode
  • Refactor your Python code with confidence
  • Learn about code smells and duplicate code tooling
  • Access git, GitHub, and use git flow
  • Use the visual debugger to understand code flow and state
  • Make your code more reliable with unit testing and pytest
  • Create new Python packages
  • And lots more

View the full course outline.

Who is this course for?

For anyone who has never used PyCharm: You will see what a true Python IDE has to offer in a concrete and demo-focused tour de force.

Existing PyCharm users: Your IDE has a wealth of features that you might not even know exist. You will see and explore most of them in this course!

Concepts backed by concise visuals

While exploring a topic interactively with demos and live code is very engaging, it can lose the forest for the trees. That's why when we hit a new topic, we stop and discuss it with concise and clear visuals.

Here's an example of concepts reviewing the database tools within PyCharm.

Hands-on exercises for almost every chapter

Learning IDEs can be hard. There are just so many features. Unless you build that muscle memory with practice, most of them will be forgotten. Effective PyCharm has hands-on exercises for almost every chapter of the course.

These exercises range in length from 10 minutes to about 30 minutes each.

Take the course

Check out the course page for more details.

mastering-pycharm-course's People

Contributors

brownlogic avatar dependabot[bot] avatar flavio-fernandes avatar j3rrywan9 avatar mikeckennedy avatar mroswell avatar nmoura avatar sambozek avatar selasley avatar sgtpanic avatar shalgrim avatar swedishmike avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mastering-pycharm-course's Issues

Need a help

a[::] statment has no effect
Error in LIST
Please do help

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 304: invalid start byte

In the file searcher app, users have run into this error:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 304: invalid start byte

The problem here is there is a binary file that is being fed to the read text file option (open(file, 'r')). Here is the fix:

def search_file(filename, search_text):
    
    # NOTE: We haven't discussed error handling yet, but we
    # cover it shortly. However, some folks have been running
    # into errors where this is passed a binary file and crashes.
    # This try/except block catches the error and returns no matches.
    try:

        # matches = []
        with open(filename, 'r', encoding='utf-8') as fin:

            line_num = 0
            for line in fin:
                line_num += 1
                if line.lower().find(search_text) >= 0:
                    m = SearchResult(line=line_num, file=filename, text=line)
                    # matches.append(m)
                    yield m

            # return matches
    except UnicodeDecodeError:
        print("NOTICE: Binary file {} skipped.".format(filename))

bad_wizard readme

Not sure if it's just me, but after reformatting and removing imports the hero.attack ended up on line 58 of instead of the line 57 stated on lines 44 and 48 of the bad_wizard readme. ;)
I'm using pycharm pro 2018.1.3 and running Linux Mint 18.3

Getting 'Cannot use module name 'service.py' in imports' error in the refactoring module

When I try to do the first part of the Large module smell exercise I get the following error:

mpc-4-refactoring-error

The steps I'm trying to do is:

  • Select the following two lines
Episode = namedtuple('Episode', 'title link pubdate show_id')
episode_data = {}
  • Right-click
  • Select 'Refactor / Move'
  • Change the filename to service.py
  • Click 'Refactor'

I'm not sure if I'm doing it the wrong way or if it might have something do do with my OS and/or version of PyCharm.

I'm running version 2018.2 on Xubuntu 16.04.

PyCharm doesn't see virtual environment

My copy of PyCharm (Professional 2020.02 on macOS Catalina) does not see the virtual environment on first opening a project. I am running Python version 3.8.5, installed in /usr/local/bin by HomeBrew.

I followed the instructions under Your Turn - Configure a complex project.
Step 01 shows the Project in PyCharm
Step 02 shows when I run the program PyCharm uses /usr/local/bin/python3.8
Step 03 shows the project interpreter screen

So, you may want to add to the video a section on what to do if the virtual environment is not the default interpreter:
Step 04 - click the gear icon and choose Add...
Step 05 - the Existing environment choice should show the virtual environment already filled in. Select Existing environment and click OK
Step 06 - running the program now uses the correct Python from the virtual environment

Step 01 - Project

Step 02 - Run Program

Step 03 - Interpreter Before

Step 04 - Add Interpreter

Step 05 - Existing Interpreter defaults to  env

Step 06 - Run program works correctly

SQL auto-complete doesn't work in Python code in PyCharm 2018.1.4

I'm as confident as I can be that I followed the instructions here word-for-word, but I just could not get any autocomplete/intellisense functionality going on in the last step where it's supposed to happen in the .py file.

I've got the virtual env set up with requirements installed. That virtual env is the project interpreter. I've got the data source added. I've typed (not pasted) the string in...nothing

I regard this as low priority

"Add method wake_up to Wizard class" is not working

wake_up method

The instruction below is not working, as you can see on the attached image.

"Notice that wake_up should have some warning about it not existing. Put your cursor on wake_up, press alt-enter, and choose "Add method wake_up to Wizard class"."

4 Tracks?

In your-turn | 05-databases | readme should line 32 be changed from

There should be 5 tracks that match.

to

There should be 4 tracks that match.?

Your turn: 4-Refactoring - Expected Final Version Gives Diff Results

I'm a Python noob so I may just be confused, but the latest podcast resulting from expected_final_version is 1 less than the latest podcast resulting from the smelly_podcast. I don't think was intended. You can fix this by adding "+1" at the end of line 19 on the program.py file under expected_final_version. Not sure this is the sexy Python way of fixing it.

Also, when I follow the instructions:

Next up, we have "GET LATEST SHOW ID". We want a method that will return that value. So highlight just max(episode_data.keys()) in the line:

latest_show_id = max(episode_data.keys())

Choose extract method again. Notice that this time, PyCharm found another usage (duplicate code!) we can replace that with this method call too (automatically).

Refactoring to Method doesn't find another usage for duplicate code.

For the instructions:

Finally, notice the remaining section label "DISPLAY RESULTS".

Highlight that and extract it to display_results().

Rerun your program (again, and again). It's still working right? OK then, carry on.

I end up with a display_results() method with "latest_show_id" and "oldest_show_id" as parameters.

bad_wizard missing Wizard.attack() function

Class Wizard in 2-the editor folder is missing an the .attack() function. This is causing an unresolved reference in the program.py file (note, this was probably a miss, but could be added to instructions on how to resolve)

service.py is empty

Hi Mike,

service.py is empty. I guess it's an accident?
mastering-pycharm-course/your-turn/4-refactoring/smelly_podcast/service.py

Web Application - Creating Pyramid project with Chameleon templates

This isn't necessarily a mistake in your book, but PyCharm currently has a bug that isn't getting a lot of attention. the bug prevents anyone from following through the chapter as written. JetBrains is aware of it, here's the following post I found regarding it that provides a link to their YouTrack page of the bug https://intellij-support.jetbrains.com/hc/en-us/community/posts/360005076019-PyCharm-Pyramid-Project-with-Chameleon-Templates-Selected

Hopefully you can provide a work around for the time being?

Python ModuleNotFoundError

I have been struggling with the ModuleNotFoundError: No module named 'requests' error for a while now. I am running Python 3.8 on a Windows 10 platform. I downloaded the python-jumpstart-course-demos files using the GitHub Desktop app. This error is affecting everything I am attempting to do with Python in PyCharm. I believe that it may be a path issue. Usually when I import a library this error appears.

path_error_01

4-refactoring - smelly_podcast doesn't run

I have downloaded the 4-refactoring for Your turn: Refactoring.
I am getting following when I run it.

Welcome to the talk python info downloader.

Traceback (most recent call last):
  File "/Desktop/mastering-pycharm-course/mastering-pycharm-course/your-turn/4-refactoring/smelly_podcast/program.py", line 56, in <module>
    main()
  File "/Desktop/mastering-pycharm-course/mastering-pycharm-course/your-turn/4-refactoring/smelly_podcast/program.py", line 41, in main
    end = random.randint(130, latest_id + 1)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/random.py", line 248, in randint
    return self.randrange(a, b+1)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/random.py", line 226, in randrange
    raise ValueError("empty range for randrange() (%d, %d, %d)" % (istart, istop, width))
ValueError: empty range for randrange() (130, 27, -103)
Working with total of 25 episodes

Process finished with exit code 1

The Python version I have in the virtual environment is 3.8.2 and I have version 2020.1.1 Professional Edition on an iMac with macOS Catalina.

Part 7 - Quick info re Cython extensions on Linux

Just a quick comment re the Cython extensions under Linux in Part 7.

I'm currently running 2018.2 and at least from that version you no longer need to manually cut-paste the instructions for how to install the Cython extensions for debugging.

There's the normal 'install something' link being displayed and you just click that and PyCharm sorts it all for you.

Nothing major, just a minor change in behaviour that may or may not be useful to add if you update the content at some stage in the future.

Cheers, Mike

Is PyCharm professional required for the Data Science "Your Turn" Lab?

Is PyCharm Professional Edition required for the data science "Your Turn: lab? If so, you might want to list that at the top of the "Your Turn" lab. Thanks!

The course may have mentioned this prerequisite, but I think PyCharm Professional Edition is required for the Data Science Lab. I spent some time trying to figure out how to turn on Data Science Mode, and couldn't find it in the new project wizard.

Then I stumbled upon this:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000682290-PyCharm-EAP-where-s-the-scientific-mode-

and this:
https://www.jetbrains.com/pycharm/features/editions_comparison_matrix.html

I could be wrong, but it looks like you need Professional Edition for this lab.

Thanks,
Andrew

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.