Skip to content

Conversion and test of an empty Component Definition #315

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

Merged
merged 18 commits into from
Apr 29, 2025

Conversation

fxbuson
Copy link
Collaborator

@fxbuson fxbuson commented Apr 17, 2025

Following from discussions on Harmony 2025 and issue #283, I made some changes to handle URIs in SBOL compliant files.

Main points:

  • If an SBOL2 object has a version, we should move it to the middle of the URI in SBOL3, following the format <namespace>/<sbol2_version>/<collection + local>/<displayId>
  • Also, the object should have a backport#sbol2_version to store the information of the URI change
  • On the conversion back from SBOL3, the "/<version>" is stripped from the middle of the URI and added to the end
  • This was packaged into two functions (_sbol2_identity() and _sbol3_identity), which is now referenced in the visitors for [SBOL3]Component and [SBOL2]Conponent Definition, respectively

This PR also handles a minor error that showed up when converting objects with namespace = None. I just check if there is a namespace list before going through it.

The conversion of Collection and Implementation is now outdated and untested, which will be recovered in a later PR.

fxbuson added 11 commits April 16, 2025 16:36
pySBOL2 can make objects without namespaces
Shouldn't assume they will have a namespaces list
Made a function to handle identities
Changed how that is handled back and forth for Component Definitions
Added test and test file for ComponentDefinition.
I don't know why this wasn't commited earlier
Need to strip the version from persistent identity after creating the object
Restored test with new minimal file for collection
After completing converter code, there is still some things you need to do
Adapted existing implementation file since we don't have a SBOL Notebooks version
@fxbuson fxbuson added enhancement New feature or request sbol-converter labels Apr 17, 2025
@fxbuson fxbuson added this to the Python SBOL2-3 Converter milestone Apr 17, 2025
@fxbuson fxbuson requested a review from jakebeal April 17, 2025 10:37
@fxbuson fxbuson self-assigned this Apr 17, 2025
Copy link
Contributor

@jakebeal jakebeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basic works looks solid; a few improvements are needed before merge.

Copy link
Contributor

@PrashantVaidyanathan PrashantVaidyanathan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Copy link
Contributor

@jakebeal jakebeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work and almost here - it just needs the three missing .nt files added for the tests and I think we're good to go.

Files were generated by running the converter on this commit (all tests were passing)
@fxbuson fxbuson requested a review from jakebeal April 29, 2025 17:09
@jakebeal jakebeal merged commit c3e1469 into develop Apr 29, 2025
18 checks passed
@jakebeal jakebeal deleted the Felipe/issue-283 branch April 29, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sbol-converter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants