MDAnalysis / mdanalysis

MDAnalysis is a Python library to analyze molecular dynamics simulations.
https://mdanalysis.org
Other
1.31k stars 648 forks source link

[CI] Dependency resolution issues MDAnalysis installs #4492

Closed IAlibay closed 1 month ago

IAlibay commented 7 months ago

I'll update as I get more information, but here is a very quick overview of the issue:

Due to the use of non-optional mdakits as dependencies, the MDAnalysis package now technically depends on itself. This is causing issues, particularly in CI, where we are installing MDA 2.7.0 via conda-forge and then pip installing develop on top of it. Because we are building without isolation, this is causing environment clash issues.

Solution?

A quick solution here is maybe to pip install the kits with --no-deps ahead of the MDA install? It's not pretty but it could be an easy short term solution.

hmacdope commented 7 months ago

This is not ideal, but I can't see an obvious way around this in packaging the kits themselves.

--no-deps seems like the best option to me, the core repo then has to manually manage kit deps themselves but this is a small price to pay to avoid this circular stuff which is bad.

IAlibay commented 7 months ago

I'll say the no-deps thing is really an initial thought for now, I really need to dig into how big a problem this is. I'm a bit concerned about how it'll work out with packaging (I imagine conda-forge isn't going to be happy with the dependency cycle).

IAlibay commented 7 months ago

Looks like just letting pip resolve the missing packages during src build may solve the problem here - at least it doesn't appear to be pulling down MDAnalysis itself.

orbeckst commented 6 months ago

That's ugly but also transitory until we have 3.0 when we remove the stubs for migrated kits.

If the --no-deps band aid works for our CI then that's fine for now, I think.

For conda-forge I am holding my breath... I assume that if we can't get away with the circular dependency then we need to make these kits optional and ask users to install them.