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 023bef6 commit d1ebe2f
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 29 deletions.
44 changes: 25 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,37 @@ 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
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: "3.11"
- 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: Building docs
run: |
python -m venv .env
.env/bin/pip install -U setuptools pip
.env/bin/pip install '.[doc]'
.env/bin/sphinx-build -a -W -E doc build/sphinx/html
uv venv --python 3.11
uv pip install ".[doc]"
.venv/bin/sphinx-build -a -W -E doc build/sphinx/html
12 changes: 4 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
default: test

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

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


env: .env/.up-to-date

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

uv venv
uv pip install -e ".[testing,doc]"
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:`-` Update python versions >=3.8, <=3.13
* :feature:`-` Use UV in CI
* :feature:`-` Add python3.12 to supported versions
* :feature:`-` Remove usage of deprecated `pkg_resources` API
* :feature:`-` Use GitHub actions (instead of Travis CI)
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ build-backend = "hatchling.build"
name = "flux"
description = "Artificial time library"
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 = [
]
Expand Down

0 comments on commit d1ebe2f

Please sign in to comment.