bumplot 0.1.0__tar.gz → 0.1.1__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 (38) hide show
  1. {bumplot-0.1.0 → bumplot-0.1.1}/LICENSE +1 -1
  2. {bumplot-0.1.0 → bumplot-0.1.1}/PKG-INFO +17 -11
  3. {bumplot-0.1.0 → bumplot-0.1.1}/README.md +15 -9
  4. bumplot-0.1.1/README_files/figure-commonmark/cell-3-output-1.png +0 -0
  5. {bumplot-0.1.0 → bumplot-0.1.1}/bumplot/__init__.py +1 -1
  6. {bumplot-0.1.0 → bumplot-0.1.1}/bumplot/_utils.py +1 -1
  7. {bumplot-0.1.0 → bumplot-0.1.1}/bumplot.egg-info/PKG-INFO +17 -11
  8. {bumplot-0.1.0 → bumplot-0.1.1}/bumplot.egg-info/SOURCES.txt +1 -1
  9. {bumplot-0.1.0 → bumplot-0.1.1}/docs/README.qmd +22 -4
  10. {bumplot-0.1.0 → bumplot-0.1.1}/pyproject.toml +2 -3
  11. {bumplot-0.1.0 → bumplot-0.1.1}/tests/test_main.py +17 -5
  12. bumplot-0.1.0/README_files/figure-commonmark/cell-2-output-1.png +0 -0
  13. {bumplot-0.1.0 → bumplot-0.1.1}/.coverage +0 -0
  14. {bumplot-0.1.0 → bumplot-0.1.1}/.github/workflows/doc.yaml +0 -0
  15. {bumplot-0.1.0 → bumplot-0.1.1}/.github/workflows/lint.yaml +0 -0
  16. {bumplot-0.1.0 → bumplot-0.1.1}/.github/workflows/pypi.yaml +0 -0
  17. {bumplot-0.1.0 → bumplot-0.1.1}/.github/workflows/tests.yaml +0 -0
  18. {bumplot-0.1.0 → bumplot-0.1.1}/.github/workflows/type.yaml +0 -0
  19. {bumplot-0.1.0 → bumplot-0.1.1}/.gitignore +0 -0
  20. {bumplot-0.1.0 → bumplot-0.1.1}/.pre-commit-config.yaml +0 -0
  21. {bumplot-0.1.0 → bumplot-0.1.1}/Makefile +0 -0
  22. {bumplot-0.1.0 → bumplot-0.1.1}/bumplot/bezier.py +0 -0
  23. {bumplot-0.1.0 → bumplot-0.1.1}/bumplot/main.py +0 -0
  24. {bumplot-0.1.0 → bumplot-0.1.1}/bumplot.egg-info/dependency_links.txt +0 -0
  25. {bumplot-0.1.0 → bumplot-0.1.1}/bumplot.egg-info/requires.txt +0 -0
  26. {bumplot-0.1.0 → bumplot-0.1.1}/bumplot.egg-info/top_level.txt +0 -0
  27. {bumplot-0.1.0 → bumplot-0.1.1}/coverage-badge.svg +0 -0
  28. {bumplot-0.1.0 → bumplot-0.1.1}/docs/.gitignore +0 -0
  29. {bumplot-0.1.0 → bumplot-0.1.1}/docs/contributing.md +0 -0
  30. {bumplot-0.1.0 → bumplot-0.1.1}/docs/examples.md +0 -0
  31. {bumplot-0.1.0 → bumplot-0.1.1}/docs/index.md +0 -0
  32. {bumplot-0.1.0 → bumplot-0.1.1}/docs/reference/bezier.md +0 -0
  33. {bumplot-0.1.0 → bumplot-0.1.1}/docs/reference/bumplot.md +0 -0
  34. {bumplot-0.1.0 → bumplot-0.1.1}/docs/stylesheets/style.css +0 -0
  35. {bumplot-0.1.0 → bumplot-0.1.1}/mkdocs.yaml +0 -0
  36. {bumplot-0.1.0 → bumplot-0.1.1}/overrides/partials/footer.html +0 -0
  37. {bumplot-0.1.0 → bumplot-0.1.1}/setup.cfg +0 -0
  38. {bumplot-0.1.0 → bumplot-0.1.1}/tests/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) Year Name
3
+ Copyright (c) 2025 Joseph Barbier
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bumplot
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Easily create and customize bump charts in Python
5
5
  Author-email: Joseph Barbier <joseph.barbierdarnal@gmail.com>
6
6
  License-Expression: MIT
@@ -8,7 +8,7 @@ Project-URL: Homepage, https://y-sunflower.github.io/bumplot/
8
8
  Project-URL: Issues, https://github.com/y-sunflower/bumplot/issues
9
9
  Project-URL: Documentation, https://y-sunflower.github.io/bumplot/
10
10
  Project-URL: Repository, https://github.com/y-sunflower/bumplot
11
- Keywords: bump,bump plot,bump charts,matplotlib,data,visualization
11
+ Keywords: bump,bump plot,bump charts,matplotlib,data,visualization,bezier,curve
12
12
  Classifier: Programming Language :: Python :: 3
13
13
  Classifier: Operating System :: OS Independent
14
14
  Classifier: Development Status :: 4 - Beta
@@ -19,12 +19,10 @@ Requires-Dist: matplotlib>=3.9.4
19
19
  Requires-Dist: narwhals>=2.0.0
20
20
  Dynamic: license-file
21
21
 
22
-
22
+ # `bumplot`: easily create and customize bump charts in Python
23
23
 
24
24
  <!-- Automatically generated, uses README.qmd to modify README.md -->
25
25
 
26
- # `bumplot`: easily create and customize bump charts in Python
27
-
28
26
  <img src="https://github.com/JosephBARBIERDARNAL/static/blob/main/python-libs/bumplot/image.png?raw=true" alt="bumplot logo" align="right" width="180px"/>
29
27
 
30
28
  `bumplot` is a small Python package made to facilitate the creation of
@@ -42,7 +40,7 @@ documentation](https://y-sunflower.github.io/bumplot/)
42
40
 
43
41
  ## Get started
44
42
 
45
- ``` python
43
+ ```python
46
44
  import matplotlib.pyplot as plt
47
45
  import pandas as pd
48
46
 
@@ -56,13 +54,11 @@ data = pd.DataFrame(
56
54
  "C": [90, 20, 70, 40],
57
55
  }
58
56
  )
59
- x = "x"
60
- y_columns = ["A", "B", "C"]
61
57
 
62
58
  fig, ax = plt.subplots(figsize=(8, 4))
63
59
  bumplot(
64
- x=x,
65
- y_columns=y_columns,
60
+ x="x",
61
+ y_columns=["A", "B", "C"],
66
62
  data=data,
67
63
  curve_force=0.5,
68
64
  plot_kwargs={"lw": 4},
@@ -74,7 +70,7 @@ ax.spines[["top", "right", "left", "bottom"]].set_visible(False)
74
70
  ax.grid(alpha=0.4)
75
71
  ```
76
72
 
77
- ![](README_files/figure-commonmark/cell-2-output-1.png)
73
+ ![](README_files/figure-commonmark/cell-3-output-1.png)
78
74
 
79
75
  [See more examples](https://y-sunflower.github.io/bumplot/examples/)
80
76
 
@@ -83,3 +79,13 @@ ax.grid(alpha=0.4)
83
79
  ## Installation
84
80
 
85
81
  pip install bumplot
82
+
83
+ <br><br>
84
+
85
+ ## Features
86
+
87
+ - Automatic ranking of your data (with support for both `pandas` and
88
+ `polars`)
89
+ - Accept categorical data for x-axis
90
+ - Infinite customization capabilities
91
+ - Easy control of the curvature intensity
@@ -1,9 +1,7 @@
1
-
1
+ # `bumplot`: easily create and customize bump charts in Python
2
2
 
3
3
  <!-- Automatically generated, uses README.qmd to modify README.md -->
4
4
 
5
- # `bumplot`: easily create and customize bump charts in Python
6
-
7
5
  <img src="https://github.com/JosephBARBIERDARNAL/static/blob/main/python-libs/bumplot/image.png?raw=true" alt="bumplot logo" align="right" width="180px"/>
8
6
 
9
7
  `bumplot` is a small Python package made to facilitate the creation of
@@ -21,7 +19,7 @@ documentation](https://y-sunflower.github.io/bumplot/)
21
19
 
22
20
  ## Get started
23
21
 
24
- ``` python
22
+ ```python
25
23
  import matplotlib.pyplot as plt
26
24
  import pandas as pd
27
25
 
@@ -35,13 +33,11 @@ data = pd.DataFrame(
35
33
  "C": [90, 20, 70, 40],
36
34
  }
37
35
  )
38
- x = "x"
39
- y_columns = ["A", "B", "C"]
40
36
 
41
37
  fig, ax = plt.subplots(figsize=(8, 4))
42
38
  bumplot(
43
- x=x,
44
- y_columns=y_columns,
39
+ x="x",
40
+ y_columns=["A", "B", "C"],
45
41
  data=data,
46
42
  curve_force=0.5,
47
43
  plot_kwargs={"lw": 4},
@@ -53,7 +49,7 @@ ax.spines[["top", "right", "left", "bottom"]].set_visible(False)
53
49
  ax.grid(alpha=0.4)
54
50
  ```
55
51
 
56
- ![](README_files/figure-commonmark/cell-2-output-1.png)
52
+ ![](README_files/figure-commonmark/cell-3-output-1.png)
57
53
 
58
54
  [See more examples](https://y-sunflower.github.io/bumplot/examples/)
59
55
 
@@ -62,3 +58,13 @@ ax.grid(alpha=0.4)
62
58
  ## Installation
63
59
 
64
60
  pip install bumplot
61
+
62
+ <br><br>
63
+
64
+ ## Features
65
+
66
+ - Automatic ranking of your data (with support for both `pandas` and
67
+ `polars`)
68
+ - Accept categorical data for x-axis
69
+ - Infinite customization capabilities
70
+ - Easy control of the curvature intensity
@@ -1,4 +1,4 @@
1
1
  from .main import bumplot
2
2
 
3
- __version__ = "0.1.0"
3
+ __version__ = "0.1.1"
4
4
  __all__ = ["bumplot"]
@@ -20,7 +20,7 @@ def _ranked_df(df: IntoDataFrame, x: str, y_columns: list[str]):
20
20
 
21
21
  df_native_ranked = (
22
22
  df_native.unpivot(on=y_columns, index=x)
23
- .with_columns(nw.col("value").rank("ordinal").over(x))
23
+ .with_columns(nw.col("value").rank("ordinal", descending=True).over(x))
24
24
  .pivot(on="variable", index=x, values="value")
25
25
  .select(nw.col(x), nw.col(y_columns))
26
26
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bumplot
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Easily create and customize bump charts in Python
5
5
  Author-email: Joseph Barbier <joseph.barbierdarnal@gmail.com>
6
6
  License-Expression: MIT
@@ -8,7 +8,7 @@ Project-URL: Homepage, https://y-sunflower.github.io/bumplot/
8
8
  Project-URL: Issues, https://github.com/y-sunflower/bumplot/issues
9
9
  Project-URL: Documentation, https://y-sunflower.github.io/bumplot/
10
10
  Project-URL: Repository, https://github.com/y-sunflower/bumplot
11
- Keywords: bump,bump plot,bump charts,matplotlib,data,visualization
11
+ Keywords: bump,bump plot,bump charts,matplotlib,data,visualization,bezier,curve
12
12
  Classifier: Programming Language :: Python :: 3
13
13
  Classifier: Operating System :: OS Independent
14
14
  Classifier: Development Status :: 4 - Beta
@@ -19,12 +19,10 @@ Requires-Dist: matplotlib>=3.9.4
19
19
  Requires-Dist: narwhals>=2.0.0
20
20
  Dynamic: license-file
21
21
 
22
-
22
+ # `bumplot`: easily create and customize bump charts in Python
23
23
 
24
24
  <!-- Automatically generated, uses README.qmd to modify README.md -->
25
25
 
26
- # `bumplot`: easily create and customize bump charts in Python
27
-
28
26
  <img src="https://github.com/JosephBARBIERDARNAL/static/blob/main/python-libs/bumplot/image.png?raw=true" alt="bumplot logo" align="right" width="180px"/>
29
27
 
30
28
  `bumplot` is a small Python package made to facilitate the creation of
@@ -42,7 +40,7 @@ documentation](https://y-sunflower.github.io/bumplot/)
42
40
 
43
41
  ## Get started
44
42
 
45
- ``` python
43
+ ```python
46
44
  import matplotlib.pyplot as plt
47
45
  import pandas as pd
48
46
 
@@ -56,13 +54,11 @@ data = pd.DataFrame(
56
54
  "C": [90, 20, 70, 40],
57
55
  }
58
56
  )
59
- x = "x"
60
- y_columns = ["A", "B", "C"]
61
57
 
62
58
  fig, ax = plt.subplots(figsize=(8, 4))
63
59
  bumplot(
64
- x=x,
65
- y_columns=y_columns,
60
+ x="x",
61
+ y_columns=["A", "B", "C"],
66
62
  data=data,
67
63
  curve_force=0.5,
68
64
  plot_kwargs={"lw": 4},
@@ -74,7 +70,7 @@ ax.spines[["top", "right", "left", "bottom"]].set_visible(False)
74
70
  ax.grid(alpha=0.4)
75
71
  ```
76
72
 
77
- ![](README_files/figure-commonmark/cell-2-output-1.png)
73
+ ![](README_files/figure-commonmark/cell-3-output-1.png)
78
74
 
79
75
  [See more examples](https://y-sunflower.github.io/bumplot/examples/)
80
76
 
@@ -83,3 +79,13 @@ ax.grid(alpha=0.4)
83
79
  ## Installation
84
80
 
85
81
  pip install bumplot
82
+
83
+ <br><br>
84
+
85
+ ## Features
86
+
87
+ - Automatic ranking of your data (with support for both `pandas` and
88
+ `polars`)
89
+ - Accept categorical data for x-axis
90
+ - Infinite customization capabilities
91
+ - Easy control of the curvature intensity
@@ -12,7 +12,7 @@ pyproject.toml
12
12
  .github/workflows/pypi.yaml
13
13
  .github/workflows/tests.yaml
14
14
  .github/workflows/type.yaml
15
- README_files/figure-commonmark/cell-2-output-1.png
15
+ README_files/figure-commonmark/cell-3-output-1.png
16
16
  bumplot/__init__.py
17
17
  bumplot/_utils.py
18
18
  bumplot/bezier.py
@@ -1,9 +1,20 @@
1
1
  ---
2
2
  format: gfm
3
+ from: markdown-smart
4
+ default-image-extension: ""
3
5
  ---
4
6
 
5
7
  <!-- Automatically generated, uses README.qmd to modify README.md -->
6
8
 
9
+ ```{python}
10
+ # | include: false
11
+ # | echo: false
12
+
13
+ import matplotlib.pyplot as plt
14
+
15
+ plt.rcParams["figure.dpi"] = 200
16
+ ```
17
+
7
18
  # `bumplot`: easily create and customize bump charts in Python
8
19
 
9
20
  <img src="https://github.com/JosephBARBIERDARNAL/static/blob/main/python-libs/bumplot/image.png?raw=true" alt="bumplot logo" align="right" width="180px"/>
@@ -35,13 +46,11 @@ data = pd.DataFrame(
35
46
  "C": [90, 20, 70, 40],
36
47
  }
37
48
  )
38
- x = "x"
39
- y_columns = ["A", "B", "C"]
40
49
 
41
50
  fig, ax = plt.subplots(figsize=(8, 4))
42
51
  bumplot(
43
- x=x,
44
- y_columns=y_columns,
52
+ x="x",
53
+ y_columns=["A", "B", "C"],
45
54
  data=data,
46
55
  curve_force=0.5,
47
56
  plot_kwargs={"lw": 4},
@@ -63,3 +72,12 @@ ax.grid(alpha=0.4)
63
72
  ```
64
73
  pip install bumplot
65
74
  ```
75
+
76
+ <br><br>
77
+
78
+ ## Features
79
+
80
+ - Automatic ranking of your data (with support for both `pandas` and `polars`)
81
+ - Accept categorical data for x-axis
82
+ - Infinite customization capabilities
83
+ - Easy control of the curvature intensity
@@ -1,10 +1,10 @@
1
1
  [project]
2
2
  name = "bumplot"
3
3
  description = "Easily create and customize bump charts in Python"
4
- version = "0.1.0"
4
+ version = "0.1.1"
5
5
  license = "MIT"
6
6
  license-files = ["LICENSE"]
7
- keywords = ["bump", "bump plot", "bump charts", "matplotlib", "data", "visualization"]
7
+ keywords = ["bump", "bump plot", "bump charts", "matplotlib", "data", "visualization", "bezier", "curve"]
8
8
  authors = [
9
9
  { name="Joseph Barbier", email="joseph.barbierdarnal@gmail.com" },
10
10
  ]
@@ -45,7 +45,6 @@ dev = [
45
45
  "pandas>=2.3.2",
46
46
  "polars>=1.32.3",
47
47
  "mkdocs-matplotlib>=0.10.1",
48
- "pyarrow>=21.0.0",
49
48
  ]
50
49
  quarto = [
51
50
  "jupyter>=1.1.1",
@@ -12,22 +12,30 @@ import bumplot
12
12
 
13
13
 
14
14
  def test_version():
15
- assert bumplot.__version__ == "0.1.0"
15
+ assert bumplot.__version__ == "0.1.1"
16
16
 
17
17
 
18
+ @pytest.mark.parametrize(
19
+ "x",
20
+ [
21
+ [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
22
+ ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"],
23
+ ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"],
24
+ ],
25
+ )
18
26
  @pytest.mark.parametrize("backend", [pd, pl])
19
27
  @pytest.mark.parametrize("curve_force", [0, 0.5, 1, 5])
20
28
  @pytest.mark.parametrize("colors", [None, ["#ffbe0b", "#ff006e", "#3a86ff"]])
21
- def test_bumplot(backend, curve_force, colors):
29
+ def test_bumplot(x, backend, curve_force, colors):
22
30
  data = {
23
- "x": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
31
+ "x": x,
24
32
  "y1": [7, 2, 2, 5, 5, 6, 7, 2, 9, 1],
25
33
  "y2": [3, 2, 1, 10, 4, 8, 7, 2, 4, 2],
26
34
  "y3": [5, 4, 10, 1, 3, 6, 5, 2, 3, 7],
27
35
  }
28
36
  df = backend.DataFrame(data)
29
37
 
30
- fig, ax = plt.subplots(figsize=(6, 4))
38
+ _, ax = plt.subplots(figsize=(6, 4))
31
39
  ax2 = bumplot.bumplot(
32
40
  x="x",
33
41
  y_columns=["y1", "y2", "y3"],
@@ -50,6 +58,8 @@ def test_bumplot(backend, curve_force, colors):
50
58
  ]
51
59
  assert len(pathcollections) == 3
52
60
 
61
+ plt.close("all")
62
+
53
63
 
54
64
  def test_bumplot_error():
55
65
  data = {
@@ -59,7 +69,7 @@ def test_bumplot_error():
59
69
  "y3": [5, 4, 10, 1, 3, 6, 5, 2, 3, 7],
60
70
  }
61
71
  df = pd.DataFrame(data)
62
- fig, ax = plt.subplots(figsize=(6, 4))
72
+ _, ax = plt.subplots(figsize=(6, 4))
63
73
 
64
74
  with pytest.raises(
65
75
  AssertionError,
@@ -72,3 +82,5 @@ def test_bumplot_error():
72
82
  ax=ax,
73
83
  colors=["black", "black"],
74
84
  )
85
+
86
+ plt.close("all")
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes