15.1. Miscellaneous#

15.1.1. Must-Have VSCode Extensions for Python#

Add these 8 must-have VSCode extensions when you work with Python to boost your productivity.

  1. ๐๐ฒ๐ญ๐ก๐จ๐ง ๐ˆ๐ง๐๐ž๐ง๐ญ: Makes sure your indentation is correct with every Enter you make

  2. ๐๐ฒ๐ฅ๐š๐ง๐œ๐ž: A no-brainer. Includes many benefits like Parameter suggestions, Code navigation, Signature help, and many more. Microsoft declared it as the default language server for Python.

  3. ๐†๐ข๐ญ๐‹๐ž๐ง๐ฌ: Provides powerful features for your Git experience like seeing when a specific line was committed by whom in which pull request with which commit message. And much more. A must-have!

  4. ๐‰๐ฎ๐ฉ๐ฒ๐ญ๐ž๐ซ: Notebook supports and allows any Python environment to be used as a Jupyter kernel.

  5. ๐€๐‘๐„๐๐‹ ๐Ÿ๐จ๐ซ ๐๐ฒ๐ญ๐ก๐จ๐ง: Automatically evaluates Python code in real time as you type. Displays variables and errors in a readable way. Only works for Python >= 3.7.

  6. ๐๐ฒ๐ญ๐ก๐จ๐ง ๐๐š๐ญ๐ก: Helps you generate internal import statements in a Python project.

  7. ๐๐ฒ๐ญ๐ก๐จ๐ง ๐“๐ž๐ฌ๐ญ ๐„๐ฑ๐ฉ๐ฅ๐จ๐ซ๐ž๐ซ: Shows a test explorer without effort instead of going through the output from the terminal.

  8. ๐š๐ฎ๐ญ๐จ๐ƒ๐จ๐œ๐ฌ๐ญ๐ซ๐ข๐ง๐ : Quickly generate docstrings for your functions

15.1.2. Project Setup from Templates with cookiecutter#

Are you starting a new Data Science Project?

And go through the hassle of setting up the project structure?

Try cookiecutter.

cookiecutter is a command-line tool to create projects from templates.

This allows you to save time and have a standardized project structure.

There are tons of cookiecutter projects on GitHub you can use.

Say goodbye to tedious project setup.

Link to cookiecutter repository: https://github.com/cookiecutter/cookiecutter

Data Science cookiecutter: https://github.com/drivendata/cookiecutter-data-science

15.1.3. Project Scaffolding with smol-developer#

Do you want something like create-react-app, but for anything?

Try smol-developer from smol-ai.

smol-developer scaffolds an entire codebase, based on a Markdown file with your specifications.

You describe, what kind of application you want to develop and it will create the necessary boilerplate code.

Link to Repository: https://github.com/smol-ai/developer

15.1.4. Well Commits with commitizen#

Clear and standardized commit messages are important.

But itโ€™s not always easy to have a standardized way in teams.

With commitizen, you will get a release management tool designed for teams.

It helps you define committing rules, bump project versions and create a changelog.

It makes your life easier by enforcing writing descriptive commits.

15.1.5. Docker Best Practice: Use .dockerignore#

One Docker Tip:

Use a .dockerignore file to avoid adding unnecessary files to the image.

This will definitely reduce your Docker image size, but also more safe.

# .dockerignore
.git
.cache
*.md
!README*.md
README-secret.md
.env