|
| 1 | +# Contributing to Pixi Code |
| 2 | + |
| 3 | +Thank you for your interest in contributing to Pixi Code! This document provides guidelines for contributing to this VS |
| 4 | +Code extension that integrates Pixi environments with the Python Environments extension. |
| 5 | + |
| 6 | +## Development setup |
| 7 | + |
| 8 | +1. **Prerequisites** |
| 9 | + - Node.js 20+ |
| 10 | + - VS Code with the Python Environments extension installed |
| 11 | + - Pixi installed on your system |
| 12 | + |
| 13 | +2. **Clone and setup** |
| 14 | + |
| 15 | + ```bash |
| 16 | + git clone https://github.com/renan-r-santos/pixi-code.git |
| 17 | + cd pixi-code |
| 18 | + npm install |
| 19 | + ``` |
| 20 | + |
| 21 | +3. **Development workflow** |
| 22 | + ```bash |
| 23 | + npm run compile # Build the extension |
| 24 | + npm run watch # Watch for changes during development |
| 25 | + ``` |
| 26 | + |
| 27 | +## Code style and quality |
| 28 | + |
| 29 | +This project maintains strict code quality standards using TypeScript, ESLint, and Prettier. All code must pass these |
| 30 | +quality checks before being merged. |
| 31 | + |
| 32 | +```bash |
| 33 | +npm run lint # Check for linting issues |
| 34 | +npm run format:check # Check code formatting |
| 35 | +npm run compile # Build and verify compilation |
| 36 | +``` |
| 37 | + |
| 38 | +Fixing issues: |
| 39 | + |
| 40 | +```bash |
| 41 | +npm run format # Auto-fix formatting issues |
| 42 | +npm run lint -- --fix # Auto-fix linting issues where possible |
| 43 | +``` |
| 44 | + |
| 45 | +## Making a contribution |
| 46 | + |
| 47 | +### 1. Fork and branch |
| 48 | + |
| 49 | +Fork the repository and create a feature branch: |
| 50 | + |
| 51 | +```bash |
| 52 | +git checkout -b feature/your-feature-name |
| 53 | +``` |
| 54 | + |
| 55 | +### 2. Development guidelines |
| 56 | + |
| 57 | +- **Follow existing patterns**: Study the codebase structure and maintain consistency |
| 58 | +- **TypeScript strict mode**: Leverage strong typing throughout |
| 59 | +- **Import organization**: ESLint automatically sorts and organizes imports |
| 60 | +- **Code formatting**: Use Prettier to format your code |
| 61 | +- **Logging**: Use the provided logging utilities in `src/common/logging.ts` |
| 62 | + |
| 63 | +### 3. Extension testing |
| 64 | + |
| 65 | +Test the extension functionality: |
| 66 | + |
| 67 | +1. Press `F5` in launch VS Code in debug mode |
| 68 | +2. Open a project containing `pixi.toml` or `pyproject.toml` |
| 69 | +3. Verify Pixi environments are discovered and functional |
| 70 | +4. Test environment switching and terminal activation |
| 71 | + |
| 72 | +### 4. Commit and submit |
| 73 | + |
| 74 | +- Reference any related issues |
| 75 | +- Submit a pull request with detailed description |
0 commit comments