Skip to content

Commit

Permalink
Merge pull request #40 from ColCarroll/new-build
Browse files Browse the repository at this point in the history
New build
  • Loading branch information
ColCarroll authored Apr 3, 2024
2 parents 3e5590f + cf38c6d commit a646777
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 36 deletions.
53 changes: 38 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,43 @@
name: ridge_map build
on: [push]
name: unittests & auto-publish
on: [push, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-18.04
strategy:
matrix:
python-version: [3.6,3.7]
pytest-job:
runs-on: ubuntu-latest
timeout-minutes: 30

concurrency: ${{ github.workflow }}-${{ github.ref }}

steps:
- uses: actions/checkout@v2
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install .
python -m pip install pydocstyle pytest pylint pytest-cov black coveralls
python-version: "3.10"
- run: pip --version
- run: pip install .
- run: pip install pydocstyle pytest pylint pytest-cov black
- run: pip freeze
- name: Run tests
run: ./scripts/test.sh

# Auto-publish when version is increased
publish-job:
# Only try to publish if:
# * Repo is self (prevents running from forks)
# * Branch is `main`
if: |
github.repository == 'colcarroll/ridge_map'
&& github.ref == 'refs/heads/main'
needs: pytest-job # Only publish after tests are successful
runs-on: ubuntu-latest
permissions:
contents: write
timeout-minutes: 30

steps:
# Publish the package (if local `__version__` > pip version)
- uses: etils-actions/pypi-auto-publish@v1
with:
pypi-token: ${{ secrets.PYPI_API_TOKEN }}
gh-token: ${{ secrets.GITHUB_TOKEN }}
parse-changelog: false
22 changes: 2 additions & 20 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,6 @@ unsafe-load-any-extension=no
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
confidence=

# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once). You can also use "--disable=all" to
# disable everything first and then reenable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=bad-continuation

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
Expand Down Expand Up @@ -127,13 +116,6 @@ max-line-length=100
# Maximum number of lines in a module.
max-module-lines=1000

# List of optional constructs for which whitespace checking is disabled. `dict-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,
dict-separator

# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
single-line-class-stmt=no
Expand Down Expand Up @@ -491,5 +473,5 @@ min-public-methods=1

# Exceptions that will emit a warning when being caught. Defaults to
# "BaseException, Exception".
overgeneral-exceptions=BaseException,
Exception
overgeneral-exceptions=builtins.BaseException,
builtins.Exception
1 change: 1 addition & 0 deletions ridge_map/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""A library for plotting ridges with ridges."""

__version__ = "0.0.4"
from .ridge_map import RidgeMap, FontManager
3 changes: 2 additions & 1 deletion ridge_map/ridge_map.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""3D maps with 1D lines."""

from urllib.request import urlopen
from tempfile import NamedTemporaryFile

Expand Down Expand Up @@ -255,7 +256,7 @@ def plot_map(
fontproperties=self.font,
size=label_size,
verticalalignment=label_verticalalignment,
bbox=dict(facecolor=background_color, alpha=1, linewidth=0),
bbox={"facecolor": background_color, "alpha": 1, "linewidth": 0},
zorder=len(values) + 10,
)

Expand Down

0 comments on commit a646777

Please sign in to comment.