Skip to content

IDE configuration

Carlos Ramos Carreño edited this page Sep 7, 2022 · 5 revisions

This is a guide to setup your IDE to use the tools necessary for scikit-fda development.

1. Installation.

First of all, we need to install isort, mypy and wemake-python-styleguide:

$ conda activate <my_environment>
$ pip install isort mypy wemake-python-styleguide

This installs isort, mypy, flake8 and all the necessary plugins.

2. IDE settings.

This includes the IDE-specific configuration. Go to the subsection that correspond with your IDE.

Eclipse

Make sure you have PyDev installed.

  1. Open the Window/Preferences menu.
  2. Go to PyDev/Editor/Code Analysis and mark "Do code analysis?".
  3. Go to the Flake8 subsection, mark "Use Flake8?" and add as arguments to pass to flake8 --format=default.
  4. Go to the Mypy subsection, mark "Use Mypy?" and add as arguments --follow-imports=silent --show-column-numbers --show-error-codes.
  5. Go to PyDev/Editor/Code Style/Imports and in "Select import engine to be used" choose "isort".

VSCode

We need to make sure we have the following in the settings file:

"python.linting.enabled": true,
"python.linting.mypyEnabled": true,
"python.linting.flake8Enabled": true,
"python.pythonPath": "~/anaconda3/bin/python",

To personalize this further, read more about VSCode linting.

If everything was done correctly, one should be able to see all of the problems in VSCode divided into errors 🔴, warnings ⚠️, and infos 🔵:

linting

3. Notes.

  • The common settings for the plugins are in setup.cfg. You should not modify that file without approval, as these settings are enforced for all developers.