diff --git a/CHANGELOG.md b/CHANGELOG.md index fba4fa2..5eb6ccb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ ## Changelog +### V1.5.1 Changelog (September 7, 2025) +- Update dependencies. +- Make versioning standardized. +- Minor fix to the readme. +- Add bash script for requirement update based on pyproject.toml + ### V1.5.0 Changelog (July 29, 2025) - Added 17 Knowledge Graph Embedding (KGE) aligner models. - Major documentation update: improved structure, clarity, sectioning, etc. diff --git a/CITATION.cff b/CITATION.cff index 07413fc..320d1a1 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -17,5 +17,5 @@ keywords: - "Alignment" - "Python Library" license: "Apache-2.0" -version: "1.5.0" +version: "1.5.1" date-released: "2025-07-29" diff --git a/README.md b/README.md index f51fc0e..ae992ce 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,14 @@ git clone git@github.com:sciknoworg/OntoAligner.git pip install ./ontoaligner ``` +Next, verify the installation: + +```python +import ontoaligner + +print(ontoaligner.__version__) +``` + ## 📚 Documentation Comprehensive documentation for OntoAligner, including detailed guides and examples, is available at **[ontoaligner.readthedocs.io](https://ontoaligner.readthedocs.io/)**. Below are some key tutorials with links to both the documentation and the corresponding example codes. diff --git a/ontoaligner/VERSION b/ontoaligner/VERSION new file mode 100644 index 0000000..26ca594 --- /dev/null +++ b/ontoaligner/VERSION @@ -0,0 +1 @@ +1.5.1 diff --git a/ontoaligner/__init__.py b/ontoaligner/__init__.py index 96d006d..eb10ec6 100644 --- a/ontoaligner/__init__.py +++ b/ontoaligner/__init__.py @@ -11,7 +11,10 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.5.0" +from pathlib import Path + +# Load version from VERSION file +__version__ = (Path(__file__).parent / "VERSION").read_text().strip() from .pipeline import OntoAlignerPipeline from ontoaligner import ontology, base, encoder, aligner, utils, postprocess diff --git a/pyproject.toml b/pyproject.toml index 6b97a04..cfa2168 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "OntoAligner" -version = "1.5.0" +version = "0.0.0" description = "OntoAligner: A Comprehensive Modular and Robust Python Toolkit for Ontology Alignment." authors = ["Hamed Babaei Giglou "] license="Apache-2.0" @@ -10,7 +10,7 @@ repository = "https://github.com/sciknoworg/OntoAligner/" include = ["images/logo-with-background.png"] [tool.poetry.dependencies] -python = ">=3.10,<4.0.0" +python = ">=3.10,<3.14" pathlib = "*" argparse = "*" numpy = "*" @@ -20,14 +20,14 @@ scikit-learn = "*" tqdm = "*" owlready2 = "0.44" rdflib = "7.1.1" -torch = "2.6.0" +torch = "^2.8.0" transformers = "4.50.0" rapidfuzz = "3.5.2" openai = "1.56.0" rank_bm25 = "0.2.2" -huggingface_hub="0.28.1" -sentence-transformers = "4.1.0" -bitsandbytes="0.45.1" +huggingface-hub = "^0.34.4" +sentence-transformers = "^5.1.0" +bitsandbytes="^0.45.1" pykeen="1.11.1" [tool.poetry.dev-dependencies] @@ -38,6 +38,12 @@ wheel = "*" twine = "*" pytest = "*" +[tool.poetry-dynamic-versioning] +enable = true +style = "semver" +source = "attr" +attr = "ontoaligner.__version__" + [build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" +requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.4.0"] +build-backend = "poetry_dynamic_versioning.backend" diff --git a/requirements.sh b/requirements.sh new file mode 100755 index 0000000..1321363 --- /dev/null +++ b/requirements.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash + +set -e + +if [ ! -f pyproject.toml ]; then + echo "pyproject.toml not found!" + exit 1 +fi + +echo "Generating clean requirements.txt with direct dependencies..." + +> requirements.txt + +awk ' +/^\[tool\.poetry\.dependencies\]/ {section="deps"; next} +/^\[tool\.poetry\.dev-dependencies\]/ {section="dev"; next} +/^\[/ {section=""; next} + +section!="" && NF>0 { + if ($1 ~ /^python/) next + + gsub(/"/, "", $0) + gsub(/ /, "", $0) + + split($0, a, "=") + pkg=a[1] + ver=a[2] + + # Leave hyphens as-is (do not convert to underscores) + + if(ver=="" || ver=="*") { + print pkg + } else { + # Remove ^ or ~ for pip-friendly pin + gsub(/\^|~/, "", ver) + # Add == only if not already present + if(index(ver, "==")==0) { + print pkg "==" ver + } else { + print pkg ver + } + } +}' pyproject.toml > requirements.txt + +echo "Done! requirements.txt created." diff --git a/requirements.txt b/requirements.txt index 8c3871c..16ccb27 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,21 +3,22 @@ argparse numpy pandas datasets -scikit_learn -openai==1.56.0 +scikit-learn +tqdm owlready2==0.44 -rank_bm25==0.2.2 -rapidfuzz==3.5.2 rdflib==7.1.1 -sentence_transformers==4.1.0 -torch==2.6.0 -tqdm +torch==2.8.0 transformers==4.50.0 -huggingface_hub==0.28.1 +rapidfuzz==3.5.2 +openai==1.56.0 +rank_bm25==0.2.2 +huggingface-hub==0.34.4 +sentence-transformers==5.1.0 bitsandbytes==0.45.1 +pykeen==1.11.1 +ruff pre-commit setuptools wheel twine -ruff -pykeen==1.11.1 +pytest diff --git a/setup.py b/setup.py index 35a7dc1..6473544 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,12 @@ from setuptools import setup, find_packages +import os with open("README.md", encoding="utf-8") as f: long_description = f.read() setup( name="OntoAligner", - version="1.5.0", + version=open(os.path.join(os.path.dirname(__file__), 'ontoaligner/VERSION')).read().strip(), author="Hamed Babaei Giglou", author_email="hamedbabaeigiglou@gmail.com", description="OntoAligner: A Comprehensive Modular and Robust Python Toolkit for Ontology Alignment", @@ -26,11 +27,11 @@ "rank_bm25==0.2.2", "rapidfuzz==3.5.2", "rdflib==7.1.1", - "sentence-transformers==4.1.0", - "torch==2.6.0", - "transformers==4.50.0", - "huggingface_hub==0.28.1", - "bitsandbytes==0.45.1", + "sentence-transformers>=5.1.0,<6.0.0", + "torch>=2.8.0,<3.0.0", + "transformers>=4.56.0,<5.0.0", + "huggingface-hub>=0.34.4,<1.0.0", + "bitsandbytes>=0.45.1,<1.0.0", "pykeen==1.11.1" ], classifiers=[