Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test v07 #163

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ name: Python package

on:
push:
branches: [ master, dev, v0.2, v0.3, v0.4]
branches: [ master, dev]
pull_request:
branches: [ master, dev, v0.2, v0.3, v0.4]
branches: [ master, dev, v0.7]

jobs:
build:

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, '3.10', 3.11]
python-version: [3.8, 3.9, '3.10', 3.11, 3.12]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -40,4 +40,4 @@ jobs:
coverage run -m unittest discover tests
coverage report -m
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## v0.7
### v0.7.0
#### Features
- Compatibility with pandas v2+ and seaborn above v0.12+
(PR [#155](https://github.com/trevismd/statannotations/pull/155) by
[getzze](https://github.com/getzze))

## v0.6
### v0.6.0
#### Features
Expand Down
53 changes: 24 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Active Development](https://img.shields.io/badge/Maintenance%20Level-Actively%20Developed-brightgreen.svg)](https://gist.github.com/cheerfulstoic/d107229326a01ff0f333a1d3476e068d)
![coverage](https://raw.githubusercontent.com/trevismd/statannotations/master/coverage.svg)
![Python](https://img.shields.io/badge/Python-3.6%2B-blue)
![Python](https://img.shields.io/badge/Python-3.8%2B-blue)
[![Documentation Status](https://readthedocs.org/projects/statannotations/badge/?version=latest)](https://statannotations.readthedocs.io/en/master/?badge=latest)
[![DOI](https://zenodo.org/badge/296015778.svg)](https://zenodo.org/badge/latestdoi/296015778)

Expand All @@ -9,26 +9,10 @@
Python package to optionally compute statistical test and add statistical
annotations on plots generated with seaborn.

## Derived work

This repository is based on
[webermarcolivier/statannot](https://github.com/webermarcolivier/statannot)
(commit 1835078 of Feb 21, 2020, tagged "v0.2.3").

Additions/modifications since that version are below represented **in bold**
(previous fixes are not listed).

**! From version 0.4.0 onwards (introduction of `Annotator`), `statannot`'s API
is no longer usable in `statannotations`**.
Please use the latest v0.3.2 release if you must keep `statannot`'s API in your
code, but are looking for bug fixes we have covered.

`statannot`'s interface, at least until its version 0.2.3, is usable in
statannotations until v.0.3.x, which already provides additional features (see
corresponding branch).

## Features

Latest (v0.7) : supports pandas v2+ and seaborn v0.12+

- Single function to add statistical annotations on plots
generated by seaborn:
- Box plots
Expand Down Expand Up @@ -89,13 +73,6 @@ pip install .
pip install -r requirements.txt .
```

## Important note

**! Seaborn ≥ v0.12 and pandas 2 are not officially supported, we know there are
at least some bugs. Issues can still be reported (and upvoted) in order to plan
further development to support these versions. Also see
[discussion](https://github.com/trevismd/statannotations/discussions/81)**.

## Usage

Here is a minimal example:
Expand Down Expand Up @@ -139,11 +116,11 @@ annotator.apply_and_annotate()

## Requirements

+ Python >= 3.6
+ Python >= 3.8
+ numpy >= 1.12.1
+ seaborn >= 0.9,<0.12
+ seaborn >= 0.9
+ matplotlib >= 2.2.2
+ pandas >= 0.23.0,<2.0.0
+ pandas >= 0.23.0
+ scipy >= 1.1.0
+ statsmodels (optional, for multiple testing corrections)

Expand Down Expand Up @@ -193,3 +170,21 @@ the changelog.
If you don't know where to start, there may be a few ideas in opened issues or
discussion, or something to work for the documentation.
NB: More on [CONTRIBUTING.md](CONTRIBUTING.md)

## Acknowledgments - Derived work

This repository is based on
[webermarcolivier/statannot](https://github.com/webermarcolivier/statannot)
(commit 1835078 of Feb 21, 2020, tagged "v0.2.3").

Additions/modifications since that version are below represented **in bold**
(previous fixes are not listed).

**! From version 0.4.0 onwards (introduction of `Annotator`), `statannot`'s API
is no longer usable in `statannotations`**.
Please use the latest v0.3.2 release if you must keep `statannot`'s API in your
code, but are looking for bug fixes we have covered.

`statannot`'s interface, at least until its version 0.2.3, is usable in
statannotations until v.0.3.x, which already provides additional features (see
corresponding branch).
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
numpy>=1.12.1
seaborn>=0.9.0,<0.12
seaborn>=0.9.0
matplotlib>=2.2.2
pandas>=0.23.0,<2.0.0
pandas>=0.23.0
scipy>=1.1.0
statsmodels
packaging
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from distutils.core import setup
from setuptools import find_packages
from setuptools import find_packages, setup
import re

with open("README.md", "r") as f:
Expand Down
7 changes: 5 additions & 2 deletions statannotations/Annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ def print_labels_and_content(self, sep=" vs. "):

def check_data_stat_result(self):
if not isinstance(self.data, StatResult):
warnings.warn("Annotation data has incorrect class." +
"Should be StatResult. Cannot annotate current pair.")
msg = (
"Cannot annotate current pair. Annotation data has incorrect "
f"class, should be StatResult: {type(self.data)}"
)
warnings.warn(msg)
return False
return True
Loading