Skip to content

Fix bugs in python table writing and checking scripts#32

Merged
nusbaume merged 3 commits intoESCOMP:mainfrom
nusbaume:write_name_table_fix
Apr 27, 2023
Merged

Fix bugs in python table writing and checking scripts#32
nusbaume merged 3 commits intoESCOMP:mainfrom
nusbaume:write_name_table_fix

Conversation

@nusbaume
Copy link
Copy Markdown
Collaborator

This PR modifies the xml_tools library to allow the use of python 3.7+ when using write_standard_name_table.py. Also fixed the use of the --overwrite flag in check_xml_unique.py.

Fixes #30
Fixes #31

Tests run:

Ran tests with check_xml_unique.py and check_xml_unique.py --overwrite where duplicate variables were added to both the same section and to different sections of standard_names.xml, to make sure the script worked as expected.

Also ran write_standard_name_table.py on a modified standard_names.xml file to make sure the Markdown file was created successfully. This was done with python 3.9.4, 3.10.8, and 2.7.17 to try and test that the script works with multiple versions, including versions newer than 3.6.

Finally, I again wasn't sure who to add as reviewers, so please feel free to expand or modify the reviewer list if need be.

@nusbaume nusbaume self-assigned this Mar 28, 2023
@nusbaume
Copy link
Copy Markdown
Collaborator Author

@mkavulich I sent you an invite to join this repo in order to add you as a reviewer. Of course if you would prefer to not review this PR (or generally don't want to review PRs in this repo) then just let me know. Thanks!

Copy link
Copy Markdown
Collaborator

@mkavulich mkavulich left a comment

Choose a reason for hiding this comment

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

I haven't tested this myself but the code changes look good to me.

Copy link
Copy Markdown
Collaborator

@cacraigucar cacraigucar left a comment

Choose a reason for hiding this comment

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

Tested with a duplicate name and it worked as advertised

@nusbaume nusbaume merged commit 0418367 into ESCOMP:main Apr 27, 2023
@nusbaume nusbaume deleted the write_name_table_fix branch April 27, 2023 16:15
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.

check_xml_unique.py --overwrite doesn't actually remove duplicate variables write_standard_name_table.py doesn't work with python 3.7+

4 participants