Skip to main content

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 list and pip list to 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

minpin-1.0.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

minpin-1.0.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

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

Hashes for minpin-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2953982f5b2e8c957b72479082010910a83097106eff51b7803f29b25f039fac
MD5 d31be46c77798e5ffa21955b9074904b
BLAKE2b-256 12f9ca7a7e6acd23d40e317e1a5a15afac211b007767392c76b1fd1dcb09ef33

See more details on using hashes here.

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

Hashes for minpin-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec325a082253b60808a31167870ffd19fc98127173d9344423c3317973ea492b
MD5 2498581acce9640dce2b9a3d643e370d
BLAKE2b-256 6d67b004b40afab7dfa0fae2be6375e1323de5410f999821c2e3d7504b043ec1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page