phylustrator 0.2.1__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. {phylustrator-0.2.1/src/phylustrator.egg-info → phylustrator-0.2.2}/PKG-INFO +1 -1
  2. {phylustrator-0.2.1 → phylustrator-0.2.2}/pyproject.toml +1 -1
  3. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/color.py +8 -0
  4. {phylustrator-0.2.1 → phylustrator-0.2.2/src/phylustrator.egg-info}/PKG-INFO +1 -1
  5. {phylustrator-0.2.1 → phylustrator-0.2.2}/tests/test_figure.py +4 -3
  6. {phylustrator-0.2.1 → phylustrator-0.2.2}/LICENSE +0 -0
  7. {phylustrator-0.2.1 → phylustrator-0.2.2}/README.md +0 -0
  8. {phylustrator-0.2.1 → phylustrator-0.2.2}/setup.cfg +0 -0
  9. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/__init__.py +0 -0
  10. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/__main__.py +0 -0
  11. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/cli.py +0 -0
  12. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/compose.py +0 -0
  13. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/genomes/__init__.py +0 -0
  14. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/genomes/figure.py +0 -0
  15. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/genomes/genome.py +0 -0
  16. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/genomes/io.py +0 -0
  17. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/genomes/layers/__init__.py +0 -0
  18. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/genomes/layers/genes.py +0 -0
  19. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/genomes/layers/guides.py +0 -0
  20. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/genomes/layers/highlight.py +0 -0
  21. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/genomes/layers/synteny.py +0 -0
  22. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/genomes/layout.py +0 -0
  23. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/genomes/matrix.py +0 -0
  24. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/genomes/panels.py +0 -0
  25. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/genomes/track.py +0 -0
  26. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/render.py +0 -0
  27. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/style.py +0 -0
  28. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/trees/__init__.py +0 -0
  29. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/trees/figure.py +0 -0
  30. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/trees/io.py +0 -0
  31. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/trees/layers/__init__.py +0 -0
  32. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/trees/layers/clades.py +0 -0
  33. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/trees/layers/coloring.py +0 -0
  34. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/trees/layers/events.py +0 -0
  35. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/trees/layers/guides.py +0 -0
  36. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/trees/layers/labels.py +0 -0
  37. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/trees/layers/tracks.py +0 -0
  38. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/trees/layout.py +0 -0
  39. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/trees/skeleton.py +0 -0
  40. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/trees/tree.py +0 -0
  41. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator/zombi.py +0 -0
  42. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator.egg-info/SOURCES.txt +0 -0
  43. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator.egg-info/dependency_links.txt +0 -0
  44. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator.egg-info/entry_points.txt +0 -0
  45. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator.egg-info/requires.txt +0 -0
  46. {phylustrator-0.2.1 → phylustrator-0.2.2}/src/phylustrator.egg-info/top_level.txt +0 -0
  47. {phylustrator-0.2.1 → phylustrator-0.2.2}/tests/test_cli.py +0 -0
  48. {phylustrator-0.2.1 → phylustrator-0.2.2}/tests/test_genomes.py +0 -0
  49. {phylustrator-0.2.1 → phylustrator-0.2.2}/tests/test_io.py +0 -0
  50. {phylustrator-0.2.1 → phylustrator-0.2.2}/tests/test_layout.py +0 -0
  51. {phylustrator-0.2.1 → phylustrator-0.2.2}/tests/test_tree.py +0 -0
  52. {phylustrator-0.2.1 → phylustrator-0.2.2}/tests/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: phylustrator
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A composable plotter for evolutionary figures: phylogenetic trees, genomes, synteny and alignments
5
5
  Author-email: "Adrian A. Davin" <aaredav@gmail.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "phylustrator"
7
- version = "0.2.1"
7
+ version = "0.2.2"
8
8
  description = "A composable plotter for evolutionary figures: phylogenetic trees, genomes, synteny and alignments"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -14,6 +14,14 @@ from typing import Callable, Iterable
14
14
  # figure that shows two characters at once needs two maps that cannot be mistaken for each other,
15
15
  # which is why more than one sequential map is here.
16
16
  _COLORMAPS: dict[str, list[tuple[int, int, int]]] = {
17
+ # magma stopped before it goes pale, the same trade as `viridis_dark` below in a different hue.
18
+ # Two line-safe ramps, not one, because a figure that shows two different quantities beside each
19
+ # other needs them to look different — one ramp used twice reads as one quantity shown twice.
20
+ "magma_dark": [
21
+ (0, 0, 4), (11, 9, 36), (32, 17, 75), (59, 15, 112),
22
+ (87, 21, 126), (114, 31, 129), (140, 41, 129), (168, 50, 125),
23
+ (196, 60, 117), (222, 73, 104), (241, 96, 93), (250, 127, 94),
24
+ ],
17
25
  # viridis stopped before it goes pale. A sequential ramp on a *line* has a problem a heatmap does
18
26
  # not: the light end of every perceptually-uniform map (viridis 222, magma 248, cividis 224 in
19
27
  # luminance) vanishes against white at a few pixels wide, so the values that land there are
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: phylustrator
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A composable plotter for evolutionary figures: phylogenetic trees, genomes, synteny and alignments
5
5
  Author-email: "Adrian A. Davin" <aaredav@gmail.com>
6
6
  License: MIT
@@ -117,6 +117,7 @@ def test_a_line_safe_colormap_never_goes_pale():
117
117
  r, g, b = (int(hex_colour[i:i + 2], 16) for i in (1, 3, 5))
118
118
  return 0.2126 * r + 0.7152 * g + 0.0722 * b
119
119
 
120
- assert max(luminance(c) for c in colormap_hex("viridis")) > 200 # the problem
121
- assert max(luminance(c) for c in colormap_hex("viridis_dark")) < 180 # the fix
122
- assert colormap_hex("viridis_dark")[0] == colormap_hex("viridis")[0] # same dark end, same order
120
+ for pale, safe in (("viridis", "viridis_dark"), ("magma", "magma_dark")):
121
+ assert max(luminance(c) for c in colormap_hex(pale)) > 200 # the problem
122
+ assert max(luminance(c) for c in colormap_hex(safe)) < 180 # the fix
123
+ assert colormap_hex(safe)[0] == colormap_hex(pale)[0] # same dark end, same order
File without changes
File without changes
File without changes