https://github.com/python-mode/python-mode
Vim python-mode. PyLint, Rope, Pydoc, breakpoints from box.
https://github.com/python-mode/python-mode
Last synced: 3 days ago
JSON representation
Vim python-mode. PyLint, Rope, Pydoc, breakpoints from box.
- Host: GitHub
- URL: https://github.com/python-mode/python-mode
- Owner: python-mode
- License: lgpl-3.0
- Created: 2011-09-18T09:41:07.000Z (over 14 years ago)
- Default Branch: develop
- Last Pushed: 2025-11-17T20:03:40.000Z (about 1 month ago)
- Last Synced: 2025-12-14T16:39:55.579Z (5 days ago)
- Language: Vim Script
- Homepage:
- Size: 10.8 MB
- Stars: 5,470
- Watchers: 270
- Forks: 770
- Open Issues: 37
-
Metadata Files:
- Readme: README-Docker.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: COPYING
- Authors: AUTHORS
Awesome Lists containing this project
- stars - python-mode/python-mode - mode. PyLint, Rope, Pydoc, breakpoints from box. (Tutorial / Windows Manager)
- awesome-python - python-mode - An all in one plugin for turning Vim into a Python IDE. (Editor Plugins and IDEs)
- awesome-python-zh - python-mode - 一个all in one插件,用于将Vim转换为Python IDE。 (编辑器插件和ide)
- awesome-python - Python-mode - An all in one plugin for turning Vim into a Python IDE. (Editor Plugins and IDEs)
- awesome - python-mode - Vim python-mode. PyLint, Rope, Pydoc, breakpoints from box. (Python)
- python-awesome - python-mode - An all in one plugin for turning Vim into a Python IDE. (Editor Plugins and IDEs)
- awesome-python - python-mode - An all in one plugin for turning Vim into a Python IDE. (Editor Plugins and IDEs)
- awesome-python-resources - GitHub - 2% open · ⏱️ 28.01.2022): (Emacs [elpy](https://github.com/jorgenschaefer/elpy):Emacs Python 开发环境。)
- awesome-python - Python-mode - An all in one plugin for turning Vim into a Python IDE. (Editor Plugins and IDEs)
- awesome-python - python-mode - Vim python-mode. PyLint, Rope, Pydoc, breakpoints from box. ` 📝 2 months ago` (Editor Plugins and IDEs [🔝](#readme))
- awesome-python - Python-mode - An all in one plugin for turning Vim into a Python IDE. (Editor Plugins and IDEs)
- fucking-awesome-python - python-mode - An all in one plugin for turning Vim into a Python IDE. (Editor Plugins and IDEs)
- fucking-awesome-python - :octocat: python-mode - :star: 5417 :fork_and_knife: 893 - An all in one plugin for turning Vim into a Python IDE. (Editor Plugins and IDEs)
- awesome-python - Python-mode - An all in one plugin for turning Vim into a Python IDE. (Editor Plugins and IDEs)
- awesome-python-cn - python-mode
- Awesome-Python - Python-mode - An all in one plugin for turning Vim into a Python IDE. (Editor Plugins and IDEs)
- Python-Awesome - Python-mode - An all in one plugin for turning Vim into a Python IDE. (Editor Plugins and IDEs)
- awesome-python - python-mode - An all in one plugin for turning Vim into a Python IDE. (Editor Plugins and IDEs)
- awesome-python - python-mode - 3.0](https://api.github.com/licenses/lgpl-3.0)- Vim python-mode. PyLint, Rope, Pydoc, breakpoints from box. (Awesome Python / Editor Plugins and IDEs)
- awesome-python - python-mode - An all in one plugin for turning Vim into a Python IDE. (Editor Plugins and IDEs)
- fucking-awesome-python-cn - python-mode
- git-github.com-vinta-awesome-python - Python-mode - An all in one plugin for turning Vim into a Python IDE. (Editor Plugins and IDEs)
README
# Docker Test Environment for python-mode
This directory contains Docker configuration to run python-mode tests locally. **Note:** Docker is only used for local development. CI tests run directly in GitHub Actions without Docker.
## Prerequisites
- Docker
- Docker Compose
## Quick Start
### Run Tests
To run all tests in Docker (default version 3.13.0):
```bash
# Using the convenience script
./scripts/user/run-tests-docker.sh
# Or manually with docker-compose
docker compose run --rm python-mode-tests
```
### Interactive Development
To start an interactive shell for development:
```bash
docker compose run --rm python-mode-dev
```
## What's Included
The Docker environment includes:
- **Ubuntu 24.04** base image
- **pyenv** for Python version management
- **Multiple Python versions**: 3.10.13, 3.11.9, 3.12.4, 3.13.0
- **Python 3.13.0** as default
- **Vim built from source** with Python support for each Python version
- All required system dependencies:
- GUI libraries (GTK, X11, etc.)
- Lua 5.2
- Perl
- Build tools
- Python build dependencies
- **python-mode plugin** properly installed and configured
- **Git submodules** initialized
- **Test environment** matching the CI setup
## Environment Details
The container replicates the GitHub Actions environment:
- Vim is built with `--enable-python3interp=yes` for each Python version
- pyenv is installed at `/opt/pyenv`
- Python versions are managed by pyenv:
- 3.10.13
- 3.11.9
- 3.12.4
- 3.13.0 (default)
- Each Python version has its own Vim binary: `vim-3.10.13`, `vim-3.11.9`, etc.
- Python config directory is automatically detected using `python-config --configdir`
- python-mode is installed in `/root/.vim/pack/foo/start/python-mode`
- Test configuration files are copied to the appropriate locations
- All required environment variables are set
## Test Execution
### Local Testing (Docker)
Tests are run using the Vader test framework via Docker Compose:
```bash
# Using docker compose directly
docker compose run --rm python-mode-tests
# Or using the convenience script
./scripts/user/run-tests-docker.sh
# Or using the Vader test runner script
./scripts/user/run_tests.sh
```
### CI Testing (Direct Execution)
In GitHub Actions CI, tests run directly without Docker using `scripts/cicd/run_vader_tests_direct.sh`. This approach:
- Runs 3-5x faster (no Docker build/pull overhead)
- Provides simpler debugging (direct vim output)
- Uses the same Vader test suite for consistency
**Vader Test Suites:**
- **autopep8.vader** - Tests automatic code formatting (8/8 tests passing)
- **commands.vader** - Tests Vim commands and autocommands (7/7 tests passing)
- **folding.vader** - Tests code folding functionality
- **lint.vader** - Tests linting functionality
- **motion.vader** - Tests motion operators
- **rope.vader** - Tests Rope refactoring features
- **simple.vader** - Basic functionality tests
- **textobjects.vader** - Tests text object operations
All legacy bash tests have been migrated to Vader tests.
## Testing with Different Python Versions
You can test python-mode with different Python versions:
```bash
# Test with Python 3.11.9
./scripts/user/run-tests-docker.sh 3.11
# Test with Python 3.12.4
./scripts/user/run-tests-docker.sh 3.12
# Test with Python 3.13.0
./scripts/user/run-tests-docker.sh 3.13
```
Available Python versions: 3.10.13, 3.11.9, 3.12.4, 3.13.0
Note: Use the major.minor format (e.g., 3.11) when specifying versions.
## Troubleshooting
### Python Config Directory Issues
The Dockerfile uses `python-config --configdir` to automatically detect the correct Python config directory. If you encounter issues:
1. Check that pyenv is properly initialized
2. Verify that the requested Python version is available
3. Ensure all environment variables are set correctly
### Build Failures
If the Docker build fails:
1. Check that all required packages are available in Ubuntu 24.04
2. Verify that pyenv can download and install Python versions
3. Ensure the Vim source code is accessible
4. Check that pyenv is properly initialized in the shell
### Test Failures
If tests fail in Docker but pass locally:
1. Check that the Vim build includes Python support for the correct version
2. Verify that all git submodules are properly initialized
3. Ensure the test environment variables are correctly set
4. Confirm that the correct Python version is active
5. Verify that pyenv is properly initialized
## Adding More Python Versions
To add support for additional Python versions:
1. Add the new version to the PYTHON_VERSION arg in the Dockerfile
2. Update the test scripts to include the new version
3. Test that the new version works with the python-mode plugin
4. Update this documentation with the new version information