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
68 changes: 67 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]

steps:
- uses: actions/checkout@v5
Expand Down Expand Up @@ -36,3 +36,69 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov

format:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install black
run: |
python -m pip install --upgrade pip
pip install "black~=26.0"
- name: Check formatting with black
run: |
black --check --diff .

docs:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
# same version as the ReadTheDocs build (.readthedocs.yaml)
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[docs]"
- name: Build documentation, treating warnings as errors
run: |
sphinx-build -W --keep-going -b html doc doc/_build/html

package:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Build wheel
run: |
python -m pip install --upgrade pip build
python -m build --wheel --outdir dist .
- name: Install wheel in a clean environment
run: |
python -m venv "$RUNNER_TEMP/wheelenv"
"$RUNNER_TEMP/wheelenv/bin/pip" install dist/*.whl
- name: Import every module from the installed wheel
# run outside the checkout, in isolated mode, so that the source tree cannot be imported
working-directory: ${{ runner.temp }}
run: |
"$RUNNER_TEMP/wheelenv/bin/python" -I -c '
import importlib, pkgutil, fairgraph
print(fairgraph.__file__, fairgraph.__version__)
for m in pkgutil.walk_packages(fairgraph.__path__, "fairgraph."):
importlib.import_module(m.name)
'
9 changes: 9 additions & 0 deletions doc/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ Coding standards and style
All code should conform as much as possible to `PEP 8`_.
We use black_ to auto-format the code, with a line length of 119 characters.
Please run ``black`` before making a commit.
Continuous integration checks the formatting with::

$ black --check .

As a basic check of code quality, run::

Expand Down Expand Up @@ -231,6 +234,12 @@ To build the documentation::

Then open `_build/html/index.html` in your browser.

Continuous integration builds the documentation with warnings treated as errors,
so before submitting changes, check that the following runs without warnings::

$ cd doc
$ sphinx-build -W --keep-going -b html . _build/html

Committing your changes
-----------------------

Expand Down
3 changes: 3 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ New features
Changes in behaviour
--------------------

- fairgraph now requires Python 3.10 or later, as Python 3.9 has reached end of life.
It is tested with Python 3.10 to 3.15.

- Leading and trailing whitespace is now removed from text properties before they are saved
Text loaded from the Knowledge Graph is left as it is until saved, so saving a fetched object corrects
any untrimmed text that is stored.
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ readme = "README.md"
authors = [
{ name="Andrew P. Davison", email="andrew.davison@cnrs.fr" }
]
requires-python = ">=3.9"
requires-python = ">=3.10"
license = "Apache-2.0"
classifiers = [
"Development Status :: 4 - Beta",
Expand Down Expand Up @@ -60,4 +60,4 @@ include = ["fairgraph*"]

[tool.black]
line-length = 119
target-version = ["py39"]
target-version = ["py310"]
Loading