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

Combinatorial Derivation non-standard class init #362

Open
JMante1 opened this issue Dec 22, 2021 · 2 comments
Open

Combinatorial Derivation non-standard class init #362

JMante1 opened this issue Dec 22, 2021 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@JMante1
Copy link

JMante1 commented Dec 22, 2021

Currently, most of the top-level objects only require an identity to initiate but combinatorial derivation requires the template as well. Is it possible to change the way combinatorial derivations are initiated so that only an identity is required and the template can be set in a separate call?

@JMante1 JMante1 added the question Further information is requested label Dec 22, 2021
@tcmitchell
Copy link
Collaborator

template is a required attribute of CombinatorialDerivation, which is why it is required in the constructor. This behavior is consistent across all pySBOL3 objects. Attributes that are required in the specification are required in the constructors. Objects that do not have any required attributes according to the specification only require an identity in their constructor.

For example, the Component constructor requires at least one type. An example of a non-TopLevel object that requires attributes to be provided to the constructor is ExternallyDefined which requires both a type and a definition in the constructor.

Internally we work around this constraint by providing a dummy value to the constructor. You can see an example of this in function build_combinatorial_derivation. There are many other examples of these functions in the pySBOL3 source code.

@tcmitchell
Copy link
Collaborator

It's been about a month with no activity on this issue. Has the question been answered? Is there any additional information needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants