Skip to content

Update mkdocstrings[python-legacy] requirement from ~=0.25.2 to ~=0.26.1 #2247

Update mkdocstrings[python-legacy] requirement from ~=0.25.2 to ~=0.26.1

Update mkdocstrings[python-legacy] requirement from ~=0.25.2 to ~=0.26.1 #2247

Workflow file for this run

name: CI Tests
on:
pull_request:
push:
branches:
- master
- 'push-action/**'
jobs:
tests:
name: External
uses: SINTEF/ci-cd/.github/workflows/ci_tests.yml@v2.8.2
with:
# General
install_extras: "[dev,docs]"
# pre-commit
run_pre-commit: true
python_version_pre-commit: "3.9"
skip_pre-commit_hooks: pylint
# pylint
run_pylint: true
python_version_pylint_safety: "3.9"
pylint_options: "--rcfile=pyproject.toml"
pylint_targets: "*.py tools emmopy ontopy"
# safety-specific settings
run_safety: true
# 48547: RDFLib vulnerability: https://pyup.io/vulnerabilities/PVE-2022-48547/48547/
# 44715-44717: NumPy vulnerabilities:
# https://pyup.io/vulnerabilities/CVE-2021-41495/44715/
# https://pyup.io/vulnerabilities/CVE-2021-41496/44716/
# https://pyup.io/vulnerabilities/CVE-2021-34141/44717/
# 70612: Jinja2 vulnerability. Only used as subdependency for mkdocs++ in tripper.
# https://data.safetycli.com/v/70612/97c/
safety_options: |
--ignore=48547
--ignore=44715
--ignore=44716
--ignore=44717
--ignore=70612
# Build distribution
run_build_package: true
python_version_package: "3.9"
build_cmd: "python -m build"
# Build documentation
# Exclude base classes in emmopy.emmocheck
run_build_docs: true
python_version_docs: "3.9"
update_python_api_ref: true
update_docs_landing_page: true
package_dirs: |
emmopy
ontopy
special_file_api_ref_options: "emmopy/emmocheck.py,show_bases: false"
landing_page_replacements: |
(LICENSE.txt),(LICENSE.md)
(tools),(../tools)
pytest:
name: pytest
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y graphviz openjdk-11-jre-headless
- name: Install Python dependencies (and EMMOntoPy)
run: |
python -m pip install --upgrade pip
pip install -U setuptools wheel
pip install -U -e .[dev]
- name: Test
run: pytest -vvv --cov=ontopy --cov=emmopy --cov-report=xml --cov-report=term --doctest-modules
- name: Upload coverage to Codecov
if: matrix.python-version == '3.9' && github.repository == 'emmo-repo/EMMOntoPy'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
# - name: Run vertical demo
# run: |
# cd demo/vertical
# python define_ontology.py
# python plot_ontology.py
# cd -
# - name: Run horizontal demo
# run: |
# cd demo/horizontal
# python step1_generate_metadata.py
# python step2_define_metadata.py
# python step3_instantiate.py
# python step4_map_instance.py
# cd -
ontodoc:
name: EMMO documentation (test using ontodoc)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Check Ubuntu version we are running under
run: |
uname -a
sudo apt-get update
- name: Current environment
run: env
- name: Install pandoc 2.1.2
run: |
#sudo apt-get install -y pandoc
wget https://github.com/jgm/pandoc/releases/download/2.1.2/pandoc-2.1.2-1-amd64.deb
sudo apt-get install -y ./pandoc-2.1.2-1-amd64.deb
- name: Install tzdata non-interactively
run: |
sudo ln -fs /usr/share/zoneinfo/Europe/Oslo /etc/localtime
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends tzdata
sudo dpkg-reconfigure --frontend noninteractive tzdata
- name: Install other dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
sudo apt-get update
sudo apt-get install -y graphviz
sudo apt-get install -y texlive-xetex
sudo apt-get install -y texlive-latex-extra
- name: Install EMMOntoPy
run: |
python setup.py install
- name: Create EMMO documentation
run: |
cd examples/emmodoc
python ../../tools/ontodoc -f simple-html emmo-inferred emmo-simple.html
python ../../tools/ontodoc -t emmo.md -p no-self-contained emmo-inferred emmo.html
# pdf generation is commented out as there is a xetex error which
# needs to be resolved if we decide to keep ontodoc as a tool.
# python ../../tools/ontodoc -t emmo.md emmo-inferred emmo.pdf
cd -