pymad / cpymad

cPyMAD is a python interface to Mad-X using cython and libmadx

Home Page:http://cern.ch/pymad

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move models into separate repository?

coldfix opened this issue · comments

This was first proposed as part of #30, but will now be done separately if at all.

Restating the arguments:

  • the model_locator classes cpymad can be used to load models from arbitrary sources. It does not really need the LHC models to function.
  • With setuptools' entry points (see also here) all available model locators can still easily be iterated and discovered automatically
  • Both models could still be installed with a single command: pip install cern-cpymad cern-lhc-models
  • I like the idea since it keeps the data and the program logic separate. Tests in the models module would exclusively test the models and make sure that these work on the specified version of cpymad and tests in the cpymad module would only test the program logic.

No big objections, but I see one counterargument. The model definition/structure might still evolve, in which case we would need to be careful to keep track of what kind of models are supported in a given version of the code.

This is probably anyway something we need to consider (because models can be loaded from any source as you say), so I would propose we add a key model_api or similar, or alternatively have a complete test for the model that all required items are there and optional items are understood.

That's a valid point you raise.

Furthermore, I am not sure yet, how best to evolve the test setup to test all new cpymad commits/branches with the tests contained in the model repository. Maybe, one can setup a commit hook from the github preferences.

Implemented in fork.