![]() ![]() Setting up pytest test runner for P圜harm- add pytest package -> create package within P圜harm project -> add to git -> create test files that match your projects P圜harm files -> create run configuration for your test files: edit configurations -> add ‘+’ Python Tests ->py.test -> apply and okay -> run code for unit testing -> update the repositoryĬreating a database- View -> Tool Windows -> Database -> create new database source with: green plus sign -> Data Source -> Select Database -> Download Drivers if needed for Database -> right click on your Python file and Copy Path -> Paste the copied file path into the File: for database and add a name to your database ->Test your connection to your database Refactoring in P圜harm- used when there is not a programming error but can be used to clean up code -> right click on code -> refactor -> rename -> update repositoryĭebugging in P圜harm- select line of code with bug -> run code -> go to debug tab -> find bug in script -> right click on code -> go to -> declaration or use the defined keyboard shortcut -> make breakpoint in code -> rerun debug -> step through the code to solve issue -> read the red errors and determine the coding issue Ensuring you understand python syntax is crucial to learn how to use pycharmįix formatting issues for PEP8 Python Standards- hover over the top right yellow corner in a python file to see warnings on python file -> click on code with error and press alt + enter to access intents -> press enter to reformat -> use lens mode by hovering over yellow lines and clicking on right side of P圜harm file -> ignore errors that are not relevant -> update revision control after code is updated: revision control panel below -> select default -> commit changes -> commit message ‘fixed formatting issues’Īdjusting for code quality- if you are colorblind and using P圜harm: go into file -> settings -> appearance and behavior -> appearance -> select adjust colors for red-green button -> highlight all the code to tab multiple lines of code at once Python standards such as white spaces and indentation are called PEP 8. Working with Github and P圜harm- VCS tab -> checkout from version control -> github -> password -> give github credentials -> select repository that you want to work with -> directory is /pycharmprojects -> clone Useful Navigation shortcuts are shown once there are no projects or scripts open, for more keyboard shortcuts then go to help tab -> keymap reference for keyboard shortcuts pdfĬonnect P圜harm and Git- VCS tab -> import into version control -> create git repository -> select top level of the python project -> add files to the git repository by right clicking on the file and selecting the repository -> add file to git -> you can also add by right clicking on a python package -> bottom left corner -> select version control -> commit file by right clicking individual files or clicking default then the commit changes button or right click on Default and commit changes all at once -> commit message, initial commit -> commit -> provide username and password if haven’t done yet -> unversioned files can be ignored under. Use ‘#TODO’ to place a note to code later -> access TODO in lower left corner -> click on blue on right side to access TODO notationĪdd Pypy packages to get third party libraries- in windows: file -> settings -> select project -> project interpreter ->you will see libraries in the project -> click ‘+’ in top right to add new 3rd party libraries to P圜harm. Setting Up P圜harm- do not import settings -> choose your keymap scheme, IDE theme and editor appearance -> change settings that are necessaryĬreate project in pycharm – open pycharm -> create new project -> name project -> set up virtual environment as interpreter -> create projectĬreate script in pycharm- right click on project folder -> new -> python file -> enter code -> create run configuration: Run tab -> edit configurations -> add python -> name run configuration -> assign run configuration to the script you are working onĬreating packages- in P圜harm- right click on project -> new -> python package -> name package -> add to package: right click Install git for your computer: Mac- install Xcode and related developer tools, Linux- use packet manager, Windows- download git from windows It provides code hinting, built in hintĭownload python from for the computer you are using *this is a study guide that was created from lecture videos and is used to help you gain an understanding of how to use pycharm.Īn integrated development environment made for Python. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |