Skip to content
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

We should handle chained dependencies more carefully #35

Open
lothian opened this issue May 24, 2022 · 0 comments
Open

We should handle chained dependencies more carefully #35

lothian opened this issue May 24, 2022 · 0 comments

Comments

@lothian
Copy link
Member

lothian commented May 24, 2022

We have a natural hierarchy of dependencies within PyCC, e.g.:

hamiltonian <-- ccwfn <-- cclambda <-- ccdensity <-- rtcc

However, the __init__ functions for objects higher in the dependency structure still require explicit passing of lower-level objects, e.g., in the rtcc object:

def __init__(self, ccwfn, cclambda, ccdensity, V, magnetic = False, kick = None):

This API implies some flexibility as to which ccwfn or cclambda objects the user might pass into the constructor, as though it could actually be different from that used to build the rtcc propagator, but this is clearly not the case.

I think we should change the higher-level interfaces to be more careful about exposing fragile dependencies to user whims/errors. This would also simplify the interfaces, which is always nice, but, of course, would require changing all our test cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant