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

Move reading of id, origin and rotation to universe_inter #74

Merged
merged 3 commits into from
Sep 11, 2023

Conversation

Mikolaj-A-Kowalski
Copy link
Collaborator

Moves the code repeated in each universe subclass that sets up the properties of the base universe class to a separate, common function.

This allows to avoid code repeat and will make the extension (to e.g. time-dependent transformations) easier.

Avoid code repeat when setting up the basic data common to all universes
(id, origin and rotation).
Copy link
Member

@valeriaRaffuzzi valeriaRaffuzzi left a comment

Choose a reason for hiding this comment

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

It looks sensible to me, except for the one comment I left. Nice to avoid code repetition


! Make shure root does not contain neither origin nor rotation
! Make sure root does not contain neither origin nor rotation
if (dict % isPresent('origin')) then
Copy link
Member

Choose a reason for hiding this comment

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

dict % isPresent('origin')
is repeated twice in line 92 and 95

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yikes!!!
It has been there for long.... Good thing nobody was rotating root universes... 😨

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should be resolved now.

Due to a copy-paste error keyword 'origin' was used to check if
'rotation' is provided in the input dictionary.
Copy link
Member

@valeriaRaffuzzi valeriaRaffuzzi left a comment

Choose a reason for hiding this comment

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

Looks good now! At this rate SCONE will soon be typos free!

@valeriaRaffuzzi valeriaRaffuzzi merged commit 7eb8246 into CambridgeNuclear:main Sep 11, 2023
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