Is your feature request related to a problem? Please describe.
colormap is a hard dependency (setup.py line 59) used in only three places in brightwind/analyse/plot.py — rgb2hls/hls2rgb at lines 295-296 and 1566 (the rgb2hex imported at line 16 appears unused). colormap pulls in easydev, which in turn drags in colorlog, line-profiler (a compiled package), pexpect, platformdirs and colorama — a large, partly-compiled subtree just for two colour-space conversions.
Describe the solution you'd like
Replace the colormap calls with Python's standard-library colorsys (which is what colormap wraps — results are identical):
rgb2hls(r, g, b) → colorsys.rgb_to_hls(r, g, b) (same 0-1 convention)
hls2rgb(h, l, s) → colorsys.hls_to_rgb(h, l, s)
- if
rgb2hex is genuinely needed, use matplotlib.colors.to_hex (matplotlib is already core) or a one-line format string.
Then drop colormap and easydev from install_requires and requirements.txt.
Describe alternatives you've considered
Keeping colormap but pinning it — rejected: it still pulls the easydev/line-profiler tree for no benefit.
Additional context
Removes roughly six transitive packages (including a compiled one) from every install, and eliminates a source-build risk on older toolchains (e.g. the Amazon Linux 2 / GCC 7.3.1).
Is your feature request related to a problem? Please describe.
colormapis a hard dependency (setup.pyline 59) used in only three places inbrightwind/analyse/plot.py—rgb2hls/hls2rgbat lines 295-296 and 1566 (thergb2heximported at line 16 appears unused).colormappulls ineasydev, which in turn drags incolorlog,line-profiler(a compiled package),pexpect,platformdirsandcolorama— a large, partly-compiled subtree just for two colour-space conversions.Describe the solution you'd like
Replace the
colormapcalls with Python's standard-librarycolorsys(which is whatcolormapwraps — results are identical):rgb2hls(r, g, b)→colorsys.rgb_to_hls(r, g, b)(same 0-1 convention)hls2rgb(h, l, s)→colorsys.hls_to_rgb(h, l, s)rgb2hexis genuinely needed, usematplotlib.colors.to_hex(matplotlib is already core) or a one-line format string.Then drop
colormapandeasydevfrominstall_requiresandrequirements.txt.Describe alternatives you've considered
Keeping
colormapbut pinning it — rejected: it still pulls theeasydev/line-profilertree for no benefit.Additional context
Removes roughly six transitive packages (including a compiled one) from every install, and eliminates a source-build risk on older toolchains (e.g. the Amazon Linux 2 / GCC 7.3.1).