Skip to content

Conversation

@Mikolaj-A-Kowalski
Copy link
Collaborator

Fixes part of the usual user experience when working with the dictionary input.
Now the dictionaries keep track of their address (path?) in the nested dictionary structure and on the key error when requesting the elements of dictionary the location is included in the error message. e.g.:

 <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
 Fatal has occurred in:
 getInt (dictionary_class.f90)                                                                       

 Because:
 In dictionary [/activeTally/flux/map] Entry under keyword N is not an 
 integer
 <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

The things to pay attention in the review are:

  • Some error messages that were missed and not updated
  • Potentially some use sequence of adding/removing/moving dictionaries that is not covered in the test. I fear I might have missed something and would appreciate 2nd pair of eyes
  • We may use this opportunity to reword/cleanup dictionary error messages

@Mikolaj-A-Kowalski Mikolaj-A-Kowalski self-assigned this May 9, 2025
@Mikolaj-A-Kowalski Mikolaj-A-Kowalski added the enhancement New feature or request label May 9, 2025
@Mikolaj-A-Kowalski
Copy link
Collaborator Author

Partially addressing #155

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.

This looks good to me and the test makes sense.. I don't think there's too many way to modify a dictionary that can affect its path!
I just don't get why deleting the path after a dictionary has been copied, especially if you're not deleting its nested dictionaries.

@Mikolaj-A-Kowalski
Copy link
Collaborator Author

This looks good to me and the test makes sense.. I don't think there's too many way to modify a dictionary that can affect its path! I just don't get why deleting the path after a dictionary has been copied, especially if you're not deleting its nested dictionaries.

I don't think there's too many way to modify a dictionary that can affect its path!

It is mostly about the fact that there are many possible use cases and I am not sure all of them are covered under tests.

I just don't get why deleting the path after a dictionary has been copied, especially if you're not deleting its nested dictionaries.

I am not sure I follow. Generally in the copy procedure I set the top most dictionary in the copied structure as a root. It is perhaps not the most efficient since when coping nested dictionaries they also call updateAdress, but the one in the topmost dictionary is being called last.

@ChasingNeutrons ChasingNeutrons merged commit 06f15ed into CambridgeNuclear:main Jun 3, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants