mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-24 16:55:45 +08:00

* add post-installation script * set zsh as default terminal and make post-install execution on postcreate * rename file * rename script * Create devcontainers_ci.yml * Update devcontainer.json * Update devcontainers_ci.yml Never push image built here. It's for build testing purpose only. * postCreateCommand update to reflect that the shell script has been renamed. * update devcontainer readme file * trigger workflow only on devcontainer/** changes * prettier refactor
43 lines
1.2 KiB
Markdown
43 lines
1.2 KiB
Markdown
# Development Container
|
|
|
|
This is **Devcontainer** configuration to provide a consistent development environment for all contributors.
|
|
|
|
## Features
|
|
|
|
- [x] Pre-configured **Python environment**
|
|
- [x] Automatic installation of **pre-commit hooks**
|
|
- [x] **Ruff** linter ready to check your code
|
|
- [x] **Oh My Zsh** with plugins:
|
|
- `zsh-autosuggestions`
|
|
- `zsh-syntax-highlighting`
|
|
|
|
## Usage
|
|
|
|
1. Install [**Docker** ](https://www.docker.com/get-started/) and [**Visual Studio Code**](https://code.visualstudio.com/)
|
|
2. Install the **Remote - Containers** extension in VS Code
|
|
|
|
- Do `CTRL+P`, paste this command and press `Enter`
|
|
|
|
```shell
|
|
ext install ms-vscode-remote.remote-containers
|
|
```
|
|
3. Open this repository in VS Code
|
|
4. When prompted, click **"Reopen in Container"**
|
|
5. Wait for the environment to build and initialize
|
|
|
|
After setup:
|
|
|
|
- `pre-commit` hooks are installed
|
|
- `ruff` and other tools are available
|
|
- The shell uses Zsh by default
|
|
|
|
## Tips
|
|
|
|
To manually run checks on all files:
|
|
|
|
```bash
|
|
pre-commit run --all-files
|
|
```
|
|
|
|
> For further information here's [Microsoft tutorial about devcontainers.](https://code.visualstudio.com/docs/devcontainers/tutorial)
|