Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"ms-azuretools.vscode-docker",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"njpwerner.autodocstring",
"redhat.vscode-yaml",
"shardulm94.trailing-spaces",
Expand Down
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"ms-azuretools.vscode-docker",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"ms-vscode-remote.remote-containers",
"njpwerner.autodocstring",
"oderwat.indent-rainbow",
Expand Down
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"notebook.codeActionsOnSave": {
"notebook.source.fixAll": "explicit",
"notebook.source.organizeImports": "explicit"
},
"notebook.formatOnSave.enabled": true,
"python.defaultInterpreterPath": "/home/vscode/.venv/bin/python",
"python.testing.autoTestDiscoverOnSaveEnabled": false,
"python.testing.pytestEnabled": true,
Expand Down
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
This repository contains configurations to set up a Python development environment using VSCode's Dev Container feature.
The environment includes uv, and Ruff.

![demo](docs/img/ruff.gif)
<img src="docs/img/ruff.gif" width="49%"> <img src="docs/img/jupyter.gif" width="49%">

If the Ruff format does not work, try reloading the VS Code window.
Specifically, you can solve this problem by following the steps below.
Expand All @@ -45,7 +45,7 @@ Specifically, you can solve this problem by following the steps below.

## Branches
- [main](https://github.com/a5chin/python-uv/tree/main)
- [jupyter](https://github.com/a5chin/python-uv/tree/jupyter)
- [jupyter](https://github.com/a5chin/python-uv/tree/jupyter)(Archived)
- [rye](https://github.com/a5chin/python-uv/tree/rye)(Archived)

## Settings
Expand Down Expand Up @@ -93,12 +93,12 @@ Specifically, you can solve this problem by following the steps below.
## GitHub Actions
- `docker.yml`
- Workflow to check if you can build with Docker
- `pyright.yml`
- Workflow to check type
- `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.yml`
- Workflow to check if you can go through Formatter and Linter with Ruff

## Ruff
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.
Expand All @@ -120,10 +120,10 @@ The `.pre-commit-config.yaml` file can contain scripts to be executed before com

```sh
# Python Formatter
uv run ruff format .
uv run nox -s fmt

# Python Linter
uv run ruff check . --fix
uv run nox -s lint -- --pyright --ruff

# Docker Linter
hodolint Dockerfile
Expand Down Expand Up @@ -212,16 +212,19 @@ uv add {libraries}
│ │ ├── __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.lock
```
Binary file added docs/img/jupyter.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/img/ruff.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ dependencies = [
dev = [
"cookiecutter>=2.6.0",
"cookiecutter-data-science>=2.3.0",
"ipykernel>=7.1.0",
"jupyter>=1.1.1",
"mkdocs-material>=9.6.21",
"nox>=2025.5.1",
"pre-commit>=4.3.0",
Expand Down
1,406 changes: 1,393 additions & 13 deletions uv.lock

Large diffs are not rendered by default.