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

Future neatening/readability #27

Open
18 tasks
truth-quark opened this issue Jun 21, 2024 · 0 comments
Open
18 tasks

Future neatening/readability #27

truth-quark opened this issue Jun 21, 2024 · 0 comments

Comments

@truth-quark
Copy link
Collaborator

truth-quark commented Jun 21, 2024

This issue is a general listing of tasks for cleaning up, refactoring & otherwise neatening the code base. The intent is to capture smaller tasks for future separate issues & PRs. One specific use case is deferring refinement & refactoring steps when PRs are growing too large. In those cases, feel free to defer non-essential fixes here while addressing core requirements.

Future tasks:

  • Add module level docstrings (mostly for um2nc)
    • Can missing module docstrings be flagged as a warning in IDEs? (Pycharm & VS Code)
  • Rename nonsnakecase variables to now_snake_case
  • Convert old style % formatting to f-strings
  • Fix/reformat long strings/PEP8
  • Refactor repeated inline strings to named "constants"
  • Refactor magic numbers to named "constants"
  • Move set history to end of process() to group sman I/O operations (for future fixes)
  • Move functions into call order (e.g. process() at top, then all the sub calls)
    • Arrange sub functions into sensible order
  • Move set CF conventions to end of process()
  • Move CLI code to another module?
    • Or better, move utility functions to other modules, shrink the core of um2netcdf.py
  • Review/remove outdated TODO tags
  • MuleVars renaming, see Refactor process() testing & cleaning cube masking/filtering logic #58 (comment)
  • Reduce code duplication in fix_lat/lon_coord_name() functions
  • Add lookup dict for Marc White's stash code suggestion
  • Better testing assert error messages

These can likely be addressed during the unit test retrofit/refactoring step, on a function by function basis.

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

No branches or pull requests

1 participant