Skip to content

Commit 5641276

Browse files
authored
Merge pull request #201 from ACCLAB/feat-update-dependencies
Update dependencies, Python compatibility, and various doc updates
2 parents 1d8c5e1 + 0d80be3 commit 5641276

344 files changed

Lines changed: 795 additions & 346 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test-pytest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
- uses: actions/checkout@v3
99
- uses: actions/setup-python@v4
1010
with:
11-
python-version: 3.9
11+
python-version: 3.11
1212
cache: "pip"
1313
cache-dependency-path: settings.ini
1414
- name: Run pytest

CHANGELOG.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,50 @@
22

33
<!-- do not remove -->
44

5+
## v2025.03.14
6+
7+
### New Features
8+
9+
- **Horizontal Plots**: This new feature allows users to create horizontal plots instead of the regular vertical plots, providing a more compact visualization of data. This can be utilized by setting `horizontal=True` in the `plot()` method.
10+
11+
- **Forest Plots**: This new feature allows users to create forest plots! Forest plots provide a simple and intuitive way to visualize many delta-delta (or Deltas' g) or mini-meta effect sizes at once from multiple different dabest objects without presenting the raw data.
12+
13+
- **Gridkey**: This new feature allows users to create a gridkey to represent the labels of the groups in the plot. This can be utilized with the `gridkey_rows` argument in the `plot()` method.
14+
15+
- **Aesthetic Updates**: We have made several aesthetic improvements to the plots, including:
16+
- **Swarm, Contrast, and Summary bars**: We have added bars to better highlight the various groups and their differences. These bars can be customized to suit the user's needs. The swarm and contrast bars are provided by default, while the summary bars can be added by the user.
17+
18+
- **Delta-Delta Plots**: We have modified the delta-delta plot format to be more compact and easier to read. The new format brings the delta-delta (or Deltas' g) effect size closer to the regular effect sizes. In addition, a gap has been added to the zeroline to separate the delta-delta and regular effect sizes.
19+
20+
- **Delta-delta Effect Sizes for Proportion Plots**: Delta-delta effect sizes for proportion plots are now available.
21+
22+
- **Mini-Meta Plots**: We have modified the mini-meta plot format to be more compact and easier to read. The new format brings the mini-meta effect size closer to the regular effect sizes.
23+
24+
- **Proportion Plots Sample Sizes**: We have updated the proportion plots to show sample sizes for each group. These can be toggled on or off via the `prop_sample_counts` parameter.
25+
26+
- **Effect Size Lines for Paired Plots**: Effect size lines for paired plots are now available. These can be toggled on or off via the `es_paired_lines` parameter.
27+
28+
- **Baseline Error Curves**: Plots now include a baseline error dot and curve to show the error of the baseline/control group. By default, the dot is shown, while the curve can be added by the user (via the `show_baseline_ec` parameter).
29+
30+
- **Delta Text**: There is now an option to display delta text on the contrast axes. It displays the effect size of the contrast group relative to the reference group. This can be toggled on or off via the `delta_text` parameter. It is on by default.
31+
32+
- **Empty Circle Color Palette**: A new swarmplot color palette modification is available for unpaired plots via the `empty_circle` parameter in the `plot()` method. This option modifies the two-group swarmplots to have empty circles for the control group and filled circles for the experimental group.
33+
34+
### Enhancement
35+
36+
- **Python 3.13 Support**: DABEST now supports Python 3.10-3.13.
37+
38+
- **Numba for Speed Improvements**: We have included Numba to speed up the various calculations in DABEST. This should make the calculations faster and more efficient. Importing DABEST may take a little longer than before, and a progress bar will appear during the import process to show the calculations being performed. Once imported, loading and plotting data should now be faster.
39+
40+
- **Terminology Updates**: We have made several updates to the documentation and terminology to improve clarity and consistency. For example:
41+
- The method to utilise the Deltas' g effect size is now via the `.hedges_g.plot()` method now rather than creating a whole new `Delta_g` object as before. The functionality remains the same, it plots hedges_g effect sizes and then the Deltas' g effect size alongside these (if a delta-delta experiment was loaded correctly).
42+
43+
- **Updated Tutorial Pages**: We have updated the tutorial pages to reflect the new features and changes. The tutorial pages are now more comprehensive and hopefully more intuitive!.
44+
45+
- **Results Dataframe for Delta-delta and Mini-meta Plots**: A results dataframe can now be extracted for both the delta-delta and mini-meta effect size data (similar to the results dataframe for the regular effect sizes). These can be found via the `.results` attribute of the `.delta_delta` or `.mini_meta` object.
46+
47+
48+
549
## v2024.03.29
650

751
### New Features

README.md

Lines changed: 111 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
55

66
[![minimal Python
7-
version](https://img.shields.io/badge/Python%3E%3D-3.9-6666ff.svg)](https://www.anaconda.com/distribution/)
7+
version](https://img.shields.io/badge/Python%3E%3D-3.10-6666ff.svg)](https://www.anaconda.com/distribution/)
88
[![PyPI
99
version](https://badge.fury.io/py/dabest.svg)](https://badge.fury.io/py/dabest)
1010
[![Downloads](https://img.shields.io/pepy/dt/dabest.svg)](https://pepy.tech/project/dabest)
@@ -14,37 +14,110 @@ citation](https://zenodo.org/badge/DOI/10.1038/s41592-019-0470-3.svg)](https://r
1414

1515
## Recent Version Update
1616

17-
We are proud to announce **DABEST Version Ondeh (v2024.03.29)**. This
18-
new version of the DABEST Python library provides several new features
19-
and includes performance improvements.
20-
21-
1. **New Paired Proportion Plot**: This feature builds upon the
22-
existing proportional analysis capabilities by introducing advanced
23-
aesthetics and clearer visualization of changes in proportions
24-
between different groups, inspired by the informative nature of
25-
Sankey Diagrams. It’s particularly useful for studies that require
26-
detailed examination of how proportions shift in paired
27-
observations.
28-
29-
2. **Customizable Swarm Plot**: Enhancements allow for tailored swarm
30-
plot aesthetics, notably the adjustment of swarm sides to produce
31-
asymmetric swarm plots. This customization enhances data
32-
representation, making visual distinctions more pronounced and
33-
interpretations clearer.
34-
35-
3. **Standardized Delta-delta Effect Size**: We added a new metric akin
36-
to a Hedges’ g for delta-delta effect size, which allows comparisons
37-
between delta-delta effects generated from metrics with different
38-
units.
39-
40-
4. **Miscellaneous Improvements**: This version also encompasses a
41-
broad range of miscellaneous enhancements, including bug fixes,
42-
Bootstrapping speed improvements, new templates for raising issues,
43-
and updated unit tests. These improvements are designed to
44-
streamline the user experience, increase the software’s stability,
45-
and expand its versatility. By addressing user feedback and
46-
identified issues, DABEST continues to refine its functionality and
47-
reliability.
17+
We are proud to announce **DABEST Version TBC (v2025.03.14)** This new
18+
version of the DABEST Python library provides several new features and
19+
includes performance improvements. It’s a big one!
20+
21+
1. **Python 3.13 Support**: DABEST now supports Python 3.10-3.13.
22+
23+
2. **Horizontal Plots**: This new feature allows users to create
24+
horizontal plots instead of the regular vertical plots, providing a
25+
more compact visualization of data. This can be utilized by setting
26+
`horizontal=True` in the `plot()` method. See the [Horizontal
27+
Plots](../tutorials/08-horizontal_plot.html) tutorial for more
28+
details.
29+
30+
3. **Forest Plots**: This new feature allows users to create forest
31+
plots! Forest plots provide a simple and intuitive way to visualize
32+
many delta-delta (or Deltas’ g) or mini-meta effect sizes at once
33+
from multiple different dabest objects without presenting the raw
34+
data. See the [Forest Plots](../tutorials/07-forest_plot.html)
35+
tutorial for more details.
36+
37+
4. **Gridkey**: This new feature allows users to create a gridkey to
38+
represent the labels of the groups in the plot. This can be utilized
39+
with the `gridkey_rows` argument in the `plot()` method. See the
40+
gridkey section in the [Plot
41+
Aesthetics](../tutorials/09-plot_aesthetics.html) tutorial for more
42+
details.
43+
44+
5. **Aesthetic Updates**: We have made several aesthetic improvements
45+
to the plots, including:
46+
47+
- **Swarm, Contrast, and Summary bars**: We have added bars to
48+
better highlight the various groups and their differences. These
49+
bars can be customized to suit the user’s needs. The swarm and
50+
contrast bars are provided by default, while the summary bars can
51+
be added by the user. See the relevant sections in the [Plot
52+
Aesthetics](../tutorials/09-plot_aesthetics.html) tutorial for
53+
more details.
54+
55+
- **Delta-Delta Plots**: We have modified the delta-delta plot
56+
format to be more compact and easier to read. The new format
57+
brings the delta-delta (or Deltas’ g) effect size closer to the
58+
regular effect sizes. In addition, a gap has been added to the
59+
zeroline to separate the delta-delta and regular effect sizes.
60+
61+
- **Delta-delta Effect Sizes for Proportion Plots**: Delta-delta
62+
effect sizes for proportion plots are now available.
63+
64+
- **Mini-Meta Plots**: We have modified the mini-meta plot format to
65+
be more compact and easier to read. The new format brings the
66+
mini-meta effect size closer to the regular effect sizes.
67+
68+
- **Proportion Plots Sample Sizes**: We have updated the proportion
69+
plots to show sample sizes for each group. These can be toggled on
70+
or off via the `prop_sample_counts` parameter.
71+
72+
- **Effect Size Lines for Paired Plots**: Effect size lines for
73+
paired plots are now available. These can be toggled on or off via
74+
the `es_paired_lines` parameter.
75+
76+
- **Baseline Error Curves**: Plots now include a baseline error dot
77+
and curve to show the error of the baseline/control group. By
78+
default, the dot is shown, while the curve can be added by the
79+
user (via the `show_baseline_ec` parameter).
80+
81+
- **Delta Text**: There is now an option to display delta text on
82+
the contrast axes. It displays the effect size of the contrast
83+
group relative to the reference group. This can be toggled on or
84+
off via the `delta_text` parameter. It is on by default.
85+
86+
- **Empty Circle Color Palette**: A new swarmplot color palette
87+
modification is available for unpaired plots via the
88+
`empty_circle` parameter in the `plot()` method. This option
89+
modifies the two-group swarmplots to have empty circles for the
90+
control group and filled circles for the experimental group.
91+
92+
6. **Miscellaneous Improvements & Adjustments**
93+
94+
- **Numba for Speed Improvements**: We have included Numba to speed
95+
up the various calculations in DABEST. This should make the
96+
calculations faster and more efficient. Importing DABEST may take
97+
a little longer than before, and a progress bar will appear during
98+
the import process to show the calculations being performed. Once
99+
imported, loading and plotting data should now be faster.
100+
101+
- **Terminology Updates**: We have made several updates to the
102+
documentation and terminology to improve clarity and consistency.
103+
For example:
104+
105+
- The method to utilise the Deltas’ g effect size is now via the
106+
`.hedges_g.plot()` method now rather than creating a whole new
107+
`Delta_g` object as before. The functionality remains the same,
108+
it plots hedges_g effect sizes and then the Deltas’ g effect
109+
size alongside these (if a delta-delta experiment was loaded
110+
correctly).
111+
112+
- **Updated Tutorial Pages**: We have updated the tutorial pages to
113+
reflect the new features and changes. The tutorial pages are now
114+
more comprehensive and hopefully more intuitive!.
115+
116+
- **Results Dataframe for Delta-delta and Mini-meta Plots**: A
117+
results dataframe can now be extracted for both the delta-delta
118+
and mini-meta effect size data (similar to the results dataframe
119+
for the regular effect sizes). These can be found via the
120+
`.results` attribute of the `.delta_delta` or `.mini_meta` object.
48121

49122
## Contents
50123

@@ -92,7 +165,7 @@ allowing everyone access to high-quality estimation plots.
92165

93166
## Installation
94167

95-
This package is tested on Python 3.8 and onwards. It is highly
168+
This package is tested on Python 3.10 and onwards. It is highly
96169
recommended to download the [Anaconda
97170
distribution](https://www.continuum.io/downloads) of Python in order to
98171
obtain the dependencies easily.
@@ -161,17 +234,17 @@ page](https://github.com/ACCLAB/DABEST-python/issues/new).
161234
## Contributing
162235

163236
All contributions are welcome; please read the [Guidelines for
164-
contributing](CONTRIBUTING.md) first.
237+
contributing](../CONTRIBUTING.md) first.
165238

166-
We also have a [Code of Conduct](CODE_OF_CONDUCT.md) to foster an
239+
We also have a [Code of Conduct](../CODE_OF_CONDUCT.md) to foster an
167240
inclusive and productive space.
168241

169242
### A wish list for new features
170243

171244
If you have any specific comments and ideas for new features that you
172245
would like to share with us, please read the [Guidelines for
173-
contributing](CONTRIBUTING.md), create a new issue using Feature request
174-
template or create a new post in [our Google
246+
contributing](../CONTRIBUTING.md), create a new issue using Feature
247+
request template or create a new post in [our Google
175248
Group](https://groups.google.com/g/estimationstats).
176249

177250
## Acknowledgements
@@ -198,7 +271,7 @@ The test suite ensures that the bootstrapping functions and the plotting
198271
functions perform as expected.
199272

200273
For detailed information, please refer to the [test
201-
folder](nbs/tests/README.md)
274+
folder](../nbs/tests/README.md)
202275

203276
## DABEST in other languages
204277

dabest/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
if not _NUMBA_COMPILED:
1212
precompile_all()
1313

14-
__version__ = "2024.03.30"
14+
__version__ = "2025.03.14"

dabest/_delta_objects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
# %% ../nbs/API/delta_objects.ipynb 6
1919
class DeltaDelta(object):
20-
"""
20+
r"""
2121
A class to compute and store the delta-delta statistics for experiments with a 2-by-2 arrangement where two independent variables, A and B, each have two categorical values, 1 and 2. The data is divided into two pairs of two groups, and a primary delta is first calculated as the mean difference between each of the pairs:
2222
2323

dabest/forest_plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def get_kwargs(
223223
"widths": 0.5,
224224
"showextrema": False,
225225
"showmedians": False,
226-
"vert": not horizontal
226+
"vert": not horizontal,
227227
}
228228
if violin_kwargs is None:
229229
violin_kwargs = default_violin_kwargs

dabest/misc_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def get_kwargs(
259259
# Violinplot kwargs.
260260
default_violinplot_kwargs = {
261261
"widths": 0.5,
262-
"vert": True,
262+
"vert": 'vertical',
263263
"showextrema": False,
264264
"showmedians": False,
265265

dabest/plot_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2703,7 +2703,7 @@ def _swarm(
27032703
bad_x_offsets.append(True)
27042704
else:
27052705
bad_x_offsets.append(False)
2706-
potential_x_offsets[bad_x_offsets] = np.infty
2706+
potential_x_offsets[bad_x_offsets] = np.inf
27072707
abs_potential_x_offsets = [abs(_) for _ in potential_x_offsets]
27082708
valid_x_offset = potential_x_offsets[
27092709
abs_potential_x_offsets.index(min(abs_potential_x_offsets))

dabest/plotter.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ def effectsize_df_plotter(effectsize_df: object, **plot_kwargs) -> matplotlib.fi
7777
set_xaxis_ticks_and_lims,
7878
show_legend,
7979
gardner_altman_adjustments,
80-
# Cumming_Plot_Aesthetic_Adjustments,
8180
extract_group_summaries,
8281
draw_zeroline,
8382
redraw_dependent_spines,

nbs/01-getting_started.ipynb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,16 @@
6464
"source": [
6565
"\n",
6666
"\n",
67-
"Python 3.10 is strongly recommended. DABEST has also been tested with Python 3.8 and onwards.\n",
67+
"Python 3.11 is strongly recommended. DABEST has also been tested with Python 3.10 and onwards.\n",
6868
"\n",
6969
"In addition, the following packages are also required (listed with their minimal versions):\n",
7070
"\n",
71-
"* [numpy 1.23.5](https://www.numpy.org)\n",
72-
"* [scipy 1.9.3](https://www.scipy.org)\n",
73-
"* [matplotlib 3.6.3](https://www.matplotlib.org)\n",
74-
"* [pandas 1.5.0](https://pandas.pydata.org)\n",
75-
"* [seaborn 0.12.2](https://seaborn.pydata.org)\n",
71+
"* [numpy 2.1.3](https://www.numpy.org)\n",
72+
"* [scipy 1.15.2](https://www.scipy.org)\n",
73+
"* [matplotlib 3.10.0](https://www.matplotlib.org)\n",
74+
"* [pandas 2.2.3](https://pandas.pydata.org)\n",
75+
"* [seaborn 0.13.2](https://seaborn.pydata.org)\n",
76+
"* [numba 0.61.0](https://numba.pydata.org)\n",
7677
"* [lqrt 0.3.3](https://github.com/alyakin314/lqrt)\n",
7778
"\n",
7879
"To obtain these package dependencies easily, it is highly recommended to download the [Anaconda](https://www.continuum.io/downloads) distribution of Python.\n"

0 commit comments

Comments
 (0)