- 
                Notifications
    
You must be signed in to change notification settings  - Fork 0
 
feat: use uv to manage dependencies #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            20 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      6b5f79b
              
                feat: add ADR to use uv for managing dependencies
              
              
                gemmadanks 49de427
              
                chore: rename ADR
              
              
                gemmadanks 6967f6b
              
                feat: migrate from poetry to uv
              
              
                gemmadanks 6c82db3
              
                docs: update README
              
              
                gemmadanks 87cf81f
              
                docs: add ADR-002 to index
              
              
                gemmadanks 83cb0c6
              
                Merge branch 'main' into feat-use-uv
              
              
                gemmadanks 84a0801
              
                chore: pin uv-build
              
              
                gemmadanks 540f863
              
                chore: add pipe to table
              
              
                gemmadanks f6e2d30
              
                chore: fix phrasing
              
              
                gemmadanks ff46fad
              
                chore: fix capitalisation
              
              
                gemmadanks 579f75d
              
                chore: fix phrasing
              
              
                gemmadanks d742f81
              
                chore: update uv.lock
              
              
                gemmadanks a9e8f69
              
                chore: pin uv version in CI workflow
              
              
                gemmadanks 3a6165e
              
                chore: sync dependencies in CI
              
              
                gemmadanks aead2ec
              
                docs: add ADR-002 to navigation
              
              
                gemmadanks b6ce924
              
                docs: update README
              
              
                gemmadanks fc1a50d
              
                Update README.md
              
              
                gemmadanks 03a29ec
              
                chore: fix UV_VERSION
              
              
                gemmadanks c1f39c7
              
                chore: use uv run instead of uvx
              
              
                gemmadanks 07df9d3
              
                chore: use .python-version and caching in CI
              
              
                gemmadanks File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # ADR-002: Manage dependencies with uv | ||
| | | | | ||
| | ---| ---| | ||
| | **Status** | 🟢 Accepted | | ||
| | **Created** | 2025-10-18 | | ||
| | **Last Updated** | 2025-10-18 | | ||
| | **Deciders** | Gemma Danks | | ||
| | **Tags** | packaging | | ||
| 
     | 
||
| --- | ||
| 
     | 
||
| ## Context | ||
| 
     | 
||
| Every software project needs a way to manage dependencies. This allows reproducible, consistent installs across operating systems and machines. The Python ecosystem has several options that have evolved over time. It is important to choose a dependency manager that is fast, easy to use in CI, well supported by the community, uses metadata in the pyproject.toml file (i.e. [PEP 621 compliant](https://peps.python.org/pep-0621/)) and provides a good developer experience. | ||
| 
     | 
||
| ## Problem Statement | ||
| 
     | 
||
| What dependency manager is best for our project? | ||
| 
     | 
||
| ## Options Considered | ||
| 
     | 
||
| | Option | Description | Developer Experience | Speed | Reproducibility | Adoption | CI | PEP 621 | Overall score | Notes | | ||
| |----------|-------------|-------------|-----------------|-------------| ----- | ------|------| ------|------| | ||
| | **Weight** | - | 2 | 2 | 2 | 1| 1 | 1 | - | - | | ||
| | **uv** | New, fast replacement for multiple tools, built in Rust by creators of ruff. | ✅ | ✅ | ✅ | ⚠️ | ✅ | ✅ | 26 | Very fast. Probably the future standard. Also manages python versions. | | ||
| | **Poetry** | Well established packaging manager with wide adoption. | ✅ | ⚠️ | ✅ | ✅ | ✅ | ✅ | 25 | Mature, widely used but slower. | | ||
| | **PDM** | Light-weight, standards-compliant, written in Python. | ✅ | ⚠️ | ✅ | ⚠️ | ✅ | ✅ | 24 | Good option, not as fast or popular as uv. | | ||
| | **mamba** | Reimplementation of conda in C++. | ⚠️ | ✅ | ✅ | ✅ | ✅ | ❌ | 23 | Fast but not PEP 621 compliant | | ||
| | **conda** | Binary package manager, widely used for scientific software. | ⚠️ | ⚠️ | ✅ | ✅ | ✅ | ❌ | 21 | Not as fast and not PEP 621 compliant | | ||
| | **pipenv** | Simplified packaging management tool. | ⚠️ | ⚠️ | ✅ | ⚠️ | ✅ | ❌ | 20 | Not PEP 621 compliant. | | ||
| | **pip + venv** | Standard library tools. | ✅ | ⚠️ | ❌ | ✅ | ✅ | ⚠️ | 20 | Not suitable for complex environments | | ||
| | | ||
| | **spack** | HPC-oriented packaging manager. Supports full stack. | ❌ | ⚠️ | ✅ | ⚠️ | ⚠️ | ❌ | 17 | Best for multi-language environments on HPC clusters. | | ||
| 
     | 
||
| ✅ = 3 (good), ⚠️ = 2 (acceptable), ❌ = 1 (poor) | ||
| 
     | 
||
| ## Decision Outcome | ||
| 
     | 
||
| We will use uv since it is extremely fast and likely to become the new standard. It provides a good developer experience and replaces multiple tools. Performance is particularly important for CI. Poetry and PDM are good alternatives. Poetry is more mature and widely adopted. | ||
| 
     | 
||
| ## Consequences | ||
| 
     | 
||
| Using uv will simplify Python and dependency management. It is extremely fast and so will speed up continuous integration, reducing waiting time substantially where installing dependencies is the bottleneck. It also manages Python versions and is PEP 621 compliant. This tool is likely to become the new standard. | ||
| 
     | 
||
| A risk is that this is under active development and is not yet widely adopted. Alternatives to fall back on include Poetry or PDM. This ADR should be revisited in one year since development in this area is ongoing and adoption of particular tools is in a state of flux. | ||
| 
     | 
||
| ## Confirmation | ||
| 
     | 
||
| The project README will document the usage of uv. CI workflows will use uv and the uv.lock file will be placed under version control. | ||
| 
     | 
||
| ## Links | ||
| 
     | 
||
| | Type | Links | | ||
| | -----| ------| | ||
| | **ADRs** | | | ||
| | **Issues** | | | ||
| | **PRs** | | | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.