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

Modernise strings #643

Merged
merged 2 commits into from
Feb 11, 2025
Merged

Conversation

oerc0122
Copy link
Collaborator

Description of work
Standardise strings to modern f-string style.

Fixes
Major changes in:

  • MDANSE/Src/MDANSE/Chemistry/Databases.py:info - Table formatting method
  • MDANSE/Src/MDANSE/Framework/Configurable.py:build_doc_texttable - Table formatting method
  • MDANSE/Src/MDANSE/Framework/Converters/Discover.py/MDANSE/Src/MDANSE/Framework/Converters/Forcite.py - Binary parsers struct syntax.
  • MDANSE/Src/MDANSE/Framework/Jobs/* - Add pair_str = "".join(map(str, pair)) (and inv_pair_str) to replace e.g. 'f(q,t)_%s%s' % pair
  • MDANSE/Src/MDANSE/Framework/Units.py:_Unit.__str__ - Pos/Neg unit str handling
  • MDANSE/Src/MDANSE/Mathematics/Arithmetic.py - Reformat to dict comprehension

To test
Nothing should change, standard tests should pass.

@oerc0122 oerc0122 added the styling Any issue related to styling label Jan 27, 2025
@oerc0122 oerc0122 self-assigned this Jan 27, 2025
@oerc0122 oerc0122 force-pushed the modernise-strings branch 7 times, most recently from 692fe0f to 560ed94 Compare February 3, 2025 12:48
@oerc0122 oerc0122 force-pushed the modernise-strings branch 2 times, most recently from 3e1b880 to c0e045b Compare February 5, 2025 14:45
@oerc0122 oerc0122 force-pushed the modernise-strings branch 2 times, most recently from e005f49 to 600025f Compare February 10, 2025 13:28
Copy link
Collaborator

@MBartkowiakSTFC MBartkowiakSTFC left a comment

Choose a reason for hiding this comment

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

The changes look good. I tested this branch with several analysis types, and the behaviour of the GUI was unchanged.

@oerc0122 oerc0122 merged commit ac32bba into ISISNeutronMuon:protos Feb 11, 2025
27 checks passed
@oerc0122 oerc0122 deleted the modernise-strings branch February 11, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
styling Any issue related to styling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants