Automatically add minimum version pins to unpinned packages in conda YAML files.
Project description
/ \__
( @\_____
/ O
/ (_____/
/_____/ U
Min Pin
Min Pin is a command-line tool that automatically adds minimum version pins to unpinned packages in conda-friendly YAML files, such as environment.yml or anaconda-project.yml.
Features
- Parses
conda listandpip listto retrieve installed package versions. - Updates YAML files by adding minimum version pins to unpinned packages.
- Handles both conda and pip dependencies.
- Preserves the original structure and comments of the YAML file.
Installation
pip install minpin
Usage
minpin ./environment.yml
Optionally, specify a conda list output file which you can create with conda list > conda_list.txt:
minpin anaconda-project.yml --conda-list conda_list.txt
Example
Input: original environment.yml
channels:
- conda-forge
dependencies:
- python=3.10
- numpy
- pandas>=1.3
- pip
- pip:
- requests
- flask
Output: Updated environment.yml
channels:
- conda-forge
dependencies:
- python=3.10
- numpy>=1.24.0 # auto min pinned 2024-11-18
- pandas>=1.3.3 # auto min pinned 2024-11-18
- pip
- pip:
- requests>=2.28.2 # auto min pinned 2024-11-18
- flask>=2.2.3 # auto min pinned 2024-11-18
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file minpin-1.0.0.tar.gz.
File metadata
- Download URL: minpin-1.0.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2953982f5b2e8c957b72479082010910a83097106eff51b7803f29b25f039fac
|
|
| MD5 |
d31be46c77798e5ffa21955b9074904b
|
|
| BLAKE2b-256 |
12f9ca7a7e6acd23d40e317e1a5a15afac211b007767392c76b1fd1dcb09ef33
|
File details
Details for the file minpin-1.0.0-py3-none-any.whl.
File metadata
- Download URL: minpin-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec325a082253b60808a31167870ffd19fc98127173d9344423c3317973ea492b
|
|
| MD5 |
2498581acce9640dce2b9a3d643e370d
|
|
| BLAKE2b-256 |
6d67b004b40afab7dfa0fae2be6375e1323de5410f999821c2e3d7504b043ec1
|