Skip to content

PyCharm setup help⚓︎

Using pycharm (ideally professional, totally worth it!) may make things a lot easier for you. It is recommended to have one project per repository and opening windows as needed. In the following, we'll provide a few screenshots to help you get started.

Tips and tricks⚓︎

  • Ctrl+Alt+Shift keyboard shortcut for code reformatting (following the code style defined in pycharm; make sure you set up the code style accordingly)
  • 2xShift open a file
  • Ctrl+Shift+F find in files

In the settings (Ctrl+Alt+S) you can edit the Editor > Code Styles for all supported languages (in our case mainly: Python, JavaScript, TypeScript). It is worth taking the time to set this up properly, as you'll get styling hints or have pycharm take care of all styling for you (e.g. correct and consistent spacing). Editorconfig

Setting up Run configurations⚓︎

To set-up run configurations in pycharm follow this image set-up run configs

Under Current File one can define custom run configurations. Chose +-> Python and make sure to switch in the first line from Script nameto Module name.

nacsos-core⚓︎

Hypercorn-pipelines

Mypy

Flake

nacsos-pipelines⚓︎

Hypercorn-pipelines

Mypy

Flake

Setting the environment variables (PYTHONASYNCIODEBUG, PYTHONOPTIMIZE, NACSOS_CONFIG) is critical!

nacsos-data⚓︎

Mypy

Flake

Connection to database (optional)⚓︎

By setting up a database connection, pycharm will check SQL statements in the code for you. You'll also get a query console Ctrl+Shift+F10 (great for testing queries) and you can look at the data (schema and actual tables/rows).

DB Connection – Step 1 Open the Database tool window and select to add new Postgres data source.

DB Connection – Step 2 Enter the connection details and save. You may have to install/select a driver first. It is recommended to test the connection before continuing.

DB Connection – Step 3 Expand the list of tables to reveal schema definitions (and indices,...). Double click on table to see data.