Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move bioregistry to extras so that OAK is compatible with pydantic v2 #628

Closed
1 of 3 tasks
cmungall opened this issue Aug 4, 2023 · 6 comments
Closed
1 of 3 tasks

Comments

@cmungall
Copy link
Collaborator

cmungall commented Aug 4, 2023

Oh, the wonderful world of python package dependencies. This is the only thing I don't miss about java.

llm uses pydantic2. OntoGPT will use llm and oak. oak uses pydantic1 indirectly via

  • linkml-runtime
  • bioregistry indirectly via
    • sssom
    • kgcl

We have a rc for linkml (see linkml/linkml#1545)

It looks like there is no plan to move to v2 from bioregistry in the short term biopragmatics/bioregistry#899 (comment)

I think we should be able to move to bioregistry being an extra. For most runtime use cases there is no need for external prefix lookup.

It looks like curies also requires <2:

https://github.com/cthoyt/curies/blob/859362f27bc9aec3f254d0122351341ca65bcab4/setup.cfg#L56

But expand/contract via a dict should be possible to do natively

@matentzn
Copy link
Contributor

matentzn commented Aug 4, 2023

What bioregistry functionality does oak need beside curies?

@matentzn
Copy link
Contributor

matentzn commented Aug 4, 2023

And why does curies have a pydantic dependency? Maybe configure as "extra"?

@caufieldjh
Copy link
Collaborator

curies uses pydantic to define classes for its API but not internally, as far as I can tell. If it's too much of a lift for bioregistry to move to pydantic 2 then maybe curies alone can be compatible with both

cmungall added a commit that referenced this issue Aug 4, 2023
@cmungall
Copy link
Collaborator Author

cmungall commented Aug 4, 2023

PR for curies here:

@matentzn - good point. In fact oak only has indirect dependency on bioregistry, I will update the original comment

@cmungall
Copy link
Collaborator Author

cmungall commented Aug 7, 2023

OK, we are good with curies.

We have a problem right now in that it's easy to get into a broken state:

  • pydantic > 2
  • older version of bioregistry prior to bioregistry pinning pydantic

Until bioregistry is compatible with both, we need to either pin pydantic < 2 or pin bioregistry to a version after bioregistry pinned pydantic

cmungall added a commit that referenced this issue Aug 7, 2023
cmungall added a commit that referenced this issue Aug 7, 2023
…628 Bumping semsimian to 0.1.20 (#630)

* Pinning pydantic to be <2 until we are sure the full stack works. See #628
Bumping semsimian to 0.1.20

* pinning semsimian to 1.18
cmungall added a commit that referenced this issue Aug 7, 2023
I believe the reason we had this was because an upstream was
not correctly pinning and we had incompatibilities.

Note we still have transitive dependencies from kgcl and sssom

See #628
cmungall added a commit to INCATools/kgcl that referenced this issue Aug 7, 2023
See INCATools/ontology-access-kit#628

Note that we still need KGCL to have a more explicit
prefix management strategy
cmungall added a commit to INCATools/kgcl that referenced this issue Aug 7, 2023
See INCATools/ontology-access-kit#628

Note that we still need KGCL to have a more explicit
prefix management strategy
cmungall added a commit that referenced this issue Aug 8, 2023
* Removing direct boregistry dependency as it was not used.

I believe the reason we had this was because an upstream was
not correctly pinning and we had incompatibilities.

Note we still have transitive dependencies from kgcl and sssom

See #628

* Removing bioregistry and updating dependencies to use pydantic version-neutral

See #628

* Pydantic version neutral

* use non-rc

* latest sssom

sidesteps Harold-Solbrig/funowl#60

* use latest version of funowl which no longer pings rdflib to 6.2.x
@cmungall
Copy link
Collaborator Author

cmungall commented Dec 5, 2023

Fixed

@cmungall cmungall closed this as completed Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants