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

Removed the flag from AnalParams constructor. #7

Merged
merged 2 commits into from
Nov 9, 2018

Conversation

javierzaragoza
Copy link
Contributor

This pull request addresses #2. Now the constructor reads the xml and decides if is beammap or science map what is requested. Since now it is possible to run the constructor for a beammap xml file from macanap and for a science xml from beammap, an error appears in macanap or beammap if the xml is not correct.

javierzaragoza and others added 2 commits November 9, 2018 17:03
…ds the xml and decides if is beammap or science map what is requested. An error appears in macanap or beammap if the xml is not correct.
@Jerry-Ma Jerry-Ma force-pushed the feature/2-AnalParams-constructor branch from ce42636 to c7c039e Compare November 9, 2018 22:22
Copy link
Collaborator

@Jerry-Ma Jerry-Ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks right, I think it is good for now, thank you for the great contribution!

This part still have a lot room for improvement, though. Ideally, we would like to have a much better defined schema for the xml configuration files and verify the input (as well as input types) based on the schema. This will make the code much cleaner, and easily extendable.

If you are interested in improving coding techniques, implementing a schema based configuration verification/read/write would be a fine task. For our future Citlali code, we definitely want something like that.

I've used schema for a number of python projects before but not in C++. But I just did a quick googling and find this: https://www.codesynthesis.com/products/xsd . It looks like a good one, but there may be better options than this, but the idea should be similar.

If you have the time, you could try to do some more googling about existing solutions/libs and get a taste of them.

@Jerry-Ma
Copy link
Collaborator

Jerry-Ma commented Nov 9, 2018

I rebased your code to the tip of the master and resolved all the conflicts. I also updated the unit tests, and the PR is good to be merged.

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

Successfully merging this pull request may close these issues.

2 participants