Skip to content

Commit 04724af

Browse files
committed
Add uv
1 parent a704547 commit 04724af

7 files changed

Lines changed: 90 additions & 64 deletions

File tree

.github/workflows/check.yaml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,26 @@ jobs:
3333
pytest:
3434
name: Run pytest
3535
runs-on: ubuntu-latest
36+
strategy:
37+
matrix:
38+
python-version:
39+
- "3.10"
40+
- "3.11"
41+
- "3.12"
42+
3643
steps:
37-
- uses: actions/checkout@v4
44+
- uses: actions/checkout@v5
3845

39-
- name: Install Python
40-
uses: actions/setup-python@v5
46+
- name: Install uv
47+
uses: astral-sh/setup-uv@v7
48+
with:
49+
python-version: ${{ matrix.python-version }}
4150

42-
- name: Install dependencies
43-
run: |
44-
python -m pip install --upgrade pip
45-
pip install -r requirements.txt
51+
- name: Set up Python
52+
run: uv python install
4653

47-
- name: Install openpaygo
48-
run: pip install .
49-
50-
- name: Install pytest
51-
run: pip install pytest
54+
- name: Install dependencies
55+
run: uv sync
5256

5357
- name: Run pytest
54-
run: pytest
58+
run: uv run pytest

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ ipython_config.py
8585
# pyenv
8686
# For a library or package, you might want to ignore these files since the code is
8787
# intended to run in multiple environments; otherwise, check them in:
88-
# .python-version
88+
.python-version
8989

9090
# pipenv
9191
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
@@ -98,7 +98,7 @@ ipython_config.py
9898
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
9999
# This is especially recommended for binary packages to ensure reproducibility, and is more
100100
# commonly ignored for libraries.
101-
# uv.lock
101+
uv.lock
102102

103103
# poetry
104104
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,16 @@ The **OpenPAYGO Python library** supports the following features:
8787

8888
## Installing the library
8989

90-
You can install the library by running `pip install openpaygo` or adding `openpaygo` in your requirements.txt file and running `pip install -r requirements.txt`.
90+
### Released version from PyPI
91+
92+
You can install `OpenPAYGO-python` from [PyPI](https://pypi.org/project/openpaygo/).
93+
For example by running `pip install openpaygo` or adding `openpaygo` as a dependency (`uv add openpaygo`).
94+
95+
### Development setup
96+
97+
- Install [`uv`](https://docs.astral.sh/uv/)
98+
- Run `uv install`
99+
- Run `uv tests`
91100

92101
## Getting Started - OpenPAYGO Token
93102

pyproject.toml

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,65 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "openpaygo"
7+
version = "0.5.5"
8+
description = "OpenPAYGO Python library"
9+
readme = { file = "README.md", content-type = "text/markdown" }
10+
requires-python = ">=3.6"
11+
license = { text = "MIT License" }
12+
keywords = ["paygo"]
13+
14+
authors = [
15+
{ name = "EnAccess" }
16+
]
17+
18+
classifiers = [
19+
"Development Status :: 5 - Production/Stable",
20+
"Intended Audience :: Developers",
21+
"License :: OSI Approved :: Apache Software License",
22+
"Operating System :: Unix",
23+
"Operating System :: POSIX",
24+
"Operating System :: MacOS",
25+
"Operating System :: Microsoft :: Windows",
26+
"Programming Language :: Python",
27+
"Programming Language :: Python :: 3",
28+
"Programming Language :: Python :: 3.7",
29+
"Programming Language :: Python :: 3.8",
30+
"Programming Language :: Python :: 3.9",
31+
"Programming Language :: Python :: 3.10",
32+
"Programming Language :: Python :: 3.11",
33+
"Programming Language :: Python :: 3.12",
34+
"Programming Language :: Python :: Implementation :: CPython",
35+
"Topic :: Utilities",
36+
]
37+
38+
dependencies = [
39+
"siphash>=0.0.1",
40+
]
41+
42+
[dependency-groups]
43+
dev = [
44+
"pytest>=7.0.1",
45+
]
46+
47+
[project.urls]
48+
Homepage = "https://enaccess.github.io/OpenPAYGO-docs/"
49+
Documentation = "https://enaccess.github.io/OpenPAYGO-docs/"
50+
Changes = "https://github.com/EnAccess/OpenPAYGO-python/releases"
51+
Source = "https://github.com/EnAccess/OpenPAYGO-python/"
52+
Issues = "https://github.com/EnAccess/OpenPAYGO-python/issues"
53+
54+
[tool.setuptools]
55+
include-package-data = true
56+
zip-safe = false
57+
58+
[tool.setuptools.packages.find]
59+
where = ["."]
60+
161
[tool.ruff]
2-
# Add some rules to ruff's default:
62+
# Add some rules to ruff's default:
363
# - isort: https://docs.astral.sh/ruff/rules/#isort-i
464
# - pep8-naming: https://docs.astral.sh/ruff/rules/#pep8-naming-n
565
select = ["E", "F", "I", "N"]

requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

setup.cfg

Lines changed: 0 additions & 43 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)