- 
                Notifications
    
You must be signed in to change notification settings  - Fork 61
 
          Fix installing conflicting optional dependencies via uv in pyproject.toml
          #188
        
          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
Conversation
aa27972    to
    ad1770b      
    Compare
  
    | [{ extra = "mace" }, { extra = "mattersim" }], | ||
| [{ extra = "mattersim" }, { extra = "graphpes" }], | ||
| [{ extra = "sevenn" }, { extra = "graphpes" }], | ||
| [{ extra = "mace" }, { extra = "sevenn" }], | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anyway to automatically get these ?
(base) ➜  torch-sim git:(test-stress) uv lock
  × No solution found when resolving dependencies for split (python_full_version >= '3.12' and sys_platform == 'win32'):
  ╰─▶ Because torch-sim-atomistic[mattersim] depends on mattersim and mattersim>=1.1.0 depends on e3nn>=0.5.0, we can conclude
      that e3nn<0.5.0, mattersim!=1.0.0, torch-sim-atomistic[mattersim] are incompatible.
      And because mattersim==1.0.0 depends on e3nn==0.5.0 and graph-pes>=0.0.34 depends on e3nn==0.4.4, we can conclude that
      graph-pes>=0.0.34 and torch-sim-atomistic[mattersim] are incompatible.
      And because only the following versions of graph-pes are available:
          graph-pes<=0.0.34
          graph-pes==0.0.35
          graph-pes==0.0.36
          graph-pes==0.1.0
          graph-pes==0.1.1
      and torch-sim-atomistic[graphpes] depends on graph-pes>=0.0.34, we can conclude that torch-sim-atomistic[graphpes] and
      torch-sim-atomistic[mattersim] are incompatible.
      And because your project requires torch-sim-atomistic[graphpes] and torch-sim-atomistic[mattersim], we can conclude that
      your project's requirements are unsatisfiable.running uv lock only seems to give the first one it encounters
| 
           I tried looking around but couldn't find anything that will auto-generate conflicts for you. If we find such a feature in the future we should add that. Although, it might be tough, since this error is useful sometimes which makes me suspect that astral may not add it (and would want you to explicitly define a conflicts section so you're aware of the conflict). The closest thing I found was astral-sh/uv#12005 but the PR doesn't automatically create the conflicts section - it just synthesises every transitive combination between conflicting conficts.  | 
    
| 
          
 Warning Rate limit exceeded@janosh has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 5 minutes and 15 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the  We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
 WalkthroughA new  Changes
 Poem
 🪧 TipsChatThere are 3 ways to chat with CodeRabbit: 
 SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
 Other keywords and placeholders
 CodeRabbit Configuration File (
 | 
    
uv in pyproject.toml
      
Summary
When we run
uv lock(which is ran onuv sync), uv will automatically try to resolve all optional dependencies at the same time. However, many of the models rely on different versions of e3nn - meaning that it's impossible to satisfy all optional dependencies simultaneously.This PR adds a conflicts section inside the pyproject.toml so it knows which optional dependencies will conflict with each other. This enables
uv lockto properly run without throwing an error.Checklist
Before a pull request can be merged, the following items must be checked:
Run ruff on your code.
Summary by CodeRabbit