Managing dependencies in Python projects can often be daunting, especially when dealing with a mix of Python and non-Python packages. Constant juggling between different dependency files can lead to confusion and inefficiencies in the development process. Meet UniDepa tool designed to streamline and simplify Python dependency management, making it an invaluable asset for developers, particularly in research, data science, robotics, artificial intelligence, and machine learning projects.
Unified dependency file
UniDep presents a unified approach to managing Conda and Pip dependencies in a single file, using requirements.yaml or pyproject.toml. This eliminates the need to maintain separate files such as requirements.txt and environment.yaml, simplifying the entire dependency landscape.
Building System Integration
One of the notable features of UniDep is its seamless integration with Setuptools and Hatchling. This ensures automatic dependency handling during the installation process, making it easy to set up development environments with a single command:
`unidep installation ./your-package`.
One-Command Installation
UniDep's `unidep install` command effortlessly handles Conda, Pip, and local dependencies, providing a comprehensive solution for developers looking for a hassle-free installation process.
Compatible with Monorepo
For projects within a monorepo structure, UniDep excels at rendering multiple requirements.yaml or pyproject.toml files into a single Conda Environment.yaml file. This ensures consistent global and per-subpackage conda-lock files, simplifying dependency management across interconnected projects.
Platform specific support
UniDep recognizes the diversity of operating systems and architectures by allowing developers to specify dependencies tailored to different platforms. This ensures a smooth experience when working in various environments.
pip build integration
UniDep integrates with pip-compile, allowing the generation of fully fixed requirements.txt files from requirements.yaml or pyproject.toml files. This promotes the reproducibility and stability of the environment.
Integration with conda-lock
UniDep improves the functionality of conda-lock by allowing the generation of fully anchored conda-lock.yml files from one or more requirements.yaml or pyproject.toml files. This tight integration ensures consistency in dependency versions, which is crucial for reproducible environments.
Nerd Stats
Developed in Python, UniDep features over 99% test coverage, full typing support, Ruff rules compliance, extensibility, and minimal dependencies.
UniDep is particularly useful when setting up full development environments that require Python and non-Python dependencies, such as CUDA, compilers, etc. Its one-command installation and support for multiple platforms make it a valuable tool in fields such as research and data science. , robotics, ai and ML.
Real world application
UniDep shines in monorepos with multiple dependent projects, although many of those projects are private. A public example, home-assistant-streamdeck-yaml, shows UniDep's efficiency in handling system dependencies on different platforms.
UniDep emerges as a powerful ally for developers looking for simplicity and efficiency in Python dependency management. Whether you prefer Conda or Pip, UniDep streamlines the process, making it an essential tool for anyone working with complex development environments. Try UniDep now and witness a significant boost in your development process.
Niharika is a Technical Consulting Intern at Marktechpost. She is a third-year student currently pursuing her B.tech degree at the Indian Institute of technology (IIT), Kharagpur. She is a very enthusiastic person with a keen interest in machine learning, data science and artificial intelligence and an avid reader of the latest developments in these fields.
<!– ai CONTENT END 2 –>