Skip to content

Commit

Permalink
feat: github action publish (#33)
Browse files Browse the repository at this point in the history
- add github actions publish to PyPI on release
- migrate from setup.cfg to pyproject.toml
- update README with release notes
- update version to 0.2.6
  • Loading branch information
sirfuzzalot authored Jun 12, 2022
1 parent 2d41f74 commit 9daf42f
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 57 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow 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

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
18 changes: 4 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,17 @@ Textual Inputs is a collection of input widgets for the [Textual](https://github
## News

### v0.2.5
### v0.2.6

Adds support for syntax highlighting. To add syntax highlighting to your
input text set the `syntax` argument to a language supported by
`pygments`. Currently this is set to the default theme.

```python
TextInput(
name="code",
placeholder="enter some python code...",
title="Code",
syntax="python",
)
```
- Support for text overflow in TextInput
- Patch for crash when IntegerInput is empty and backspace is pressed.

## Quick Start

Installation

```bash
python -m pip install textual-inputs~=0.2.5
python -m pip install textual-inputs~=0.2.6
```

To use Textual Inputs
Expand Down
43 changes: 40 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,51 @@
[project]
name = "textual-inputs"
license = { text = "MIT" }
description = "textual-inputs is a collection of input widgets for the Textual TUI framework"
readme = "README.md"
keywords = ["tui", "terminal", "widget"]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"License :: OSI Approved :: MIT License",
"Environment :: Console",
"Intended Audience :: Developers",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10"
]
requires-python = ">=3.7"
dependencies = ["textual >= 0.1.18,< 0.2"]
dynamic = ["version"]

[[project.authors]]
author = "Tom Saunders"
email = "[email protected]"

[project.urls]
Source = "https://github.com/sirfuzzalot/textual-inputs"
Documentation = "https://github.com/sirfuzzalot/textual-inputs"
Tracker = "https://github.com/sirfuzzalot/textual-inputs/issues"

[build-system]
requires = [
"setuptools>=42",
"setuptools>=61",
"wheel"
]
build-backend = "setuptools.build_meta"

[tool.setuptools.dynamic]
version = { attr = "textual_inputs.__version__" }

[tool.black]
exclude = 'venv'
exclude = 'venv*'

[tool.isort]
profile = "black"
multi_line_output = 3
skip = ["venv"]
skip = ["venv*"]
39 changes: 0 additions & 39 deletions setup.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion src/textual_inputs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .integer_input import IntegerInput
from .text_input import TextInput

__version__ = "0.2.5"
__version__ = "0.2.6"

__all__ = ["IntegerInput", "TextInput"]

0 comments on commit 9daf42f

Please sign in to comment.