From 3b259559862a8e8a0f688031b09a9af42ce2871d Mon Sep 17 00:00:00 2001 From: Evan Morris Date: Thu, 7 Dec 2023 16:03:31 -0500 Subject: [PATCH 1/4] adding new bl version --- .github/workflows/pypi.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index c051f4e..181fbd9 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -40,6 +40,7 @@ jobs: - 'v3.0.2' - 'v3.0.3' - 'v3.1.0' + - 'v3.6.0' steps: - uses: actions/checkout@master - name: Set up Python 3.9 From 4b68c0e8c62af669bc85921310b74b55edcbe398 Mon Sep 17 00:00:00 2001 From: Evan Morris Date: Tue, 12 Dec 2023 14:30:15 -0500 Subject: [PATCH 2/4] updating versions for dependencies and github workflows, adding new bmt version, in setup updating bmt-lite version and github repo url --- .github/workflows/pypi.yml | 39 +++++++++++++++++++------------------- requirements-build.txt | 7 ++++--- requirements-test.txt | 4 ++-- setup.py | 6 +++--- 4 files changed, 29 insertions(+), 27 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 181fbd9..389d585 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -5,7 +5,7 @@ on: push jobs: build-n-publish: name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 strategy: matrix: bmt_version: @@ -24,34 +24,35 @@ jobs: # - '2.2.3' # - '2.2.4' # - '2.2.5' - - 'v2.3.0' - - 'v2.3.1' - - 'v2.4.0' - - 'v2.4.1' - - 'v2.4.2' - - 'v2.4.3' -# - 'v.2.4.4' Bad tag - - 'v2.4.5' - - 'v2.4.6' - - 'v2.4.7' - - 'v2.4.8' - - 'v3.0.0' - - 'v3.0.1' - - 'v3.0.2' - - 'v3.0.3' - - 'v3.1.0' + # the following ones should work but aren't really needed so commenting out for now +# - 'v2.3.0' +# - 'v2.3.1' +# - 'v2.4.0' +# - 'v2.4.1' +# - 'v2.4.2' +# - 'v2.4.3' +# - 'v2.4.5' +# - 'v2.4.6' +# - 'v2.4.7' +# - 'v2.4.8' +# - 'v3.0.0' +# - 'v3.0.1' +# - 'v3.0.2' +# - 'v3.0.3' +# - 'v3.1.0' - 'v3.6.0' +# - 'v4.0.0' steps: - uses: actions/checkout@master - name: Set up Python 3.9 - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: 3.9 - name: Install setuptools and wheel run: >- python -m pip install - -rrequirements-build.txt + -r requirements-build.txt --user - name: Build a binary wheel and a source tarball run: >- diff --git a/requirements-build.txt b/requirements-build.txt index 1448ed7..f7b1cf4 100644 --- a/requirements-build.txt +++ b/requirements-build.txt @@ -1,3 +1,4 @@ -bmt==0.8.12 -httpx==0.18.2 -wheel==0.36.2 +bmt==1.1.3 +httpx==0.25.2 +wheel==0.42.0 +pyyaml==6.0.1 \ No newline at end of file diff --git a/requirements-test.txt b/requirements-test.txt index 508477f..25dd521 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,2 +1,2 @@ -pytest==6.2.4 -tox==3.23.1 +pytest==7.4.3 +tox==4.11.4 diff --git a/setup.py b/setup.py index ec02463..f6d6b31 100644 --- a/setup.py +++ b/setup.py @@ -291,10 +291,10 @@ def build(version: str): setup( name=f"bmt-lite-{version}", - version="2.2.2", + version="2.3.0", author="Patrick Wang", author_email="patrick@covar.com", - url="https://github.com/patrickkwang/bmt-lite", + url="https://github.com/TranslatorSRI/bmt-lite", description="A zero-dependency near-clone of common bmt capabilities", long_description=long_description, long_description_content_type="text/markdown", @@ -304,5 +304,5 @@ def build(version: str): install_requires=[], zip_safe=False, license="MIT", - python_requires=">=3.7", + python_requires=">=3.9", ) From 3af9df4fbc2f1ea60ea0f78fa4a02e4e72e95f07 Mon Sep 17 00:00:00 2001 From: Evan Morris Date: Tue, 12 Dec 2023 15:22:24 -0500 Subject: [PATCH 3/4] trying to fix bug introduced by bmt/linkml changes to annotations --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f6d6b31..f918598 100644 --- a/setup.py +++ b/setup.py @@ -261,7 +261,7 @@ def build(version: str): "symmetric": el.symmetric, "inverse": el.inverse, "annotations": { - tag: annotation.value.lower() == "true" + tag: annotation.value is True for tag, annotation in el.annotations.items() }, "slot_uri": el.slot_uri, From 1aaf1edd2b97b5ac32ae857a0325278f9bba324a Mon Sep 17 00:00:00 2001 From: Evan Morris Date: Tue, 12 Dec 2023 19:15:23 -0500 Subject: [PATCH 4/4] fixing mutable default argument bug --- bmt/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bmt/__init__.py b/bmt/__init__.py index 17914a1..5a4d976 100644 --- a/bmt/__init__.py +++ b/bmt/__init__.py @@ -190,7 +190,7 @@ def __init__( name: str, symmetric: bool = False, inverse: Optional[str] = None, - annotations: Dict[str, bool] = dict(), + annotations: Dict[str, bool] = None, slot_uri: Optional[str] = None, range: Optional[str] = None, **kwargs, @@ -199,7 +199,7 @@ def __init__( super().__init__(name) self.symmetric: bool = symmetric self.inverse: Optional[str] = inverse - self.annotations: Dict[str, bool] = annotations + self.annotations: Dict[str, bool] = annotations if annotations else dict() self.slot_uri: Optional[str] = slot_uri self.range: Optional[str] = range