Developer Guide#
Welcome to the conda-pypi developer guide! This section provides comprehensive documentation for contributors and developers working on conda-pypi.
Overview#
conda-pypi is built as a conda plugin that provides better PyPI interoperability for the conda ecosystem. Understanding the architecture and development workflow is essential for contributing to the project.
Contents#
Technical architecture, plugin system design, and data flow
Implementation details, technical insights, and development considerations
Complete guide to running tests, writing tests, and using test infrastructure
Getting Started with Development#
This project uses pixi for environment management. All development commands should be run through pixi.
Initial Setup#
# Clone the repository
git clone https://github.com/conda-incubator/conda-pypi.git
cd conda-pypi
# Setup the development environment
pixi run dev
Common Development Tasks#
# Run tests (Python 3.10)
pixi run test
# Run tests with specific Python version
pixi run -e test-py311 test
pixi run -e test-py312 test
pixi run -e test-py313 test
# Run linting and formatting
pixi run pre-commit
# Build documentation
pixi run -e docs docs
# Run benchmarks
pixi run benchmark
Project Structure#
conda-pypi/
├── conda_pypi/ # Main package code
│ ├── plugin.py # Conda plugin registration
│ ├── cli/ # Command-line interface
│ ├── build.py # Wheel to conda conversion
│ ├── translate.py # PyPI ↔ Conda metadata translation
│ ├── convert_tree.py # Dependency resolution
│ └── ...
├── tests/ # Test suite
├── docs/ # Documentation (Sphinx)
├── recipe/ # Conda recipe for building the package
└── pixi.toml # Project configuration
Contributing#
When contributing to conda-pypi:
Test with Multiple Python Versions: Use the provided pixi environments (
test-py310throughtest-py313)Run Pre-commit Hooks: Always run
pixi run pre-commitbefore committingUpdate Documentation: Keep documentation in sync with code changes
Write Tests: Add tests for new features and bug fixes
Follow the Code Style: The project uses
rufffor linting and formatting