Repository navigation
Deduplicate quality_funcs f1/acc against metrics.py #2611
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Python package | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| services: | |
| fuseki: | |
| image: stain/jena-fuseki | |
| ports: | |
| - 3030:3030 | |
| options: >- | |
| --health-cmd "curl --silent --fail http://localhost:3030 || exit 1" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| env: | |
| ADMIN_PASSWORD: admin | |
| strategy: | |
| matrix: | |
| python-version: ["3.11.14"] | |
| max-parallel: 5 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip3 install -e .["full"] | |
| - name: Lint with ruff | |
| run: | | |
| ruff check ontolearn/learners --exclude ontolearn/learners/spell_kit --line-length=200 | |
| - name: Get external files | |
| run: | | |
| wget https://files.dice-research.org/projects/Ontolearn/KGs.zip | |
| wget https://files.dice-research.org/projects/Ontolearn/LPs.zip | |
| wget https://files.dice-research.org/projects/Ontolearn/CLIP/CLIPData.zip | |
| wget https://files.dice-research.org/projects/NCES/NCES_Ontolearn_Data/NCESData.zip | |
| unzip KGs.zip && unzip LPs.zip && unzip NCESData.zip && unzip CLIPData.zip | |
| - name: Wait for Fuseki to start | |
| run: | | |
| echo "Waiting for Fuseki to be ready..." | |
| until curl -s http://localhost:3030; do | |
| sleep 2 | |
| done | |
| echo "Fuseki is up!" | |
| - name: Create dataset (mutagenesis) | |
| run: | | |
| curl -X POST http://localhost:3030/$/datasets \ | |
| --user admin:admin \ | |
| --header "Content-Type: application/x-www-form-urlencoded" \ | |
| --data "dbName=mutagenesis&dbType=tdb" | |
| - name: Load OWL data into Fuseki | |
| run: | | |
| curl -X PUT -H "Content-Type: application/rdf+xml" \ | |
| --data-binary @KGs/Mutagenesis/mutagenesis.owl \ | |
| http://localhost:3030/mutagenesis/data \ | |
| --user admin:admin | |
| - name: Testing and coverage report | |
| run: | | |
| pip install coverage | |
| coverage run -m pytest -p no:warnings -x --durations=0 | |
| coverage report -m |