Skip to content

Commit 493781a

Browse files
committed
Use astral/uv
1 parent 67cb29b commit 493781a

File tree

6 files changed

+1552
-120
lines changed

6 files changed

+1552
-120
lines changed

.github/workflows/benchmark.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@ jobs:
88
build:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v5
11+
- uses: actions/checkout@v6
1212
- name: Set up Python 3.x
13-
uses: actions/setup-python@v5
13+
uses: astral-sh/setup-uv@v7
1414
with:
15-
python-version: "3.x"
15+
enable-cache: true
1616

17-
- name: Install dependencies
18-
run: |
19-
python3 -m pip install -e .[benchmark]
17+
- name: Install project
18+
run: uv sync --locked --group benchmark
2019

2120
- name: Benchmark
2221
run: |
23-
python3 tests/benchmark.py
22+
uv run python3 tests/benchmark.py

.github/workflows/tests.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,23 @@ on:
66

77
jobs:
88
build:
9-
runs-on: ${{ matrix.os }}
9+
runs-on: ubuntu-latest
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
os: [ubuntu-latest]
1413
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
1514

1615
steps:
17-
- uses: actions/checkout@v5
18-
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v5
16+
- uses: actions/checkout@v6
17+
18+
- name: Install uv and set the Python version
19+
uses: astral-sh/setup-uv@v7
2020
with:
21+
enable-cache: true
2122
python-version: ${{ matrix.python-version }}
2223

23-
- name: Install dependencies
24-
run: |
25-
python -m pip install pytest pytest-cov colorama
24+
- name: Install project
25+
run: uv sync --locked --dev
2626

27-
- name: Pytest
28-
run: |
29-
PYTHONPATH="." pytest --cov=ansimarkup tests
27+
- name: Run tests
28+
run: uv run pytest --cov=ansimarkup tests

.gitignore

Lines changed: 1 addition & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,5 @@
1-
# Byte-compiled / optimized / DLL files
21
__pycache__/
32
*.py[cod]
43
*$py.class
54

6-
# C extensions
7-
*.so
8-
9-
# Distribution / packaging
10-
.Python
11-
env/
12-
build/
13-
develop-eggs/
14-
dist/
15-
downloads/
16-
eggs/
17-
.eggs/
18-
lib/
19-
lib64/
20-
parts/
21-
sdist/
22-
var/
23-
*.egg-info/
24-
.installed.cfg
25-
*.egg
26-
27-
# PyInstaller
28-
# Usually these files are written by a python script from a template
29-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30-
*.manifest
31-
*.spec
32-
33-
# Installer logs
34-
pip-log.txt
35-
pip-delete-this-directory.txt
36-
37-
# Unit test / coverage reports
38-
htmlcov/
39-
.tox/
40-
.coverage
41-
.coverage.*
42-
.cache
43-
nosetests.xml
44-
coverage.xml
45-
*,cover
46-
.hypothesis/
47-
48-
# Translations
49-
*.mo
50-
*.pot
51-
52-
# Django stuff:
53-
*.log
54-
local_settings.py
55-
56-
# Flask stuff:
57-
instance/
58-
.webassets-cache
59-
60-
# Scrapy stuff:
61-
.scrapy
62-
63-
# Sphinx documentation
64-
docs/_build/
65-
66-
# PyBuilder
67-
target/
68-
69-
# IPython Notebook
70-
.ipynb_checkpoints
71-
72-
# pyenv
73-
.python-version
74-
75-
# celery beat schedule file
76-
celerybeat-schedule
77-
78-
# dotenv
79-
.env
80-
81-
# virtualenv
82-
venv/
83-
ENV/
84-
85-
# Spyder project settings
86-
.spyderproject
87-
88-
# Rope project settings
89-
.ropeproject
5+
.venv

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.14

pyproject.toml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[build-system]
2-
requires = ["setuptools>=61.0"]
3-
build-backend = "setuptools.build_meta"
4-
51
[project]
62
name = "ansimarkup"
73
version = "2.1.0"
@@ -27,20 +23,25 @@ dependencies = [
2723
[project.urls]
2824
"Homepage" = "https://github.com/gvalkov/python-ansimarkup"
2925

30-
[project.optional-dependencies]
31-
test = [
32-
"pytest",
33-
"pytest-cov"
34-
]
26+
[dependency-groups]
3527
benchmark = [
36-
"termcolor",
37-
"pastel",
38-
"plumbum",
39-
"rich",
28+
"pastel>=0.2.1",
29+
"plumbum>=1.8.3",
30+
"rich>=10.11.0",
31+
"termcolor>=1.1.0",
4032
]
33+
dev = [
34+
"pytest>=7.0.1",
35+
"pytest-cov>=4.0.0",
36+
]
37+
38+
[tool.uv.build-backend]
39+
module-name = "ansimarkup"
40+
module-root = ""
4141

42-
[tool.setuptools]
43-
packages = ["ansimarkup"]
42+
[tool.ruff]
43+
line-length = 120
4444

45-
[tool.black]
46-
line_length = 120
45+
[build-system]
46+
requires = ["uv_build>=0.9.29,<0.10.0"]
47+
build-backend = "uv_build"

0 commit comments

Comments
 (0)