- Notifications
You must be signed in to change notification settings - Fork61
This repository contains configurations to set up a Python development environment using VSCode's Dev Container feature. The environment includes uv and Ruff.
License
a5chin/python-uv
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repository contains configurations to set up a Python development environment using VSCode's Dev Container feature.The environment includes uv, and Ruff.
If the Ruff format does not work, try reloading the VS Code window.Specifically, you can solve this problem by following the steps below.
- Type
⌘+⇧+Pto open the command palette - Type
Developer: Reload Windowin the command palette to reload the window
- files.insertFinalNewline
- files.trimTrailingWhitespace
- editor.formatOnSave
- dockercompose
- dockerfile
- github-actions-workflow
- json, jsonc
- python
- toml
- yaml
devcontainer.json- features
- hadolint
- extentions
- charliermarsh.ruff
- codezombiech.gitignore
- eamodio.gitlens
- kevinrose.vsc-python-indent
- mosapride.zenkaku
- ms-azuretools.vscode-docker
- ms-python.python
- njpwerner.autodocstring
- oderwat.indent-rainbow
- pkief.material-icon-theme
- redhat.vscode-yaml
- shardulm94.trailing-spaces
- tamasfe.even-better-toml
- usernamehw.errorlens
- yzhang.markdown-all-in-one
- features
Dockerfile- Only Dev dependencies
pre-commitpyrightpytestruff
- Only Dev dependencies
buildWithRust.Dockerfile- Use the Rust compiler when you need it!
- Fix dockerfile in
.devcontainer/devcontainer.json
docker.yml- Workflow to check if you can build with Docker
format.yml- Workflow to check format
lint.yml- Workflow to check lint
test.yml- Workflow to check if all the described tests can be passed with pytest
Ruff can be used to replace Flake8, Black, isort, pydocstyle, pyupgrade, autoflake, etc., and yet run tens to hundreds of times faster than the individual tools.
To change the configuration, it is necessary to rewrite ruff.toml, andit is recommended to set it to ignore conflicts such as the following:
ignore = ["COM812","COM819","D100","D203","D213","D300","E111","E114","E117","ISC001","ISC002","Q000","Q001","Q002","Q003","W191",]
The.pre-commit-config.yaml file can contain scripts to be executed before commit.
# Python Formatteruv run nox -s fmt# Python Linteruv run nox -s lint -- --pyright --ruff# Docker Linterhodolint Dockerfile
To run the test, use the following command:
uv run pytest
To use cookiecutter for template, use the following command:
uv run cookiecutter {url}- Data Science
- Django
- FastAPI
- Flask
# Install also include develop dependenciesuv sync# If you do not want dev dependencies to be installeduv sync --no-dev# Use the add command to add dependencies to your projectuv add {libraries}
.├── .devcontainer/│ ├── devcontainer.json│ └── Dockerfile├── .github/│ ├── actions/│ │ ├── setup-git-config│ │ │ └── action.yml│ │ └── setup-python-with-uv│ │ └── action.yml│ ├── workflows/│ │ ├── docker.yml│ │ ├── pyright.yml│ │ ├── ruff.yml│ │ └── test.yml│ └── dependabot.yml├── .vscode│ ├── extensions.json│ └── settings.json├── tests/│ └── tools/│ ├── test__config.py│ ├── test__logger.py│ └── test__tracer.py├── tools/│ ├── config/│ │ ├── __init__.py│ │ ├── fastapi.py│ │ └── settings.py│ ├── logger/│ │ ├── __init__.py│ │ ├── color.py│ │ ├── googlecloud.py│ │ ├── local.py│ │ ├── logger.py│ │ ├── style.py│ │ └── type.py│ ├── tracer/│ │ ├── __init__.py│ │ └── timer.py│ └── __init__.py├── .coveragerc├── .dockerignore├── .env.local├── .gitignore├── .pre-commit-config.yaml├── .python-version├── Dockerfile├── noxfile.py├── pyproject.toml├── pyrightconfig.json├── pytest.ini├── README.md├── renovate.json├── ruff.toml└── uv.lockAbout
This repository contains configurations to set up a Python development environment using VSCode's Dev Container feature. The environment includes uv and Ruff.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.

