Skip to content

Commit 5677868

Browse files
authoredApr 16, 2023
Merge pull request #48 from bio-ontology-research-group/inductive
Inductive
2 parents 6fe694d + 20f903c commit 5677868

15 files changed

+36
-29
lines changed
 

‎.github/workflows/python-package_3_8.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Install dependencies
3838
run: |
3939
python -m pip install --upgrade pip
40-
python -m pip install flake8 pytest coverage
40+
python -m pip install flake8 nose pinocchio nose-exclude coverage
4141
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
4242
- name: Lint with flake8
4343
run: |
@@ -47,4 +47,4 @@ jobs:
4747
flake8 mowl --count --exit-zero --max-complexity=20 --max-line-length=127 --statistics
4848
- name: Test with nose
4949
run: |
50-
pytest tests
50+
nosetests tests

‎.github/workflows/python-package_3_9.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Install dependencies
3838
run: |
3939
python -m pip install --upgrade pip
40-
python -m pip install flake8 pytest coverage
40+
python -m pip install flake8 nose pinocchio nose-exclude coverage
4141
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
4242
- name: Lint with flake8
4343
run: |
@@ -47,4 +47,4 @@ jobs:
4747
flake8 mowl --count --exit-zero --max-complexity=20 --max-line-length=127 --statistics
4848
- name: Test with nose
4949
run: |
50-
pytest tests
50+
nosetests tests

‎CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99
### Added
1010
- [BoxSquaredEL](https://arxiv.org/abs/2301.11118) module added to `mowl.nn`
11+
- Implemented `model.from_pretrained` method. Related to issue #43
1112
- Implemented `model.add_axioms` method. Related to issue #43
12-
- Added models `RandomWalkPlusW2VModel`, `GraphPlusPyKEENModel`, `SyntacticPlusW2VModel`
13+
- Added models `RandomWalkPlusW2VModel`, `GraphPlusPyKEENModel`, `SyntacticPlusW2VModel`,
1314

1415
### Changed
1516
- Bug fixed in corpus generation methods. Issue #36.

‎envs/environment_dev_3_8.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ dependencies:
1414
- JPype1
1515
- pandas
1616
- protobuf
17-
- pytest
1817
- pyyaml
1918
- requests
2019
- scipy
@@ -29,8 +28,10 @@ dependencies:
2928
- build
3029
- pykeen>=1.9.*
3130
- sphinx-rtd-theme
32-
- pytest
31+
- nose
32+
- nose-exclude
3333
- coverage
34+
- pinocchio
3435
- flake8
3536
- autopep8
3637
- memory-profiler

‎envs/environment_dev_3_9.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ dependencies:
1414
- JPype1
1515
- pandas
1616
- protobuf
17-
- pytest
1817
- pyyaml
1918
- requests
2019
- scipy
@@ -29,8 +28,10 @@ dependencies:
2928
- build
3029
- pykeen>=1.9.*
3130
- sphinx-rtd-theme
32-
- pytest
31+
- nose
32+
- nose-exclude
3333
- coverage
34+
- pinocchio
3435
- flake8
3536
- autopep8
3637
- memory-profiler

‎test.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
coverage run -m pytest tests && coverage report -m

‎tests/__init__.py

+15-12
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
from mowl.datasets.builtin import FamilyDataset, GDAHumanELDataset, GDAMouseELDataset, \
88
PPIYeastSlimDataset
99

10-
1110
logger = logging.getLogger("Downloader")
1211

13-
14-
def setUpPackage():
12+
def setUpModule():
13+
print("Downloading datasets")
1514
logger.info("Downloading family dataset")
1615
FamilyDataset()
1716
logger.info("Downloading gda_el_human dataset")
@@ -22,12 +21,16 @@ def setUpPackage():
2221
PPIYeastSlimDataset()
2322

2423

25-
# def tearDownPackage():
26-
# os.remove('ppi_yeast_slim.tar.gz')
27-
# os.remove('gda_human_el.tar.gz')
28-
# os.remove('gda_mouse_el.tar.gz')
29-
# os.remove('family.tar.gz')
30-
# shutil.rmtree('ppi_yeast_slim')
31-
# shutil.rmtree('gda_human_el')
32-
# shutil.rmtree('gda_mouse_el')
33-
# shutil.rmtree('family')
24+
def tearDownModule():
25+
os.remove('ppi_yeast_slim.tar.gz')
26+
os.remove('gda_human_el.tar.gz')
27+
os.remove('gda_mouse_el.tar.gz')
28+
os.remove('family.tar.gz')
29+
shutil.rmtree('ppi_yeast_slim')
30+
shutil.rmtree('gda_human_el')
31+
shutil.rmtree('gda_mouse_el')
32+
shutil.rmtree('family')
33+
34+
35+
36+

‎tests/base_models/test_elmodel.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from mowl.base_models.elmodel import EmbeddingELModel
33
from mowl.base_models.model import EmbeddingModel
44
from mowl.datasets import Dataset
5-
from mowl.datasets.builtin import FamilyDataset, PPIYeastSlimDataset
5+
from tests.datasetFactory import FamilyDataset, PPIYeastSlimDataset
66
from mowl.datasets.el import ELDataset
77
from mowl.models import ELEmbeddings
88
import random

‎tests/models/test_elboxembeddings_gda.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from unittest import TestCase
22

3-
from mowl.datasets.builtin import GDAHumanELDataset
3+
from tests.datasetFactory import GDAHumanELDataset
44
from mowl.models.elboxembeddings.examples.model_gda import ELBoxGDA
55

66

‎tests/models/test_elboxembeddings_ppi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from unittest import TestCase
22

3-
from mowl.datasets.builtin import PPIYeastSlimDataset
3+
from tests.datasetFactory import PPIYeastSlimDataset
44
from mowl.models.elboxembeddings.examples.model_ppi import ELBoxPPI
55

66

‎tests/models/test_elembeddings_gda.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from unittest import TestCase
22

3-
from mowl.datasets.builtin import GDAHumanELDataset
3+
from tests.datasetFactory import GDAHumanELDataset
44
from mowl.models.elembeddings.examples.model_gda import ELEmGDA
55

66

‎tests/models/test_elembeddings_ppi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from unittest import TestCase
22

3-
from mowl.datasets.builtin import PPIYeastSlimDataset
3+
from tests.datasetFactory import PPIYeastSlimDataset
44
from mowl.models.elembeddings.examples.model_ppi import ELEmPPI
55

66

‎tests/models/test_falcon_ppi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from unittest import TestCase
22

3-
from mowl.datasets.builtin import PPIYeastSlimDataset
3+
from tests.datasetFactory import PPIYeastSlimDataset
44
from mowl.models.falcon.examples.model_ppi import FALCON
55
from mowl.datasets import Dataset
66
from mowl.owlapi import OWLAPIAdapter

‎tests/ontology/test_normalize.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from unittest import TestCase
22
from mowl.ontology.normalize import ELNormalizer, GCI, GCI0, GCI1, GCI2, GCI3, GCI0_BOT, \
33
GCI1_BOT, GCI3_BOT, process_axiom
4-
from mowl.datasets.builtin import FamilyDataset
4+
from tests.datasetFactory import FamilyDataset
55
from mowl.owlapi import OWLAPIAdapter
66
from mowl.owlapi.defaults import BOT
77

‎tests/projection/test_owl2vec.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from unittest import TestCase
44
from mowl.owlapi.defaults import TOP
55
from mowl.owlapi import OWLAPIAdapter
6-
from mowl.datasets.builtin import FamilyDataset
6+
from tests.datasetFactory import FamilyDataset
77
from org.semanticweb.owlapi.model import IRI
88

99
import jpype.imports

0 commit comments

Comments
 (0)
Please sign in to comment.