Closed jakebeal closed 2 years ago
This is a good question, and one we have bumped into before: what is the relationship between pySBOL3 and SBOL-utilties?
We sometimes choose to keep pySBOL3 to the data model itself without the convenience layer built on top. SBOL-utilities has been providing that convenience layer. I like this model. We've also talked about letting features gel in SBOL-utilities and then eventually "promoting" them to pySBOL3, or absorbing them into the core.
On the other hand, sometimes features are core to the use of SBOL3 and should be available in pySBOL3. In these cases we should figure out how to gracefully put them in pySBOL3.
I'm not sure where the identity building utilities should lie. All TopLevel
objects need them, and generating anything more than trivial structures means machine generating the identities. So I can see this being handy to have in pySBOL3. But I think of pySBOL3 as mostly the classes, and not too many functions. And through this lens it feels more like SBOL-utilities is a good place to put such functions. In short, I don't know where these would best reside. I could go either way.
Internally, pySBOL3 tries to make use of posixpath
to manipulate identities so the slashes go the right way regardless of which OS pySBOL3 is running on. You'll find uses of posixpath.join
and posixpath.sep
in the source code for manipulating identities.
My inclination, given something of ambiguous placement, would be to start with it in SBOL-utilities, as it's easier to promote something to the core than to deprecate it away from the core.
Would the proposed helpers have utility to pySBOL3 itself? Surely pySBOL is performing similar operations internally to build URIs.
As in resolving #343, I think that simply using the proper URL library is the right call here (see: SynBioDex/SBOL-specification/issues/476)
I've run into a number of little bugs involving identity construction, particularly regarding
/
characters at the end of segments. It would be good to have some helpers that help avoid this, just asos.path
has safe helpers for path construction.Should these go in pySBOL3 or sbol-utilities?