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

Unit testing #64

Open
tomerten opened this issue Jul 3, 2020 · 1 comment
Open

Unit testing #64

tomerten opened this issue Jul 3, 2020 · 1 comment

Comments

@tomerten
Copy link

tomerten commented Jul 3, 2020

@andreasfelix @PaulGoslawski
We should include many more unit tests, so that if I change anything I am sure I do not break something. I lost half a day checking if previous things still work and I am still not sure if I now broke something or not (on my branch).

Testing is crucial if you are working as a team on the same code.

@felix-andreas
Copy link
Member

@tomerten

do you still think this latticejson is a good idea? I heavily used it for the https://lattice-summaries.netlify.app/ website, but the code is somewhat alpha quality at the moment.

if you would be interested, we would could sit down for 3-4 days sometime next year and push this more to be production ready?

How i would move forward:

  1. Only support a limited subset of elegant and MAD-X language, where only basic variable assignments and sequence repetition/reflection is allowed. As these are turning complete scripting language it is impossible to support every corner case. For example control flow statements like if and for do not belong in a lattice file in my opinion.
  2. Write down a specification of these limited subsets of the elegant and MAD-X language.
  3. Write down a 1:1 mapping between these limited subsets and LatticeJSON (e.g. "Dipole" <--> "csbend" for elegant)
  4. Write down a lot of tests
  5. Implement stuff until all tests pass

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

2 participants