pymad / cpymad

cPyMAD is a python interface to Mad-X using cython and libmadx
http://cern.ch/pymad
Apache License 2.0
3 stars 3 forks source link

Replace CpymadService by a simpler model Factory #90

Closed coldfix closed 10 years ago

coldfix commented 10 years ago

Until to now, the package was missing a convenient way to instanciate models given a specific locator. This gap is now filled by the model.Factory type.

Furthermore, the CpymadService becomes unnecessary, since the instance management belongs in user code IMO and instance creation is performed by the conceptually simpler model.Factory.

Note: the first two commits are part of the pure-package PR which is not an essential dependency for this. It was just to avoid a merge conflict later on. But I can rebase it, if you reject the other PR.

Eothred commented 10 years ago

I have nothing against this change. Looks like a better solution to me

coldfix commented 10 years ago

Great. So I will soon start merging stuff into the cpymad-1.0 branch. All of this is not really final yet. I'm sure there is much improvement for the names chosen so far (and API in general). But this suggests the general direction, I have in mind (i.e. simplification and decoupling).