From af04b262baaadd565362cc8050cc898f973ffb3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Tue, 19 Mar 2024 10:00:08 -0700 Subject: [PATCH] README: add editor setup --- README.md | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d852245a2..46b32f2b8 100644 --- a/README.md +++ b/README.md @@ -70,8 +70,6 @@ There are two directories of examples: - [foundational](https://github.com/daily-co/daily-ai-sdk/tree/main/src/examples/foundational) — demos that build on each other, introducing one or two concepts at a time - [starter apps](https://github.com/daily-co/daily-ai-sdk/tree/main/src/examples/starter-apps) — complete applications that you can use as starting points for development - - ## Hacking on the framework itself _Note that you may need to set up a virtual environment before following the instructions below. For instance, you might need to run the following from the root of the repo:_ @@ -99,3 +97,35 @@ If you want to use this package from another directory, you can run: ``` pip install path_to_this_repo ``` + +## Setting up your editor + +This project uses strict [PEP 8](https://peps.python.org/pep-0008/) formatting. + +### Emacs + +You can use [use-package](https://github.com/jwiegley/use-package) to install [py-autopep8](https://codeberg.org/ideasman42/emacs-py-autopep8) package and configure `autopep8` arguments: + +```elisp +(use-package py-autopep8 + :ensure t + :defer t + :hook ((python-mode . py-autopep8-mode)) + :config + (setq py-autopep8-options '("-a" "-a"))) +``` + +### Visual Studio Code + +Install the [autopep8](https://marketplace.visualstudio.com/items?itemName=ms-python.autopep8) extension, set it as the default Python formatter, enable formatting on save and configure `autopep8` arguments: + +```json +"[python]": { + "editor.defaultFormatter": "ms-python.autopep8", + "editor.formatOnSave": true +}, +"autopep8.args": [ + "-a", + "-a" +], +```