Skip to content

Commit

Permalink
Use UV & support python >= 3.8, <= 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
ayalash committed Oct 4, 2024
1 parent be36635 commit d839269
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 21 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,22 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
env:
UV_PYTHON: ${{ matrix.python-version }}

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Checkout the repository
uses: actions/checkout@main
- name: Install the default version of uv
id: setup-uv
uses: astral-sh/setup-uv@v3
- name: Print the installed version
run: echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}"
- name: Install Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Tests
run: |
python -m venv .env
.env/bin/pip install -U setuptools pip
.env/bin/pip install '.[testing]'
.env/bin/pytest tests
uv venv
uv pip install ".[testing]"
.venv/bin/pytest tests
14 changes: 5 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
default: test

test: env
.env/bin/pytest -x tests
.venv/bin/pytest -x tests

env: .env/.up-to-date
env:
uv venv
uv pip install -e ".[testing,doc]"

doc: env
.env/bin/sphinx-build -a -W -E doc build/sphinx/html

.env/.up-to-date: pyproject.toml
python -m venv .env
.env/bin/pip install -e '.[testing,doc]'
touch $@

.venv/bin/sphinx-build -a -W -E doc build/sphinx/html
2 changes: 2 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Changelog
=========

* :feature:`-` Support python versions: >= 3.8, <= 3.13
* :feature:`-` Use UV in CI
* :feature:`-` Use `pyproject.toml` from package configuration
* :feature:`-` Move CI to GitHub Actions (from Travis CI)
* :feature:`-` Support python version 3.8, 3.9, 3.10, 3.11
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ build-backend = "setuptools.build_meta"
name = "vintage"
description = "Python library for deprecating code"
readme = "README.md"
requires-python = ">=3.7"
requires-python = ">=3.8"
license = { text = "BSD 3-Clause License" }

classifiers = [
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"six",
Expand Down

0 comments on commit d839269

Please sign in to comment.