Skip to content

Commit

Permalink
Merge pull request #41 from vkottler/dev/1.2.10
Browse files Browse the repository at this point in the history
1.2.10 - Enable Python 3.12
  • Loading branch information
vkottler authored Oct 16, 2023
2 parents d8e3b18 + c694b31 commit 8f3b982
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 29 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
matrix:
python-version:
- "3.11"
- "3.12"
system:
- ubuntu-latest
- macos-latest
Expand Down Expand Up @@ -66,7 +67,7 @@ jobs:
- run: |
mk python-release owner=vkottler \
repo=conntextual version=1.2.9
repo=conntextual version=1.2.10
if: |
matrix.python-version == '3.11'
&& matrix.system == 'ubuntu-latest'
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
=====================================
generator=datazen
version=3.1.3
hash=80259471aaab48e1d301b2bf62ccde22
hash=5a389470aa5595ab645188982d3db973
=====================================
-->

# conntextual ([1.2.9](https://pypi.org/project/conntextual/))
# conntextual ([1.2.10](https://pypi.org/project/conntextual/))

[![python](https://img.shields.io/pypi/pyversions/conntextual.svg)](https://pypi.org/project/conntextual/)
![Build Status](https://github.com/vkottler/conntextual/workflows/Python%20Package/badge.svg)
Expand All @@ -30,6 +30,7 @@
This package is tested with the following Python minor versions:

* [`python3.11`](https://docs.python.org/3.11/)
* [`python3.12`](https://docs.python.org/3.12/)

## Platform Support

Expand Down
4 changes: 2 additions & 2 deletions conntextual/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# =====================================
# generator=datazen
# version=3.1.3
# hash=0d892c50ad96d5651aa34b5fe258c337
# hash=9858da1e5c6405c818688450bf233b0c
# =====================================

"""
Expand All @@ -10,4 +10,4 @@

DESCRIPTION = "A network-application TUI using textual."
PKG_NAME = "conntextual"
VERSION = "1.2.9"
VERSION = "1.2.10"
1 change: 0 additions & 1 deletion conntextual/dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ vmklib
sphinx
sphinx-book-theme
setuptools-wrapper
textual-dev
types-psutil
types-setuptools
3 changes: 2 additions & 1 deletion conntextual/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
psutil
runtimepy>=2.12.3
textual
textual-plotext
uvloop
plotext
numpy
aiohttp>=3.9.0b0
24 changes: 11 additions & 13 deletions conntextual/ui/channel/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@

# third-party
from numpy.typing import ArrayLike
import plotext as plt
from rich.text import Text
from textual.widgets import Static
from textual_plotext import PlotextPlot


class Plot(Static):
class Plot(PlotextPlot):
"""A plot widget."""

def __init__(
Expand Down Expand Up @@ -41,18 +39,18 @@ def on_resize(self) -> None:

self.dispatch()

def dispatch(self) -> None:
"""Draw a new instance of the plot."""

plt.clf()
def on_mount(self) -> None:
"""Initialize the plot."""

plt.plot(self.x, self.y, marker=self.plot_marker)
plt.title(self.title)
plt.theme(self.plot_theme)
self.plt.title(self.title)
self.plt.theme(self.plot_theme)

plt.plotsize(self.size.width, self.size.height)
def dispatch(self) -> None:
"""Draw a new instance of the plot."""

self.update(Text.from_ansi(plt.build()))
self.plt.clear_data()
self.plt.plot(self.x, self.y, marker=self.plot_marker) # type: ignore
self.refresh()

def set_data(self, x: ArrayLike, y: ArrayLike) -> None:
"""Assign new data."""
Expand Down
7 changes: 5 additions & 2 deletions local/configs/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ requirements:
- psutil
- runtimepy>=2.12.3
- textual
- textual-plotext
- uvloop
- plotext
- numpy
# Python 3.12 support: https://github.com/aio-libs/aiohttp/issues/7675.
- aiohttp>=3.9.0b0

# Not using any features from this currently.
# - textual-dev
dev_requirements:
- setuptools-wrapper
- textual-dev
- types-psutil
- types-setuptools

Expand Down
2 changes: 1 addition & 1 deletion local/configs/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ author_info:
name: Vaughn Kottler
email: [email protected]
username: vkottler
versions: ["3.11"]
versions: ["3.11", "3.12"]

# Tests not working.
# - windows-latest
Expand Down
2 changes: 1 addition & 1 deletion local/variables/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
major: 1
minor: 2
patch: 9
patch: 10
entry: conntextual
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta:__legacy__"

[project]
name = "conntextual"
version = "1.2.9"
version = "1.2.10"
description = "A network-application TUI using textual."
readme = "README.md"
requires-python = ">=3.11"
Expand All @@ -16,6 +16,7 @@ maintainers = [
]
classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Operating System :: Unix",
Expand All @@ -38,7 +39,6 @@ test = [
"sphinx",
"sphinx-book-theme",
"setuptools-wrapper",
"textual-dev",
"types-psutil",
"types-setuptools"
]
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# =====================================
# generator=datazen
# version=3.1.3
# hash=eb2488b447726fac8b81d9e176405379
# hash=a13929149030d15ffef9467595f314b4
# =====================================

"""
Expand Down Expand Up @@ -29,6 +29,7 @@
"description": DESCRIPTION,
"versions": [
"3.11",
"3.12",
],
}
setup(
Expand Down
2 changes: 1 addition & 1 deletion tests/commands/test_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
def test_ui_curses():
"""Test user interfaces that require curses mode."""

with patch("runtimepy.commands.tui._curses.wrapper", new=wrapper_mock):
with patch("runtimepy.commands.common._curses.wrapper", new=wrapper_mock):
args = [PKG_NAME, "--curses", "ui"]
for variant in ["curses"]:
assert (
Expand Down

0 comments on commit 8f3b982

Please sign in to comment.