From 0c4ee766bb14ca427544b4b04c7fc6da45d27ce1 Mon Sep 17 00:00:00 2001 From: David Linke Date: Wed, 29 Jan 2025 18:08:19 +0100 Subject: [PATCH 01/12] Update pyproject.toml to poetry 2.0 / PEP 621 --- pyproject.toml | 84 ++++++++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 40 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b50cba65..c3072e79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,23 +1,23 @@ -[tool.poetry] +[build-system] +requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"] +build-backend = "poetry_dynamic_versioning.backend" + +[project] name = "linkml-runtime" -version = "0.0.0" description = "Runtime environment for LinkML, the Linked open data modeling language" authors = [ - "Chris Mungall ", - "Harold Solbrig ", - "Sierra Moxon ", - "Bill Duncan ", - "Harshad Hegde " + {name = "Chris Mungall", email = "cjmungall@lbl.gov"}, + {name = "Harold Solbrig", email = "solbrig@jhu.edu"}, + {name = "Sierra Moxon", email = "smoxon@lbl.gov"}, + {name = "Bill Duncan", email = "wdduncan@gmail.com"}, + {name = "Harshad Hegde", email = "hhegde@lbl.gov"}, ] - -readme = "README.md" - +license = {text = "LICENSE"} homepage = "https://github.com/linkml/linkml-runtime" repository = "https://github.com/linkml/linkml-runtime" documentation = "https://github.com/linkml/linkml-runtime" - +readme = "README.md" keywords = ["linkml", "metamodel", "schema visualization", "rdf", "owl", "yaml"] - classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Console", @@ -32,40 +32,44 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", ] - -packages = [ - { include = "linkml_runtime" } +include = ["linkml_runtime"] +requires-python = ">=3.8" +dynamic = ["version", "readme"] +dependencies = [ + "click", + "deprecated", + "hbreader", + "json-flattener >=0.1.9", + "jsonasobj2 ==1.*,>=1.0.0,>=1.0.4", + "jsonschema >=3.2.0", + "prefixcommons >=0.1.12", + "pyyaml", + "rdflib >=6.0.0", + "requests", + "prefixmaps >=0.1.4", + "curies >=0.5.4", + "pydantic >=1.10.2, <3.0.0", ] -[tool.poetry-dynamic-versioning] -enable = true -vcs = "git" -style = "pep440" - -[tool.poetry.scripts] +[project.scripts] comparefiles = "linkml_runtime.utils.comparefiles:cli" linkml-normalize = "linkml_runtime.processing.referencevalidator:cli" +[tool.poetry] +requires-poetry = ">=2.0" +version = "0.0.0" + [tool.poetry.dependencies] -python = "^3.8" -click = "*" -deprecated = "*" -hbreader = "*" -json-flattener = ">=0.1.9" -jsonasobj2 = "==1.*,>=1.0.0,>=1.0.4" -jsonschema = ">=3.2.0" -prefixcommons = ">=0.1.12" -pyyaml = "*" -rdflib = ">=6.0.0" -requests = "*" -prefixmaps = ">=0.1.4" -curies = ">=0.5.4" -pydantic = ">=1.10.2, <3.0.0" +python = "^3.9" + +[tool.poetry.requires-plugins] +poetry-dynamic-versioning = ">=1.5.2" -[tool.poetry.dev-dependencies] +[tool.poetry-dynamic-versioning] +enable = true +vcs = "git" +style = "pep440" + +[tool.poetry.group.dev.dependencies] coverage = "^6.2" requests-cache = "^1.2.0" - -[build-system] -requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"] -build-backend = "poetry_dynamic_versioning.backend" From d83e29632d110e24142538dabdeb2744d215bb37 Mon Sep 17 00:00:00 2001 From: David Linke Date: Wed, 29 Jan 2025 18:09:01 +0100 Subject: [PATCH 02/12] Update poetry.lock --- poetry.lock | 106 +++++++++++++++++++++++++--------------------------- 1 file changed, 51 insertions(+), 55 deletions(-) diff --git a/poetry.lock b/poetry.lock index afd28039..166082da 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.0.1 and should not be changed by hand. [[package]] name = "annotated-types" @@ -6,20 +6,19 @@ version = "0.6.0" description = "Reusable constraint types to use with typing.Annotated" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"}, {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"}, ] -[package.dependencies] -typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} - [[package]] name = "attrs" version = "23.2.0" description = "Classes Without Boilerplate" optional = false python-versions = ">=3.7" +groups = ["main", "dev"] files = [ {file = "attrs-23.2.0-py3-none-any.whl", hash = "sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1"}, {file = "attrs-23.2.0.tar.gz", hash = "sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30"}, @@ -39,6 +38,7 @@ version = "23.2.3" description = "Composable complex class support for attrs and dataclasses." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "cattrs-23.2.3-py3-none-any.whl", hash = "sha256:0341994d94971052e9ee70662542699a3162ea1e0c62f7ce1b4a57f563685108"}, {file = "cattrs-23.2.3.tar.gz", hash = "sha256:a934090d95abaa9e911dac357e3a8699e0b4b14f8529bcc7d2b1ad9d51672b9f"}, @@ -64,6 +64,7 @@ version = "2024.2.2" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" +groups = ["main", "dev"] files = [ {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"}, {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, @@ -75,6 +76,7 @@ version = "3.3.2" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.7.0" +groups = ["main", "dev"] files = [ {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"}, {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"}, @@ -174,6 +176,7 @@ version = "8.1.7" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, @@ -188,6 +191,8 @@ version = "0.4.6" description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +groups = ["main"] +markers = "platform_system == \"Windows\" or sys_platform == \"win32\"" files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, @@ -199,6 +204,7 @@ version = "6.5.0" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "coverage-6.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ef8674b0ee8cc11e2d574e3e2998aea5df5ab242e012286824ea3c6970580e53"}, {file = "coverage-6.5.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:784f53ebc9f3fd0e2a3f6a78b2be1bd1f5575d7863e10c6e12504f240fd06660"}, @@ -261,6 +267,7 @@ version = "0.7.7" description = "Idiomatic conversion between URIs and compact URIs (CURIEs)." optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "curies-0.7.7-py3-none-any.whl", hash = "sha256:609de3e8cdf39f410e8f4d9f06eb7df379465860f4fb441bf0e79672430f8e2a"}, {file = "curies-0.7.7.tar.gz", hash = "sha256:a8d674029f906fb9c3564eafa0862ce96725932bd801fa751e076265b111cb34"}, @@ -285,6 +292,7 @@ version = "1.2.14" description = "Python @deprecated decorator to deprecate old python classes, functions or methods." optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +groups = ["main"] files = [ {file = "Deprecated-1.2.14-py2.py3-none-any.whl", hash = "sha256:6fac8b097794a90302bdbb17b9b815e732d3c4720583ff1b198499d78470466c"}, {file = "Deprecated-1.2.14.tar.gz", hash = "sha256:e5323eb936458dccc2582dc6f9c322c852a775a27065ff2b0c4970b9d53d01b3"}, @@ -302,6 +310,8 @@ version = "1.2.0" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" +groups = ["main", "dev"] +markers = "python_version < \"3.11\"" files = [ {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"}, {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"}, @@ -316,6 +326,7 @@ version = "0.9.1" description = "Honey Badger reader - a generic file/url/string open and read tool" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "hbreader-0.9.1-py3-none-any.whl", hash = "sha256:9a6e76c9d1afc1b977374a5dc430a1ebb0ea0488205546d4678d6e31cc5f6801"}, {file = "hbreader-0.9.1.tar.gz", hash = "sha256:d2c132f8ba6276d794c66224c3297cec25c8079d0a4cf019c061611e0a3b94fa"}, @@ -327,35 +338,19 @@ version = "3.6" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.5" +groups = ["main", "dev"] files = [ {file = "idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"}, {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, ] -[[package]] -name = "importlib-resources" -version = "6.1.1" -description = "Read resources from Python packages" -optional = false -python-versions = ">=3.8" -files = [ - {file = "importlib_resources-6.1.1-py3-none-any.whl", hash = "sha256:e8bf90d8213b486f428c9c39714b920041cb02c184686a3dee24905aaa8105d6"}, - {file = "importlib_resources-6.1.1.tar.gz", hash = "sha256:3893a00122eafde6894c59914446a512f728a0c1a45f9bb9b63721b6bacf0b4a"}, -] - -[package.dependencies] -zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-ruff", "zipp (>=3.17)"] - [[package]] name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, @@ -367,6 +362,7 @@ version = "0.6.1" description = "An ISO 8601 date/time/duration parser and formatter" optional = false python-versions = "*" +groups = ["main"] files = [ {file = "isodate-0.6.1-py2.py3-none-any.whl", hash = "sha256:0751eece944162659049d35f4f549ed815792b38793f07cf73381c1c87cbed96"}, {file = "isodate-0.6.1.tar.gz", hash = "sha256:48c5881de7e8b0a0d648cb024c8062dc84e7b840ed81e864c7614fd3c127bde9"}, @@ -381,6 +377,7 @@ version = "0.1.9" description = "Python library for denormalizing nested dicts or json objects to tables and back" optional = false python-versions = ">=3.7.0" +groups = ["main"] files = [ {file = "json_flattener-0.1.9-py3-none-any.whl", hash = "sha256:6b027746f08bf37a75270f30c6690c7149d5f704d8af1740c346a3a1236bc941"}, {file = "json_flattener-0.1.9.tar.gz", hash = "sha256:84cf8523045ffb124301a602602201665fcb003a171ece87e6f46ed02f7f0c15"}, @@ -396,6 +393,7 @@ version = "1.0.4" description = "JSON as python objects - version 2" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "jsonasobj2-1.0.4-py3-none-any.whl", hash = "sha256:12e86f86324d54fcf60632db94ea74488d5314e3da554c994fe1e2c6f29acb79"}, {file = "jsonasobj2-1.0.4.tar.gz", hash = "sha256:f50b1668ef478004aa487b2d2d094c304e5cb6b79337809f4a1f2975cc7fbb4e"}, @@ -410,6 +408,7 @@ version = "4.21.1" description = "An implementation of JSON Schema validation for Python" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "jsonschema-4.21.1-py3-none-any.whl", hash = "sha256:7996507afae316306f9e2290407761157c6f78002dcf7419acb99822143d1c6f"}, {file = "jsonschema-4.21.1.tar.gz", hash = "sha256:85727c00279f5fa6bedbe6238d2aa6403bedd8b4864ab11207d07df3cc1b2ee5"}, @@ -417,9 +416,7 @@ files = [ [package.dependencies] attrs = ">=22.2.0" -importlib-resources = {version = ">=1.4.0", markers = "python_version < \"3.9\""} jsonschema-specifications = ">=2023.03.6" -pkgutil-resolve-name = {version = ">=1.3.10", markers = "python_version < \"3.9\""} referencing = ">=0.28.4" rpds-py = ">=0.7.1" @@ -433,13 +430,13 @@ version = "2023.12.1" description = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "jsonschema_specifications-2023.12.1-py3-none-any.whl", hash = "sha256:87e4fdf3a94858b8a2ba2778d9ba57d8a9cafca7c7489c46ba0d30a8bc6a9c3c"}, {file = "jsonschema_specifications-2023.12.1.tar.gz", hash = "sha256:48a76787b3e70f5ed53f1160d2b81f586e4ca6d1548c5de7085d1682674764cc"}, ] [package.dependencies] -importlib-resources = {version = ">=1.4.0", markers = "python_version < \"3.9\""} referencing = ">=0.31.0" [[package]] @@ -448,28 +445,19 @@ version = "23.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, ] -[[package]] -name = "pkgutil-resolve-name" -version = "1.3.10" -description = "Resolve a name to an object." -optional = false -python-versions = ">=3.6" -files = [ - {file = "pkgutil_resolve_name-1.3.10-py3-none-any.whl", hash = "sha256:ca27cc078d25c5ad71a9de0a7a330146c4e014c2462d9af19c6b828280649c5e"}, - {file = "pkgutil_resolve_name-1.3.10.tar.gz", hash = "sha256:357d6c9e6a755653cfd78893817c0853af365dd51ec97f3d358a819373bbd174"}, -] - [[package]] name = "platformdirs" version = "4.2.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "platformdirs-4.2.0-py3-none-any.whl", hash = "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068"}, {file = "platformdirs-4.2.0.tar.gz", hash = "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768"}, @@ -485,6 +473,7 @@ version = "1.4.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"}, {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"}, @@ -500,6 +489,7 @@ version = "0.1.12" description = "A python API for working with ID prefixes" optional = false python-versions = ">=3.7,<4.0" +groups = ["main"] files = [ {file = "prefixcommons-0.1.12-py3-none-any.whl", hash = "sha256:16dbc0a1f775e003c724f19a694fcfa3174608f5c8b0e893d494cf8098ac7f8b"}, {file = "prefixcommons-0.1.12.tar.gz", hash = "sha256:22c4e2d37b63487b3ab48f0495b70f14564cb346a15220f23919eb0c1851f69f"}, @@ -517,6 +507,7 @@ version = "0.2.2" description = "A python library for retrieving semantic prefix maps" optional = false python-versions = ">=3.8,<4.0" +groups = ["main"] files = [ {file = "prefixmaps-0.2.2-py3-none-any.whl", hash = "sha256:4ac2bf3ddb9b27c40c978cf937e9bedb160050d24e8c679b94c9c885e1d73c72"}, {file = "prefixmaps-0.2.2.tar.gz", hash = "sha256:a36b1554154ef465271bde82dc91cd671e2d31dc1f50c2fd08ccb0d7d5791c33"}, @@ -532,6 +523,7 @@ version = "2.6.1" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "pydantic-2.6.1-py3-none-any.whl", hash = "sha256:0b6a909df3192245cb736509a92ff69e4fef76116feffec68e93a567347bae6f"}, {file = "pydantic-2.6.1.tar.gz", hash = "sha256:4fd5c182a2488dc63e6d32737ff19937888001e2a6d86e94b3f233104a5d1fa9"}, @@ -551,6 +543,7 @@ version = "2.16.2" description = "" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "pydantic_core-2.16.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3fab4e75b8c525a4776e7630b9ee48aea50107fea6ca9f593c98da3f4d11bf7c"}, {file = "pydantic_core-2.16.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8bde5b48c65b8e807409e6f20baee5d2cd880e0fad00b1a811ebc43e39a00ab2"}, @@ -642,6 +635,7 @@ version = "3.1.1" description = "pyparsing module - Classes and methods to define and execute parsing grammars" optional = false python-versions = ">=3.6.8" +groups = ["main"] files = [ {file = "pyparsing-3.1.1-py3-none-any.whl", hash = "sha256:32c7c0b711493c72ff18a981d24f28aaf9c1fb7ed5e9667c9e84e3db623bdbfb"}, {file = "pyparsing-3.1.1.tar.gz", hash = "sha256:ede28a1a32462f5a9705e07aea48001a08f7cf81a021585011deba701581a0db"}, @@ -656,6 +650,7 @@ version = "8.0.1" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "pytest-8.0.1-py3-none-any.whl", hash = "sha256:3e4f16fe1c0a9dc9d9389161c127c3edc5d810c38d6793042fb81d9f48a59fca"}, {file = "pytest-8.0.1.tar.gz", hash = "sha256:267f6563751877d772019b13aacbe4e860d73fe8f651f28112e9ac37de7513ae"}, @@ -678,6 +673,7 @@ version = "2015.11.4" description = "Configures logging and allows tweaking the log level with a py.test flag" optional = false python-versions = "*" +groups = ["main"] files = [ {file = "pytest-logging-2015.11.4.tar.gz", hash = "sha256:cec5c85ecf18aab7b2ead5498a31b9f758680ef5a902b9054ab3f2bdbb77c896"}, ] @@ -691,8 +687,8 @@ version = "0.4.0" description = "A pure Python implementation of the trie data structure." optional = false python-versions = "*" +groups = ["main"] files = [ - {file = "PyTrie-0.4.0-py3-none-any.whl", hash = "sha256:f687c224ee8c66cda8e8628a903011b692635ffbb08d4b39c5f92b18eb78c950"}, {file = "PyTrie-0.4.0.tar.gz", hash = "sha256:8f4488f402d3465993fb6b6efa09866849ed8cda7903b50647b7d0342b805379"}, ] @@ -705,6 +701,7 @@ version = "6.0.1" description = "YAML parser and emitter for Python" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "PyYAML-6.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a"}, {file = "PyYAML-6.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f"}, @@ -765,6 +762,7 @@ version = "6.3.2" description = "RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information." optional = false python-versions = ">=3.7,<4.0" +groups = ["main"] files = [ {file = "rdflib-6.3.2-py3-none-any.whl", hash = "sha256:36b4e74a32aa1e4fa7b8719876fb192f19ecd45ff932ea5ebbd2e417a0247e63"}, {file = "rdflib-6.3.2.tar.gz", hash = "sha256:72af591ff704f4caacea7ecc0c5a9056b8553e0489dd4f35a9bc52dbd41522e0"}, @@ -786,6 +784,7 @@ version = "0.33.0" description = "JSON Referencing + Python" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "referencing-0.33.0-py3-none-any.whl", hash = "sha256:39240f2ecc770258f28b642dd47fd74bc8b02484de54e1882b74b35ebd779bd5"}, {file = "referencing-0.33.0.tar.gz", hash = "sha256:c775fedf74bc0f9189c2a3be1c12fd03e8c23f4d371dce795df44e06c5b412f7"}, @@ -801,6 +800,7 @@ version = "2.31.0" description = "Python HTTP for Humans." optional = false python-versions = ">=3.7" +groups = ["main", "dev"] files = [ {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, @@ -822,6 +822,7 @@ version = "1.2.0" description = "A persistent cache for python requests" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "requests_cache-1.2.0-py3-none-any.whl", hash = "sha256:490324301bf0cb924ff4e6324bd2613453e7e1f847353928b08adb0fdfb7f722"}, {file = "requests_cache-1.2.0.tar.gz", hash = "sha256:db1c709ca343cc1cd5b6c8b1a5387298eceed02306a6040760db538c885e3838"}, @@ -852,6 +853,7 @@ version = "0.18.0" description = "Python bindings to Rust's persistent data structures (rpds)" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "rpds_py-0.18.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:5b4e7d8d6c9b2e8ee2d55c90b59c707ca59bc30058269b3db7b1f8df5763557e"}, {file = "rpds_py-0.18.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c463ed05f9dfb9baebef68048aed8dcdc94411e4bf3d33a39ba97e271624f8f7"}, @@ -960,6 +962,7 @@ version = "1.16.0" description = "Python 2 and 3 compatibility utilities" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +groups = ["main", "dev"] files = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, @@ -971,6 +974,7 @@ version = "2.4.0" description = "Sorted Containers -- Sorted List, Sorted Dict, Sorted Set" optional = false python-versions = "*" +groups = ["main"] files = [ {file = "sortedcontainers-2.4.0-py2.py3-none-any.whl", hash = "sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0"}, {file = "sortedcontainers-2.4.0.tar.gz", hash = "sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88"}, @@ -982,6 +986,8 @@ version = "2.0.1" description = "A lil' TOML parser" optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "python_version < \"3.11\"" files = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, @@ -993,10 +999,12 @@ version = "4.9.0" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" +groups = ["main", "dev"] files = [ {file = "typing_extensions-4.9.0-py3-none-any.whl", hash = "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd"}, {file = "typing_extensions-4.9.0.tar.gz", hash = "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783"}, ] +markers = {dev = "python_version < \"3.11\""} [[package]] name = "url-normalize" @@ -1004,6 +1012,7 @@ version = "1.4.3" description = "URL normalization for Python" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +groups = ["dev"] files = [ {file = "url-normalize-1.4.3.tar.gz", hash = "sha256:d23d3a070ac52a67b83a1c59a0e68f8608d1cd538783b401bc9de2c0fac999b2"}, {file = "url_normalize-1.4.3-py2.py3-none-any.whl", hash = "sha256:ec3c301f04e5bb676d333a7fa162fa977ad2ca04b7e652bfc9fac4e405728eed"}, @@ -1018,6 +1027,7 @@ version = "2.2.1" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.8" +groups = ["main", "dev"] files = [ {file = "urllib3-2.2.1-py3-none-any.whl", hash = "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d"}, {file = "urllib3-2.2.1.tar.gz", hash = "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19"}, @@ -1035,6 +1045,7 @@ version = "1.16.0" description = "Module for decorators, wrappers and monkey patching." optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "wrapt-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4"}, {file = "wrapt-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e4fdb9275308292e880dcbeb12546df7f3e0f96c6b41197e0cf37d2826359020"}, @@ -1108,22 +1119,7 @@ files = [ {file = "wrapt-1.16.0.tar.gz", hash = "sha256:5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d"}, ] -[[package]] -name = "zipp" -version = "3.17.0" -description = "Backport of pathlib-compatible object wrapper for zip files" -optional = false -python-versions = ">=3.8" -files = [ - {file = "zipp-3.17.0-py3-none-any.whl", hash = "sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31"}, - {file = "zipp-3.17.0.tar.gz", hash = "sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0"}, -] - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"] - [metadata] -lock-version = "2.0" -python-versions = "^3.8" -content-hash = "fddd54f2e38fdce32a4236c283d5f4e141f897e6d7ed4aac4ce5dbb40c37e428" +lock-version = "2.1" +python-versions = "^3.9" +content-hash = "9a119cdaaca0dd333c4eb7bf63a9888a24eb19b60899e005c9e550dee3e54b66" From 89d97609f6e774edf996b2bc5c57b3bc3c4ffef7 Mon Sep 17 00:00:00 2001 From: David Linke Date: Wed, 29 Jan 2025 20:29:56 +0100 Subject: [PATCH 03/12] Add dependabot for monthly action updates --- .github/dependabot.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..b575275f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: +- package-ecosystem: github-actions + directory: "/" + schedule: + interval: monthly From 2e8555d263795c66519a47ed8198d6feb77d57ac Mon Sep 17 00:00:00 2001 From: David Linke Date: Wed, 29 Jan 2025 20:31:16 +0100 Subject: [PATCH 04/12] Actions: change to poetry2 & use safer hash-id --- .github/workflows/check-dependencies.yaml | 12 ++++++------ .github/workflows/main.yaml | 11 ++++++----- .github/workflows/test-upstream.yaml | 12 +++++------- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/.github/workflows/check-dependencies.yaml b/.github/workflows/check-dependencies.yaml index 3a43f463..05bf52f2 100644 --- a/.github/workflows/check-dependencies.yaml +++ b/.github/workflows/check-dependencies.yaml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] exclude: - os: windows-latest python-version: "3.8" @@ -26,17 +26,16 @@ jobs: # install poetry #---------------------------------------------- - name: Install Poetry - # Pin to 1.3.2 to workaround https://github.com/python-poetry/poetry/issues/7611 - run: pipx install poetry==1.3.2 + run: pipx install poetry #---------------------------------------------- # check-out repo and set-up python #---------------------------------------------- - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b with: python-version: ${{ matrix.python-version }} cache: 'poetry' @@ -62,4 +61,5 @@ jobs: run: Remove-Item poetry.lock -Force - name: Run tests - run: poetry run python -m unittest discover \ No newline at end of file + shell: bash + run: poetry run python -m pytest --with-slow \ No newline at end of file diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 973acf9c..075ce4f9 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] - python-version: ["3.8", "3.9", "3.10", "3.12"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] exclude: - os: windows-latest python-version: "3.8" @@ -25,16 +25,16 @@ jobs: # install poetry #---------------------------------------------- - name: Install Poetry - run: pipx install poetry==1.4.0 + run: pipx install poetry #---------------------------------------------- # check-out repo and set-up python #---------------------------------------------- - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b with: python-version: ${{ matrix.python-version }} cache: 'poetry' @@ -49,6 +49,7 @@ jobs: # coverage report #---------------------------------------------- - name: Generate coverage results + shell: bash run: | poetry run coverage run -m pytest poetry run coverage xml @@ -58,7 +59,7 @@ jobs: # upload coverage results #---------------------------------------------- - name: Upload coverage report - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 with: name: codecov-results-${{ matrix.os }}-${{ matrix.python-version }} token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/test-upstream.yaml b/.github/workflows/test-upstream.yaml index eb07758c..f2bddf60 100644 --- a/.github/workflows/test-upstream.yaml +++ b/.github/workflows/test-upstream.yaml @@ -25,7 +25,7 @@ jobs: steps: - name: checkout upstream - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: repository: linkml/linkml path: linkml @@ -33,7 +33,7 @@ jobs: fetch-depth: 0 - name: checkout linkml-runtime - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: # don't specify repository like this or else we won't get pull request branches correctly # repository: linkml/linkml-runtime @@ -48,19 +48,16 @@ jobs: git fetch upstream --tags - name: set up python - uses: actions/setup-python@v5 + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b with: python-version: ${{ matrix.python-version }} - name: Install poetry run: pipx install poetry - - name: Install dynamic versioning plugin - run: poetry self add "poetry-dynamic-versioning[plugin]" - - name: Load cached venv id: cached-poetry-dependencies - uses: actions/cache@v3 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 with: path: linkml/.venv key: venv-${{ matrix.python-version }}-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} @@ -89,6 +86,7 @@ jobs: run: poetry run python -c 'import linkml_runtime; from importlib.metadata import version; print(linkml_runtime.__file__); print(version("linkml_runtime"))' - name: run tests + shell: bash working-directory: linkml run: poetry run python -m pytest --with-slow From b119d135afd1fe12ea3543f147d7e2d04bc84561 Mon Sep 17 00:00:00 2001 From: David Linke Date: Wed, 29 Jan 2025 20:31:51 +0100 Subject: [PATCH 05/12] Update publish action (prepare for trusted publishing) --- .github/workflows/pypi-publish.yaml | 54 +++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pypi-publish.yaml b/.github/workflows/pypi-publish.yaml index a47376cb..0b30ce10 100644 --- a/.github/workflows/pypi-publish.yaml +++ b/.github/workflows/pypi-publish.yaml @@ -1,21 +1,21 @@ name: Publish Python Package +# Publishes to PyPI triggered by creating a releases in GitHub UI on: release: - types: [created] + types: [published] jobs: - build-n-publish: - name: Build and publish Python 🐍 distributions 📦 to PyPI + build: + name: Build Python 🐍 distributions 📦 for publishing to PyPI runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Set up Python - uses: actions/setup-python@v2.2.2 + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b with: - python-version: 3.8 + python-version: 3.12 - name: Install Poetry run: pipx install poetry @@ -28,8 +28,40 @@ jobs: poetry version $(git describe --tags --abbrev=0) poetry build - - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@v1.2.2 + - name: Store built distribution + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b with: - user: __token__ - password: ${{ secrets.pypi_password }} + name: distribution-files + path: dist/ + + pypi-publish: + name: Build and publish Python 🐍 package 📦 to PyPI + needs: build + runs-on: ubuntu-latest + # Next 5 lines prepare for trusted publishing: https://docs.pypi.org/trusted-publishers/adding-a-publisher/ + # environment: + # name: pypi-release + # url: https://pypi.org/p/linkml-runtime + # permissions: + # id-token: write # this permission is mandatory for trusted publishing + steps: + - name: Download built distribution + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 + with: + name: distribution-files + path: dist + + - name: Publish package 📦 to PyPI + if: github.event_name == 'release' + uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc + with: + user: __token__ + password: ${{ secrets.pypi_password }} + # verbose: true + +# Used actions: (updates managed by dependabot) +# - https://github.com/actions/checkout +# - https://github.com/actions/setup-python +# - https://github.com/actions/upload-artifact +# - https://github.com/actions/download-artifact +# - https://github.com/pypa/gh-action-pypi-publish/ From 077c63a405e3bce2689551305a60a43ea4d11a1f Mon Sep 17 00:00:00 2001 From: David Linke Date: Thu, 30 Jan 2025 10:03:56 +0100 Subject: [PATCH 06/12] Change to SPDX license identifier; make readme non-dynamic --- .github/workflows/main.yaml | 7 +++++-- pyproject.toml | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 075ce4f9..f98aab8d 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -16,7 +16,6 @@ jobs: exclude: - os: windows-latest python-version: "3.8" - runs-on: ${{ matrix.os }} steps: @@ -32,6 +31,8 @@ jobs: #---------------------------------------------- - name: Check out repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b @@ -43,7 +44,9 @@ jobs: # install your root project, if required #---------------------------------------------- - name: Install library - run: poetry install --no-interaction + run: | + git tag --list "v1.8*" + poetry install --no-interaction #---------------------------------------------- # coverage report diff --git a/pyproject.toml b/pyproject.toml index c3072e79..9f8c13ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ authors = [ {name = "Bill Duncan", email = "wdduncan@gmail.com"}, {name = "Harshad Hegde", email = "hhegde@lbl.gov"}, ] -license = {text = "LICENSE"} +license = "CC0-1.0" homepage = "https://github.com/linkml/linkml-runtime" repository = "https://github.com/linkml/linkml-runtime" documentation = "https://github.com/linkml/linkml-runtime" @@ -34,7 +34,7 @@ classifiers = [ ] include = ["linkml_runtime"] requires-python = ">=3.8" -dynamic = ["version", "readme"] +dynamic = ["version"] dependencies = [ "click", "deprecated", From 7a93f04d0531eb271f7255330cfe058306b5523a Mon Sep 17 00:00:00 2001 From: David Linke Date: Thu, 30 Jan 2025 21:47:21 +0100 Subject: [PATCH 07/12] Make main.yaml workflow safer --- .github/workflows/main.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index f98aab8d..804f7548 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,11 +1,10 @@ -# Built from: -# https://docs.github.com/en/actions/guides/building-and-testing-python -# https://github.com/actions/setup-python/ - +# Action passes pedantic check with zizmor 1.3.0, https://woodruffw.github.io/zizmor/ name: Build and test linkml-runtime on: [pull_request] +permissions: {} + jobs: test: strategy: @@ -17,7 +16,8 @@ jobs: - os: windows-latest python-version: "3.8" runs-on: ${{ matrix.os }} - + permissions: + contents: read steps: #---------------------------------------------- @@ -33,6 +33,7 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 + persist-credentials: false - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b @@ -45,7 +46,6 @@ jobs: #---------------------------------------------- - name: Install library run: | - git tag --list "v1.8*" poetry install --no-interaction #---------------------------------------------- From c3d474b0b2415dadb876e93c4562a699644719c2 Mon Sep 17 00:00:00 2001 From: David Linke Date: Thu, 30 Jan 2025 22:38:40 +0100 Subject: [PATCH 08/12] On Win, inject poetry-dynamic-versioning into pipx --- .github/workflows/check-dependencies.yaml | 7 +++++++ .github/workflows/main.yaml | 12 ++++++++++-- .github/workflows/test-upstream.yaml | 7 +++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-dependencies.yaml b/.github/workflows/check-dependencies.yaml index 05bf52f2..06bb3575 100644 --- a/.github/workflows/check-dependencies.yaml +++ b/.github/workflows/check-dependencies.yaml @@ -28,6 +28,13 @@ jobs: - name: Install Poetry run: pipx install poetry + # We install poetry-dynamic-versioning into pipx because the automatic installallation + # by poetry 2.x triggers a Windows issue https://github.com/pypa/installer/issues/260 + - name: Install poetry-dynamic-versioning + if: runner.os == 'Windows' + run: + pipx inject poetry poetry-dynamic-versioning + #---------------------------------------------- # check-out repo and set-up python #---------------------------------------------- diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 804f7548..6abbdc69 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -24,8 +24,16 @@ jobs: # install poetry #---------------------------------------------- - name: Install Poetry - run: pipx install poetry - + run: | + pipx install poetry + + # We install poetry-dynamic-versioning into pipx because the automatic installallation + # by poetry 2.x triggers a Windows issue https://github.com/pypa/installer/issues/260 + - name: Install poetry-dynamic-versioning + if: runner.os == 'Windows' + run: + pipx inject poetry poetry-dynamic-versioning + #---------------------------------------------- # check-out repo and set-up python #---------------------------------------------- diff --git a/.github/workflows/test-upstream.yaml b/.github/workflows/test-upstream.yaml index f2bddf60..9736d147 100644 --- a/.github/workflows/test-upstream.yaml +++ b/.github/workflows/test-upstream.yaml @@ -55,6 +55,13 @@ jobs: - name: Install poetry run: pipx install poetry + # We install poetry-dynamic-versioning into pipx because the automatic installallation + # by poetry 2.x triggers a Windows issue https://github.com/pypa/installer/issues/260 + - name: Install poetry-dynamic-versioning + if: runner.os == 'Windows' + run: + pipx inject poetry poetry-dynamic-versioning + - name: Load cached venv id: cached-poetry-dependencies uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 From e0bf17de9cab8d31ad8d04191234e8d99b2e90ae Mon Sep 17 00:00:00 2001 From: David Linke Date: Fri, 31 Jan 2025 23:30:49 +0100 Subject: [PATCH 09/12] Same lower Python bound for linkml-runtime as for linkml --- poetry.lock | 68 ++++++++++++++++++++++++++++++++++++++++++++++++-- pyproject.toml | 2 +- 2 files changed, 67 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 166082da..292a11cf 100644 --- a/poetry.lock +++ b/poetry.lock @@ -12,6 +12,9 @@ files = [ {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"}, ] +[package.dependencies] +typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} + [[package]] name = "attrs" version = "23.2.0" @@ -344,6 +347,30 @@ files = [ {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, ] +[[package]] +name = "importlib-resources" +version = "6.4.5" +description = "Read resources from Python packages" +optional = false +python-versions = ">=3.8" +groups = ["main"] +markers = "python_version < \"3.9\"" +files = [ + {file = "importlib_resources-6.4.5-py3-none-any.whl", hash = "sha256:ac29d5f956f01d5e4bb63102a5a19957f1b9175e45649977264a1416783bb717"}, + {file = "importlib_resources-6.4.5.tar.gz", hash = "sha256:980862a1d16c9e147a59603677fa2aa5fd82b87f223b6cb870695bcfce830065"}, +] + +[package.dependencies] +zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} + +[package.extras] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +enabler = ["pytest-enabler (>=2.2)"] +test = ["jaraco.test (>=5.4)", "pytest (>=6,!=8.1.*)", "zipp (>=3.17)"] +type = ["pytest-mypy"] + [[package]] name = "iniconfig" version = "2.0.0" @@ -416,7 +443,9 @@ files = [ [package.dependencies] attrs = ">=22.2.0" +importlib-resources = {version = ">=1.4.0", markers = "python_version < \"3.9\""} jsonschema-specifications = ">=2023.03.6" +pkgutil-resolve-name = {version = ">=1.3.10", markers = "python_version < \"3.9\""} referencing = ">=0.28.4" rpds-py = ">=0.7.1" @@ -437,6 +466,7 @@ files = [ ] [package.dependencies] +importlib-resources = {version = ">=1.4.0", markers = "python_version < \"3.9\""} referencing = ">=0.31.0" [[package]] @@ -451,6 +481,19 @@ files = [ {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, ] +[[package]] +name = "pkgutil-resolve-name" +version = "1.3.10" +description = "Resolve a name to an object." +optional = false +python-versions = ">=3.6" +groups = ["main"] +markers = "python_version < \"3.9\"" +files = [ + {file = "pkgutil_resolve_name-1.3.10-py3-none-any.whl", hash = "sha256:ca27cc078d25c5ad71a9de0a7a330146c4e014c2462d9af19c6b828280649c5e"}, + {file = "pkgutil_resolve_name-1.3.10.tar.gz", hash = "sha256:357d6c9e6a755653cfd78893817c0853af365dd51ec97f3d358a819373bbd174"}, +] + [[package]] name = "platformdirs" version = "4.2.0" @@ -1119,7 +1162,28 @@ files = [ {file = "wrapt-1.16.0.tar.gz", hash = "sha256:5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d"}, ] +[[package]] +name = "zipp" +version = "3.20.2" +description = "Backport of pathlib-compatible object wrapper for zip files" +optional = false +python-versions = ">=3.8" +groups = ["main"] +markers = "python_version < \"3.9\"" +files = [ + {file = "zipp-3.20.2-py3-none-any.whl", hash = "sha256:a817ac80d6cf4b23bf7f2828b7cabf326f15a001bea8b1f9b49631780ba28350"}, + {file = "zipp-3.20.2.tar.gz", hash = "sha256:bc9eb26f4506fda01b81bcde0ca78103b6e62f991b381fec825435c836edbc29"}, +] + +[package.extras] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] +cover = ["pytest-cov"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +enabler = ["pytest-enabler (>=2.2)"] +test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] +type = ["pytest-mypy"] + [metadata] lock-version = "2.1" -python-versions = "^3.9" -content-hash = "9a119cdaaca0dd333c4eb7bf63a9888a24eb19b60899e005c9e550dee3e54b66" +python-versions = "^3.8" +content-hash = "59f46a52a39fb7023a22e89a98c30a3aa68ad4c0ac6b9b26ec33876c11e27845" diff --git a/pyproject.toml b/pyproject.toml index 9f8c13ba..6e06ad96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ requires-poetry = ">=2.0" version = "0.0.0" [tool.poetry.dependencies] -python = "^3.9" +python = "^3.8" [tool.poetry.requires-plugins] poetry-dynamic-versioning = ">=1.5.2" From 4033a408a444c05ddf3b571aa93f43a6123f1a0d Mon Sep 17 00:00:00 2001 From: David Linke Date: Fri, 31 Jan 2025 22:40:25 +0100 Subject: [PATCH 10/12] Improve test_upstream with poetry sync --- .github/workflows/test-upstream.yaml | 42 ++++++++++------------------ 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/.github/workflows/test-upstream.yaml b/.github/workflows/test-upstream.yaml index 9736d147..67efc5e7 100644 --- a/.github/workflows/test-upstream.yaml +++ b/.github/workflows/test-upstream.yaml @@ -1,4 +1,4 @@ -name: Test with upstream linkml +name: Test linkml-runtime with upstream linkml and run linkml tests on: pull_request_review: types: [ submitted ] @@ -8,6 +8,7 @@ jobs: test_upstream: if: github.event_name == 'workflow_dispatch' || github.event.review.state == 'APPROVED' strategy: + fail-fast: false matrix: os: [ ubuntu-latest, windows-latest ] python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] @@ -24,7 +25,7 @@ jobs: steps: - - name: checkout upstream + - name: checkout upstream linkml uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: repository: linkml/linkml @@ -35,18 +36,16 @@ jobs: - name: checkout linkml-runtime uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: - # don't specify repository like this or else we won't get pull request branches correctly - # repository: linkml/linkml-runtime path: linkml-runtime fetch-depth: 0 - - name: Ensure tags if not run from main repo + - name: Ensure linkml-runtime tags if not run from main repo if: github.repository != 'linkml/linkml-runtime' working-directory: linkml-runtime run: | git remote add upstream https://github.com/linkml/linkml-runtime git fetch upstream --tags - + - name: set up python uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b with: @@ -69,33 +68,20 @@ jobs: path: linkml/.venv key: venv-${{ matrix.python-version }}-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} - # make extra sure we're removing any old version of linkml-runtime that exists - - name: uninstall potentially cached linkml-runtime - working-directory: linkml - run: poetry run pip uninstall linkml-runtime - - # we are not using linkml-runtime's lockfile, but simulating what will happen - # when we merge this and update linkml's lockfile - - name: add linkml-runtime to lockfile - working-directory: linkml - run: poetry add ../linkml-runtime - - # note that we run the installation step always, even if we restore a venv, - # the cache will restore the old version of linkml-runtime, but the lockfile - # will only store the directory dependency (and thus will reinstall it) - # the cache will still speedup the rest of the installation - - name: install linkml + # We are not using linkml-runtime's lockfile, but simulate what will happen + # when we merge this and update linkml's lockfile. + # By using poetry sync we remove any old stuff that exists in the cache. + - name: Refresh or install linkml & add linkml-runtime to check dependencies working-directory: linkml - run: poetry install --no-interaction -E tests - + run: | + poetry sync --extras tests + poetry add ../linkml-runtime + - name: print linkml-runtime version working-directory: linkml run: poetry run python -c 'import linkml_runtime; from importlib.metadata import version; print(linkml_runtime.__file__); print(version("linkml_runtime"))' - - name: run tests + - name: run linkml tests shell: bash working-directory: linkml run: poetry run python -m pytest --with-slow - - - From f62a4a34f2f3be5ed2fb1d97de527a86ef9cb844 Mon Sep 17 00:00:00 2001 From: David Linke Date: Sat, 1 Feb 2025 00:23:18 +0100 Subject: [PATCH 11/12] pipx inject poetry-dynamic-versioning also on linux --- .github/workflows/check-dependencies.yaml | 2 +- .github/workflows/main.yaml | 2 +- .github/workflows/test-upstream.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-dependencies.yaml b/.github/workflows/check-dependencies.yaml index 06bb3575..fe121bb2 100644 --- a/.github/workflows/check-dependencies.yaml +++ b/.github/workflows/check-dependencies.yaml @@ -30,8 +30,8 @@ jobs: # We install poetry-dynamic-versioning into pipx because the automatic installallation # by poetry 2.x triggers a Windows issue https://github.com/pypa/installer/issues/260 + # and also does not work on Ubuntu in gh-actions. - name: Install poetry-dynamic-versioning - if: runner.os == 'Windows' run: pipx inject poetry poetry-dynamic-versioning diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6abbdc69..7de84317 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -29,8 +29,8 @@ jobs: # We install poetry-dynamic-versioning into pipx because the automatic installallation # by poetry 2.x triggers a Windows issue https://github.com/pypa/installer/issues/260 + # and also does not work on Ubuntu in gh-actions. - name: Install poetry-dynamic-versioning - if: runner.os == 'Windows' run: pipx inject poetry poetry-dynamic-versioning diff --git a/.github/workflows/test-upstream.yaml b/.github/workflows/test-upstream.yaml index 67efc5e7..3a5d57bd 100644 --- a/.github/workflows/test-upstream.yaml +++ b/.github/workflows/test-upstream.yaml @@ -56,8 +56,8 @@ jobs: # We install poetry-dynamic-versioning into pipx because the automatic installallation # by poetry 2.x triggers a Windows issue https://github.com/pypa/installer/issues/260 + # and also does not work on Ubuntu in gh-actions. - name: Install poetry-dynamic-versioning - if: runner.os == 'Windows' run: pipx inject poetry poetry-dynamic-versioning From f612affbe3e5296c7bfccba3c854022a58104786 Mon Sep 17 00:00:00 2001 From: David Linke Date: Sun, 9 Feb 2025 12:19:27 +0100 Subject: [PATCH 12/12] Remove redundant Python version constraint --- poetry.lock | 4 ++-- pyproject.toml | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index 292a11cf..b3739ad7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1185,5 +1185,5 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" -python-versions = "^3.8" -content-hash = "59f46a52a39fb7023a22e89a98c30a3aa68ad4c0ac6b9b26ec33876c11e27845" +python-versions = ">=3.8,<4.0" +content-hash = "1a75128f421c3bf2aa66c393245df25c6d525a85ced17c2660147abe5bd25ede" diff --git a/pyproject.toml b/pyproject.toml index 6e06ad96..211d0beb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", ] include = ["linkml_runtime"] -requires-python = ">=3.8" +requires-python = ">=3.8,<4.0" dynamic = ["version"] dependencies = [ "click", @@ -59,9 +59,6 @@ linkml-normalize = "linkml_runtime.processing.referencevalidator:cli" requires-poetry = ">=2.0" version = "0.0.0" -[tool.poetry.dependencies] -python = "^3.8" - [tool.poetry.requires-plugins] poetry-dynamic-versioning = ">=1.5.2"