-
Notifications
You must be signed in to change notification settings - Fork 5
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
Adds example projects #59
Conversation
272d355
to
e132515
Compare
e132515
to
08a46c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, please remember to address the empty controls.json issue. Also can you make it so new lines are stripped when loading the json (Lines 100 and 109), some editors add a new line by default and the loading kept failing even though the content was mostly the same except for the new line.
Lines 100 to 109 in 50dd978
controls = RAT.Controls.model_validate_json(controls_file.read_text()) | |
except ValueError as err: | |
raise ValueError( | |
"The controls.json file for this project is not valid.\n" | |
"It may contain invalid parameter values or be invalid JSON." | |
) from err | |
project_file = Path(load_path, "project.json") | |
try: | |
project = RAT.utils.convert.project_from_json(project_file.read_text()) |
@StephenNneji I've added an also turns out that the controls saving did do what you wanted (saves all defaults). I just misremembered how it worked. i've updated all the controls to match what they are in the python-RAT examples (all default except for absorption which parallelises over contrasts and uses 150 resample points) |
I can't replicate anymore on the old commit, not sure what changed. I might have somehow introduced an error when testing but at the time I was getting this error
|
This PR adds example projects generated from the python-RAT examples, and also includes the generation script.