dask-image icon indicating copy to clipboard operation
dask-image copied to clipboard

MAINTENANCE: code style improvements #101

Open tkoyama010 opened this issue 5 years ago • 1 comments

MAINTENANCE: code style improvements suggested by @jni #101 This is a sprint contribution in ScipyJapan2020 (#163) .

  • [x] fully specified imports, dask.array instead of da, numpy instead of np.
  • [ ] Code definitions in __init__.py is unconventional.

tkoyama010 avatar Nov 02 '20 05:11 tkoyama010

@GenevieveBuckley @jni I am moving __init__.py functions to _util.py . Is it a right place to move? or should I make a new *.py file?

tkoyama010 avatar Feb 18 '21 06:02 tkoyama010

This draft PR has been open too long and now has too many conflicts with the main branch, so I think we'll close it.

Scanning through this, it seems "code style improvements" here means three things. We could do these later in another PR (from a more up-to-date version of main branch):

  1. Replace numpy with the abbreviation np (i.e. use import numpy as np everywhere)
  2. Replace dask.array with the abreviation da (i.e. use import dask.array as da everywhere)
  3. Move functions out of the __init__.py files, keeping those mostly empty except for imports and the __all__ dunder, etc.

GenevieveBuckley avatar Mar 14 '23 05:03 GenevieveBuckley

Thank you for joining us at the hackathon @tkoyama010! It was really great to meet you then, and we did get a lot of stuff done overall 😄

GenevieveBuckley avatar Mar 14 '23 05:03 GenevieveBuckley