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
22 changes: 11 additions & 11 deletions .github/workflows/ci-cd-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@ jobs:
name: Build doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Install package with optional dependency 'doc'
run: |
python -m pip install --upgrade pip
pip install .[doc]
python-version-file: .python-version
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install package with extra 'doc'
run: uv sync --extra doc --dev
- name: Run MkDocs build
working-directory: ./docs
run: mkdocs build
run: uv run mkdocs build
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v4
with:
path: "docs/site/"
path: docs/site/
publish:
if: success() && startsWith(github.ref, 'refs/tags')
name: Publish doc
Expand Down
34 changes: 20 additions & 14 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,32 @@ jobs:
pre-commit:
name: Apply pre-commit hooks
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Set up Python version
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Install extra dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev,test]
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install package with extra 'test'
run: uv sync --extra test --dev
- name: Cache pre-commit hooks
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-precommit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit hooks
run: pre-commit run --all-files
run: uv run pre-commit run --all-files
publish:
needs: pre-commit
if: success() && startsWith(github.ref, 'refs/tags')
Expand All @@ -45,14 +53,12 @@ jobs:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Set up Python version
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.x'
python-version-file: .python-version
- name: Build package
run: |
python -m pip install --upgrade build
python -m build
run: uv build
- name: Upload package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ profile_default/
ipython_config.py

# pyenv
.python-version
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
Expand Down Expand Up @@ -140,3 +140,6 @@ dmypy.json

# OS
.DS_Store

# uv
uv.lock
14 changes: 9 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-ast
- id: check-byte-order-marker
- id: fix-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-json
Expand All @@ -25,14 +25,18 @@ repos:
exclude: ^(docs/)
- id: check-added-large-files
args: [--maxkb=500]
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.8.23
hooks:
- id: uv-lock
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.1
rev: v0.13.3
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.16.1
rev: v1.18.2
hooks:
- id: mypy
args: [--config-file=pyproject.toml]
Expand All @@ -44,7 +48,7 @@ repos:
# hooks:
# - id: gitleaks
- repo: https://github.com/pypa/pip-audit
rev: v2.8.0
rev: v2.9.0
hooks:
- id: pip-audit
args: [.]
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.10.4 - October, 2025

### Maintenance

* Use [uv](https://docs.astral.sh/uv/) in CI/CD (`uv.lock` voluntarily in `.gitignore`).

## 0.10.3 - July, 2025

### Fixes
Expand Down
17 changes: 12 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"

[project]
name = "arta"
version = "0.10.3"
requires-python = ">3.8.0"
version = "0.10.4"
requires-python = ">=3.9"
description = "A Python Rules Engine - Make rule handling simple"
readme = "README.md"
license = {text = "Apache-2.0"}
Expand Down Expand Up @@ -43,11 +43,18 @@ Documentation = "https://maif.github.io/arta/home/"
Repository = "https://github.com/MAIF/arta"

[project.optional-dependencies]
all = ["arta[test,dev,doc]"]
test = ["pytest", "tox", "pytest-cov"]
dev = ["mypy", "pre-commit", "ruff"]
all = ["arta[test,doc]"]
test = ["pytest", "pytest-cov", "tox", "tox-uv"]
doc = ["mkdocs-material", "mkdocstrings[python]"]

[dependency-groups]
dev = [
"pre-commit",
"pre-commit-uv",
"mypy",
"ruff",
]

[tool.setuptools]
package-dir = {"" = "src"}

Expand Down