Skip to content

Commit

Permalink
Merge branch 'master' into 0.8.X
Browse files Browse the repository at this point in the history
# Conflicts:
#	upsetplot/__init__.py
  • Loading branch information
jnothman committed Dec 28, 2023
2 parents 3bbc0ec + ed8dd79 commit d8a3a2a
Show file tree
Hide file tree
Showing 14 changed files with 69 additions and 49 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
@@ -0,0 +1,20 @@
name: Lintbb
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Lint with Ruff
run: |
pip install ruff
ruff --output-format=github .
continue-on-error: true
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,29 @@
name: Build
on: [push]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
conda-deps:
- python=3.6 pandas=1.0 matplotlib=2.1.2 numpy=1.17
- pandas matplotlib numpy
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
- name: conda debug info
shell: bash -el {0}
run: conda info -a
- name: install
shell: bash -el {0}
run: |
conda install pytest pytest-cov coveralls ${{ matrix.conda-deps }}
python setup.py install
cp ci/matplotlibrc matplotlibrc
- name: test
shell: bash -el {0}
run: pytest
- name: Coveralls
uses: coverallsapp/github-action@v2
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -20,6 +20,7 @@
.ipynb_checkpoints
.tags
.cache/
.direnv/

# Compiled source #
###################
Expand Down Expand Up @@ -84,3 +85,4 @@ Thumbs.db
*.cpp

.pytest_cache
.envrc
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -10,6 +10,8 @@ What's new in version 0.8
- Added `subsets` attribute to QueryResult. (:issue:`198`)
- Fixed a bug where more than 64 categories could result in an error. (:issue:`193`)

Patch release 0.8.1 handles deprecations in dependencies.

What's new in version 0.7
-------------------------

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
New BSD License

Copyright (c) 2018 Joel Nothman.
Copyright (c) 2018-2023 Joel Nothman.
All rights reserved.


Expand Down
6 changes: 3 additions & 3 deletions README.rst
Expand Up @@ -164,10 +164,10 @@ References
:alt: Latest version on PyPi
:target: https://badge.fury.io/py/UpSetPlot

.. |build| image:: https://travis-ci.org/jnothman/UpSetPlot.svg?branch=master
:alt: Travis CI build status
.. |build| image:: https://github.com/jnothman/upsetplot/actions/workflows/test.yml/badge.svg
:alt: Github Workflows CI build status
:scale: 100%
:target: https://travis-ci.org/jnothman/UpSetPlot
:target: https://github.com/jnothman/UpSetPlot/actions/workflows/test.yml

.. |issues| image:: https://img.shields.io/github/issues/jnothman/UpSetPlot.svg
:alt: Issue tracker
Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Expand Up @@ -67,7 +67,7 @@

# General information about the project.
project = u'upsetplot'
copyright = u'2018-2022, Joel Nothman'
copyright = u'2018-2023, Joel Nothman'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Expand Up @@ -19,8 +19,7 @@ def setup_package():
version=version,
packages=["upsetplot"],
license='BSD-3-Clause',
setup_requires=['pytest-runner'],
tests_require=['pytest>=2.7', 'pytest-cov<2.6'],
extras_require={'testing': ['pytest>=2.7', 'pytest-cov<2.6']},
# TODO: check versions
install_requires=['pandas>=0.23', 'matplotlib>=2.0'])
finally:
Expand Down
2 changes: 1 addition & 1 deletion upsetplot/__init__.py
@@ -1,4 +1,4 @@
__version__ = '0.8.0'
__version__ = '0.8.2'

import os

Expand Down
5 changes: 4 additions & 1 deletion upsetplot/plotting.py
Expand Up @@ -656,7 +656,10 @@ def plot_matrix(self, ax):
"linewidth": "linewidths",
"linestyle": "linestyles",
"hatch": "hatch"}
styles = pd.DataFrame(styles).reindex(columns=style_columns.keys())
styles = (pd.DataFrame(styles)
.reindex(columns=style_columns.keys())
.astype({"facecolor": 'O',
"edgecolor": 'O', "linewidth": float, "linestyle": 'O', "hatch": 'O'}))
styles["linewidth"].fillna(1, inplace=True)
styles["facecolor"].fillna(self._facecolor, inplace=True)
styles["edgecolor"].fillna(styles["facecolor"], inplace=True)
Expand Down
5 changes: 3 additions & 2 deletions upsetplot/tests/test_data.py
Expand Up @@ -3,7 +3,7 @@
import pandas as pd
import numpy as np
from distutils.version import LooseVersion
from pandas.util.testing import (assert_series_equal, assert_frame_equal,
from pandas.testing import (assert_series_equal, assert_frame_equal,
assert_index_equal)
from upsetplot import (from_memberships, from_contents, from_indicators,
generate_data)
Expand Down Expand Up @@ -111,7 +111,8 @@ def test_from_contents_vs_memberships(data, typ, id_column):
assert_series_equal(baseline[id_column].reset_index(drop=True),
pd.Series(['aa', 'bb', 'cc', 'dd', 'ee', 'ff'],
name=id_column))
assert_frame_equal(baseline.drop([id_column], axis=1), expected)
baseline_without_id = baseline.drop([id_column], axis=1)
assert_frame_equal(baseline_without_id, expected, check_column_type=baseline_without_id.shape[1] > 0)


def test_from_contents(typ=set, id_column='id'):
Expand Down
2 changes: 1 addition & 1 deletion upsetplot/tests/test_reformat.py
@@ -1,6 +1,6 @@
import pytest
import pandas as pd
from pandas.util.testing import assert_series_equal, assert_frame_equal
from pandas.testing import assert_series_equal, assert_frame_equal

from upsetplot import generate_counts, generate_samples
from upsetplot import query
Expand Down
2 changes: 1 addition & 1 deletion upsetplot/tests/test_upsetplot.py
Expand Up @@ -2,7 +2,7 @@
import itertools

import pytest
from pandas.util.testing import (
from pandas.testing import (
assert_series_equal, assert_frame_equal, assert_index_equal)
from numpy.testing import assert_array_equal
import pandas as pd
Expand Down

0 comments on commit d8a3a2a

Please sign in to comment.