From 32dfe35fbb938cf0a8683abf2130a7af611f9b84 Mon Sep 17 00:00:00 2001 From: zethson Date: Tue, 1 Oct 2024 16:33:14 +0200 Subject: [PATCH] Add pronto CI Signed-off-by: zethson --- .github/workflows/qc.yml | 37 +++++++++++++++++++++++-------------- .travis.yml | 19 ------------------- 2 files changed, 23 insertions(+), 33 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/qc.yml b/.github/workflows/qc.yml index 5b40b678..119d8d2e 100644 --- a/.github/workflows/qc.yml +++ b/.github/workflows/qc.yml @@ -1,33 +1,42 @@ -# Basic ODK workflow - name: CI - -# Controls when the action will run. on: - # Triggers the workflow on push or pull request events but only for the main branch push: branches: [ master ] pull_request: branches: [ master ] - - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "ontology_qc" ontology_qc: - # The type of runner that the job will run on runs-on: ubuntu-latest container: obolibrary/odkfull:v1.5.1 - - # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v4 - - name: Run ontology QC checks env: DEFAULT_BRANCH: master run: cd src/ontology && make ROBOT_ENV='ROBOT_JAVA_ARGS=-Xmx6G' ROBOT_JAVA_ARGS=-Xmx6g gh_actions + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install Pronto + run: pip install pronto + - name: Run Pronto sanity checks + run: | + python -c " + import pronto + + # Load the ontologies + efo_base = pronto.Ontology('efo-base.owl') + efo_edit = pronto.Ontology('src/ontology/efo-edit.owl') + + print(f'Number of terms: {len(efo_base.terms())}') + print(f'Ontology IRI: {efo_base.metadata.ontology_iri}') + + print(f'Number of terms: {len(efo_edit.terms())}') + print(f'Ontology IRI: {efo_edit.metadata.ontology_iri}') + " \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0eb48680..00000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: java -dist: trusty -jdk: -- oraclejdk8 -env: - - ROBOT_JAVA_ARGS=-Xmx8g -script: - - cd src/ontology - - ./get_mirrors.sh - - make all -branches: - only: - - master - - test-travis -notifications: - email: - - spot-ontodev@ebi.ac.uk - slack: - secure: BOmhSceiQHH63VJkMdhj++sQ567EB9Uy1mDFk+4SyUsJ4gf9dfFSZP+0PQjWeTxemN3tJlid+pwt/Qc7VtEwEBjoX2cx3PqwVMgK0ZrtTQTeyEy0UfnqMFCv0pbb/jwQ3V6D9/ryAkf9Q5VPr3W7sLF+c4CUxENP1f47xHFnlLejGR6lXLh1zWnJ444S8lx6KLHoJ5qTotHp88rCqphq7RrPnECE4Ni9TFIuG2UXDOq23AGGpBASJTcsiyO7vsWUYDsxzEXzHLZqGI0eahN8/ybNerv+TbxqGmkIbRbeo5/gjFQaOM62un6VAza2rxOY9UQa9+BIRKzKqqcvy8ondsLrWZGXjgUFO6GHzGWYWvNJNtdu+WlFnMjEtBy1zldPXpinQ0fOyKwYvnTvzqMrj1oZca8zqEw7GPW/rAYiECql2ZYnL7KpAzfd5QnCp/KnXNZbOcCwZlZtu9yDOE/Zc2EcpR5QJbwMTytqlo263Km2F+1YUzMoC+w8fpNA0rb070SXg+RkE5wAqw1KxZBi8FQ6otEQsFAPuHGuFF8jyhunJAoXt5jpndWz3pLUundX65Cr3w9byrUYodBtJOOSCvoCJ21A4k9ruk2ax7LPwIQ0itQZsTIQwFS3CNpTjxyCvhXHOp4EHaHpILeMAdCeJOE7weP7VghOtlUt4+zKoYg=