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
111 changes: 111 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# ref: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
name: build

on: push

jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest
env:
UV_PYTHON_INSTALL_ALLOW_PRERELEASE: 1

steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install Python 3.14
run: uv python install 3.14
- name: Build
run: uv build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs:
- build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/atv
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

publish-to-pypi:
name: Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/atv
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

github-release:
name: Sign the Python 🐍 distribution 📦 with Sigstore and upload them to GitHub Release
needs:
- publish-to-pypi
runs-on: ubuntu-latest

permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/[email protected]
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
"${GITHUB_REF_NAME}"
--repo "${GITHUB_REPOSITORY}"
--notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages, and the
# sigstore-produced signatures and certificates.
run: >-
gh release upload
"${GITHUB_REF_NAME}" dist/**
--repo "${GITHUB_REPOSITORY}"
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# atv 🌱

[![PyPI][pypi-badge]][pypi-link]
[![Python versions][versions-badge]][pypi-link]
[![GitHub Actions][github-ci-badge]][github-ci-link]
[![License][license-badge]][license-link]

<img width="800" height="403" alt="image" src="https://github.com/user-attachments/assets/1a8000b2-2eee-42f9-a9ac-b6ecb79c9e60" />


Expand Down Expand Up @@ -50,3 +55,11 @@ uvx --from . atv
## License

This project is licensed under the MIT License. See `LICENSE` for details.

[pypi-badge]: https://img.shields.io/pypi/v/atv.svg
[pypi-link]: https://pypi.org/project/atv/
[versions-badge]: https://img.shields.io/pypi/pyversions/atv.svg
[github-ci-badge]: https://github.com/jrfk/atv/actions/workflows/workflow.yml/badge.svg
[github-ci-link]: https://github.com/jrfk/atv/actions/workflows/workflow.yml
[license-badge]: https://img.shields.io/github/license/jrfk/atv
[license-link]: https://github.com/jrfk/atv/blob/main/LICENSE
34 changes: 34 additions & 0 deletions atv/__about__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# file generated by setuptools-scm
# don't change, don't track in version control

__all__ = [
"__version__",
"__version_tuple__",
"version",
"version_tuple",
"__commit_id__",
"commit_id",
]

TYPE_CHECKING = False
if TYPE_CHECKING:
from typing import Tuple
from typing import Union

VERSION_TUPLE = Tuple[Union[int, str], ...]
COMMIT_ID = Union[str, None]
else:
VERSION_TUPLE = object
COMMIT_ID = object

version: str
__version__: str
__version_tuple__: VERSION_TUPLE
version_tuple: VERSION_TUPLE
commit_id: COMMIT_ID
__commit_id__: COMMIT_ID

__version__ = version = '0.1.2.dev2+g47659ffc3.d20251003'
__version_tuple__ = version_tuple = (0, 1, 2, 'dev2', 'g47659ffc3.d20251003')

__commit_id__ = commit_id = None
7 changes: 6 additions & 1 deletion atv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

from __future__ import annotations

from importlib import metadata

__all__ = ["__version__"]

__version__ = "0.1.0"
try:
from .__about__ import __version__
except ImportError: # pragma: no cover - fallback for editable installs without version file
__version__ = metadata.version("atv")
30 changes: 29 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,44 @@
[project]
name = "atv"
version = "0.1.1"
description = "atv(async task viewer): a TUI tool for experimenting with Python 3.14 asyncio ps/pstree features"
readme = "README.md"
requires-python = ">=3.14"
dependencies = [
"textual>=0.57,<0.61",
"psutil>=5.9",
]
dynamic = ["version"]

[project.urls]
Repository = "https://github.com/jrfk/atv"

[project.scripts]
atv = "atv.cli:main"

[tool.uv]
package = true

[build-system]
requires = [
"hatchling>=1.25",
"hatch-vcs>=0.4",
]
build-backend = "hatchling.build"

[tool.hatch.version]
source = "vcs"
tag-pattern = "v(?P<version>.+)"
fallback-version = "0.0.0"

[tool.hatch.build.hooks.vcs]
version-file = "atv/__about__.py"

[tool.hatch.build.targets.sdist]
exclude = [
"dist",
]

[tool.hatch.build.targets.wheel]
exclude = [
"dist",
]
29 changes: 14 additions & 15 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.