Skip to content
Merged
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
22 changes: 16 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,22 @@ jobs:

- name: Install font
run: |
cd /usr/share/fonts
wget https://github.com/JulietaUla/Montserrat/archive/refs/tags/v7.222.tar.gz
tar -xvzf v7.222.tar.gz
sudo chmod -R --reference=/usr/share/fonts/truetype Montserrat-7.222
# ---- Install Host Grotesk (v1.002) ----
# prerequisites (unzip isn’t needed if you keep using tar)
sudo apt-get update -y
sudo apt-get install -y wget tar
# 1) create a spot for the family
sudo mkdir -p /usr/share/fonts/truetype/hostgrotesk
cd /usr/share/fonts/truetype/hostgrotesk
# 2) download the latest release tarball
# -> https://github.com/Element-Type/HostGrotesk/releases/tag/1.002
wget -q https://github.com/Element-Type/HostGrotesk/archive/refs/tags/1.002.tar.gz
# 3) extract only the TTFs; strip the first two path components
tar --wildcards --strip-components=2 -xzf 1.002.tar.gz "*/fonts/ttf/*.ttf"
# 4) match permissions to other truetype fonts
sudo chmod -R --reference=/usr/share/fonts/truetype/dejavu .
# 5) refresh the cache & verify
sudo fc-cache -fv
fc-match Montserrat

fc-match "Host Grotesk"
- run: pip install ".[docs]"
- run: mkdocs gh-deploy --force
30 changes: 0 additions & 30 deletions .github/workflows/lint.yml

This file was deleted.

38 changes: 19 additions & 19 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: PyPI
name: Publish to PyPI

on:
release:
Expand All @@ -10,21 +7,24 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest

environment: pypi
permissions:
id-token: write
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
- name: Checkout project
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine build
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
python-version-file: pyproject.toml

- name: Build
run: |
python -m build --sdist --wheel .
twine upload dist/*
uv build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
60 changes: 30 additions & 30 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
name: tests
name: Lint and Test

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov wheel
pip install -e .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run unit and system tests
run: |
pytest --cov=vizta tests/
- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
python-version-file: pyproject.toml

- uses: pre-commit/action@v3.0.1
with:
fail_ci_if_error: true
extra_args: --all-files

test:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml

- name: Run tests
run: uv run pytest tests
23 changes: 18 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
repos:
- repo: https://github.com/psf/black
rev: 22.10.0 # Replace by any tag/version: https://github.com/psf/black/tags
hooks:
- id: black
language_version: python3 # Should be a command that runs python3.6+
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: detect-private-key
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.0
hooks:
# Run the linter.
- id: ruff
types_or: [ python, pyi, jupyter ]
args: [ --fix, --show-fixes ]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi, jupyter ]
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## [unreleased]

## [1.0.0] 2025-06-21
### Changed
- Updated for rebranding

### Fixed
- Compatibility with newer versions of Seaborn

## [0.0.1] 2022-11-08
### Added
- The first release! :tada:
1 change: 0 additions & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,3 @@ version 2.0, available at

[homepage]: https://www.contributor-covenant.org
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html

4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ There are three exceptions to this:

2. The Vignettes are created from Jupyter notebooks.

3. The Code of Conduct, Release Notes, and this Contributing document are
3. The Code of Conduct, Release Notes, and this Contributing document are
markdown files that live in the root of the vizta repository.

### Editing most documents
Expand All @@ -39,7 +39,7 @@ way.

## Contributing to the code

We welcome contributions to the source code of vizta---particularly
We welcome contributions to the source code of vizta---particularly
ones that address discussed [issues](https://github.com/TalusBio/vizta/issues).

Contributions to vizta follow a standard GitHub contribution workflow:
Expand Down
6 changes: 0 additions & 6 deletions codecov.yml

This file was deleted.

1 change: 0 additions & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# API reference

::: vizta.mpl.set_theme

59 changes: 32 additions & 27 deletions docs/index.ipynb

Large diffs are not rendered by default.

48 changes: 13 additions & 35 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Bio-Informatics",
]
requires-python = ">=3.6"
requires-python = ">=3.12"
dependencies = [
"matplotlib>=3.5.1",
"seaborn>=0.11.2",
Expand All @@ -30,19 +29,6 @@ Documentation = "https://TalusBio.github.io/vizta"
"Bug Tracker" = "https://github.com/TalusBio/vizta/issues"
"Discussion Board" = "https://github.com/TalusBio/vizta/discussions"

[project.optional-dependencies]
docs = [
"mkdocs>=1.3.0",
"mkdocstrings[python]>=0.18.1",
"mkdocs-material>=8.2.1",
"mkdocs-jupyter>=0.20.1",
"ipykernel>=6.12.1",
]
dev = [
"pre-commit>=2.7.1",
"black>=19.10b0",
]

[tool.setuptools]
include-package-data = false

Expand All @@ -53,24 +39,16 @@ find = {namespaces = false}

[tool.black]
line-length = 79
target-version = ['py37']
include = '\.pyi?$'
exclude = '''
target-version = ['py312']

(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
| foo.py # also separately exclude a file named foo.py in
# the root of the project
)
'''
[dependency-groups]
dev = [
"pytest>=8.4.1",
]
docs = [
"mkdocs>=1.3.0",
"mkdocstrings[python]>=0.18.1",
"mkdocs-material>=8.2.1",
"mkdocs-jupyter>=0.20.1",
"ipykernel>=6.12.1",
]
1 change: 1 addition & 0 deletions tests/unit_tests/test_mpl_themes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test matplotlib themes"""

import pytest
import vizta

Expand Down
8 changes: 4 additions & 4 deletions tests/unit_tests/test_palettes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@

def test_vizta_first():
"""Test when importing vizta before seaborn"""
import vizta
import vizta # noqa: F401
import seaborn as sns

sns.color_palette("talusbio")
sns.color_palette("wfondrie")


def test_vizta_first():
"""Test when importing vizta before seaborn"""
def test_vizta_second():
"""Test when importing vizta after seaborn"""
import seaborn as sns
import vizta
import vizta # noqa: F401

sns.color_palette("talusbio")
sns.color_palette("wfondrie")
1 change: 1 addition & 0 deletions tests/unit_tests/test_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test that setuptools-scm is working correctly"""

import vizta


Expand Down
Loading