Skip to content

Commit

Permalink
Update project
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Oct 22, 2024
1 parent e3e7139 commit a2f75bc
Show file tree
Hide file tree
Showing 165 changed files with 1,775 additions and 1,625 deletions.
32 changes: 0 additions & 32 deletions .bumpversion.cfg

This file was deleted.

80 changes: 40 additions & 40 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# This file configures the continuous integration (CI) system on GitHub.
# Introductory materials can be found here: https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions.
# Documentation for editing this file can be found here: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions

name: Tests

on:
Expand All @@ -8,71 +12,67 @@ on:

jobs:
lint:
name: Lint
name: Code Quality
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.9", "3.12" ]
python-version: [ "3.12", "3.9" ]
tox-command: ["manifest", "lint", "pyroma", "mypy"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: "Install uv"
uses: "astral-sh/setup-uv@v3"
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- name: "Run command"
run: |
sudo apt-get install graphviz
pip install tox
- name: Check manifest
run: tox -e manifest
- name: Check code quality with flake8
run: tox -e flake8
- name: Check package metadata with Pyroma
run: tox -e pyroma
- name: Check static typing with MyPy
run: tox -e mypy
uvx -p ${{ matrix.python-version }} --with tox-uv tox -e ${{ matrix.tox-command }}
docs:
name: Documentation
runs-on: ubuntu-latest
strategy:
matrix:
# We only test documentation on the latest version
# sphinx 8.0 / sphinx-rtd-theme 3.0 discontinued Python 3.9 support
# a year early, which prompted re-thinking about this.
python-version: [ "3.12" ]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: "Install uv"
uses: "astral-sh/setup-uv@v3"
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- name: Install dependencies
run: |
sudo apt-get install graphviz
pip install tox tox-uv
- name: Check RST conformity with doc8
run: tox -e doc8
- name: Check README.rst
run: tox -e doc8
run: uvx -p ${{ matrix.python-version }} --with tox-uv tox -e doc8
- name: Check docstring coverage
run: uvx -p ${{ matrix.python-version }} --with tox-uv tox -e docstr-coverage
- name: Check documentation build with Sphinx
run: tox -e docs-test
run: uvx -p ${{ matrix.python-version }} --with tox-uv tox -e docs-test
tests:
name: Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.9", "3.12" ]
exclude:
- os: windows-latest
python-version: 3.9
python-version: [ "3.12", "3.9" ]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: "Install uv"
uses: "astral-sh/setup-uv@v3"
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get install graphviz
pip install tox tox-uv
- name: Test with pytest
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- name: Test with pytest and generate coverage file
run:
tox -e py
uvx -p ${{ matrix.python-version }} --with tox-uv tox -e py
- name: Upload coverage report to codecov
uses: codecov/codecov-action@v4
if: success()
with:
file: coverage.xml
13 changes: 9 additions & 4 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
# See: https://docs.readthedocs.io/en/latest/config-file/v2.html
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

# Set the version of Python and other tools you might need
build:
image: latest
os: ubuntu-22.04
apt_packages:
- graphviz
tools:
python: "3.12"

python:
version: "3.8"
install:
- method: pip
path: .
extra_requirements:
- docs
- rdflib
15 changes: 6 additions & 9 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
graft src
graft tests
prune benchmarking
prune scripts
prune notebooks
prune tests/.pytest_cache
prune docs/source/api
prune docs

recursive-include docs/source *.py
recursive-include docs/source *.rst
recursive-include docs/source *.png
global-exclude *.py[cod] __pycache__ *.so *.dylib .DS_Store *.gpickle .idea/**

global-exclude *.py[cod] __pycache__ *.so *.dylib .DS_Store *.gpickle

exclude .bumpversion.cfg Dockerfile docker-compose.yml
include *.rst *.yml LICENSE tox.ini
include README.md LICENSE
exclude tox.ini .readthedocs.yml
Loading

0 comments on commit a2f75bc

Please sign in to comment.