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
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
push:
branches: [master, dev]
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: uv sync --dev --frozen

- name: Lint
run: uv run ruff check .

Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI no longer runs the style/PEP8 checks that were previously executed via py.test --pep8 (pytest-pep8). If style checking is still desired, add an explicit lint step/job (e.g., ruff/pycodestyle/flake8) so formatting regressions are caught in CI.

Suggested change
- name: Lint
run: uv run ruff check .

Copilot uses AI. Check for mistakes.
- name: Run tests
run: uv run pytest -v test_pyspin.py
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

3 changes: 0 additions & 3 deletions dev-requirements.txt

This file was deleted.

34 changes: 34 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[project]
name = "pyspin"
version = "1.1.1"
description = "Little terminal spinner lib."
readme = "README.rst"
license = { text = "MIT" }
authors = [{ name = "lord63", email = "lord63.j@gmail.com" }]
requires-python = ">=3.10"
keywords = ["terminal", "spin", "spinner"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]

[project.urls]
Homepage = "https://github.com/lord63/py-spin"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[dependency-groups]
dev = ["pytest>=8.0", "ruff"]

[tool.hatch.build.targets.wheel]
packages = ["pyspin"]
13 changes: 2 additions & 11 deletions pyspin/spin.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import absolute_import, print_function

import sys
import threading
import time
from functools import wraps
from concurrent.futures import ThreadPoolExecutor

# For python 2/3 compatible.
if sys.version_info.major == 2:
text_type = unicode
else:
text_type = str

Box1 = u'⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏'
Box2 = u'⠋⠙⠚⠞⠖⠦⠴⠲⠳⠓'
Box3 = u'⠄⠆⠇⠋⠙⠸⠰⠠⠰⠸⠙⠋⠇⠆'
Expand Down Expand Up @@ -59,7 +50,7 @@ def current(self):
def next(self):
current_frame = self.current()
self.position = (self.position + 1) % self.length
return text_type(current_frame)
return str(current_frame)

def reset(self):
self.position = 0
Expand All @@ -83,7 +74,7 @@ def _init_spin(self):
time.sleep(0.1)

def _spin_cursor(self):
print(text_type("\r{0} {1}").format(self.next(), self.words), end="")
print("\r{0} {1}".format(self.next(), self.words), end="")
sys.stdout.flush()

def __enter__(self):
Expand Down
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

46 changes: 0 additions & 46 deletions setup.py

This file was deleted.

15 changes: 0 additions & 15 deletions tox.ini

This file was deleted.

Loading
Loading