gtfierro / reasonable

OWL 2 Reasoner built on DataFrog
BSD 3-Clause "New" or "Revised" License
67 stars 4 forks source link

Adding reasonable as a poetry dependency results in a runtime error during dependency resolution #10

Closed zoopp closed 2 years ago

zoopp commented 2 years ago

I've been trying out some things with brickschema and decided to create a poetry project to manage dependencies. Whenever I try to add brickschema as a dependency using poetry add brickschema[reasonable] or when trying to add reasonable as a dependency with poetry add reasonable I get the following RuntimeError:

poetry add reasonable
Using version ^0.1.49 for reasonable

Updating dependencies
Resolving dependencies... (0.9s)

  RuntimeError

  The Poetry configuration is invalid:
    - 'name' is a required property
    - 'version' is a required property
    - 'description' is a required property

  at ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/core/factory.py:43 in create_poetry
       39│             message = ""
       40│             for error in check_result["errors"]:
       41│                 message += "  - {}\n".format(error)
       42│
    →  43│             raise RuntimeError("The Poetry configuration is invalid:\n" + message)
       44│
       45│         # Load package
       46│         name = local_config["name"]

This happens with both v0.1.49 and v0.1.48 but versions bellow v0.1.48 don't seem to be affected. Could it be that this commit introduced the issue? The pyproject.toml file does look a bit odd but I can't really tell if this is an issue with poetry or reasonable.

Distro: Archlinux Python version: 3.10.1 Poetry version: 1.1.12

gtfierro commented 2 years ago

Thanks for taking the time to file the issue! I think you are right that the commit introduced the issue (not sure why I made that change...)

I've just released v0.1.51 which contains the updated pyproject.toml file. I was able to successfully add it as a dependency to another project, so hopefully that has addressed the issue for you. Let me know!

zoopp commented 2 years ago

Thank you for taking the time to look into it! I can confirm that poetry no longer has issues installing v0.1.51 so this issue is now fixed! :+1:

zoopp commented 2 years ago

I seem to have spoken too early. While the issue with poetry is indeed solved, the package that has been uploaded to pypi is empty. The binary is not getting built nor are there any pre-built wheels available.

gtfierro commented 2 years ago

Looks to be some misconfiguration of the pyo3/maturin stuff; I'll look into this over next couple days!

gtfierro commented 2 years ago

reasonable==0.1.52 should work -- I just successfully added and imported the library to a new Poetry-based project. I forgot I had a special way of doing the multiplatform build, which is now documented in the README.

zoopp commented 2 years ago

Thank you for taking the time to look into this @gtfierro. I've tested things (properly this time) on my end and I can confirm that things work correctly now.