delocate icon indicating copy to clipboard operation
delocate copied to clipboard

Code cleanup suggestions.

Open HexDecimal opened this issue 2 years ago • 2 comments

Some ideas that could make things easier for me and future maintainers:

I'd be nice to setup auto formatters like Black and isort. It's tedious to format all code manually.

doc/devel/make_release.rst should have been in a CONTRIBUTING file. I missed it entirely when I made the 0.9.1 release. A CONTRIBUTING file could also be used to explain how to add any test data.

In #93 I attempted to fully type-hint the package. I never got that merged but it showed some areas that are causing issues such as InWheelCtx.__enter__ and back_tick. I think InWheelCtx needs to be refactored or removed (or finish #46 and fix things there,) and all calls to back_tick should be replaced with subprocess.run now that the code base is on Python 3.

Testing has some issues. Everything from pytest_tools.py breaks the pytest debugger so they'll all eventually need to be replaced with plain asserts. It'd be nice to replace scriptrunner.py with a more standard tool like pytest-console-scripts.

Issue and PR templates might be a good idea. It sucks that most of the current bug reports don't mention which version of decloate they used and don't provide a wheel that can be checked.

  • [x] Enable auto formatters Black and isort.
  • [x] Set up CONTRIBUTING file.
  • [ ] Fix type issues with InWheelCtx and InWheel.
  • [x] Fix back_tick function.
  • [ ] Clean up pytest_tools.py,
  • [x] Replace scriptrunner.py with pytest-console-scripts
  • [x] Add Issue templates.
  • [x] Add PR templates.

HexDecimal avatar Sep 21 '21 17:09 HexDecimal