Skip to content

Commit

Permalink
Add github workflow and remove travis (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnothman committed Dec 27, 2023
1 parent 0a0b59d commit 5e970e8
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 42 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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.

6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
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 upsetplot/tests/test_data.py
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion upsetplot/tests/test_reformat.py
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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 5e970e8

Please sign in to comment.