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

Issue with PortSpecItem ids #693

Closed
dakoop opened this issue Aug 6, 2013 · 1 comment
Closed

Issue with PortSpecItem ids #693

dakoop opened this issue Aug 6, 2013 · 1 comment

Comments

@dakoop
Copy link
Member

dakoop commented Aug 6, 2013

When creating !PortSpecItems (e.g. via a !PortSpec constructor call), the ids for the !PortSpecItems are set to -1 and are never assigned to proper values. The issue is that the !PortSpecItem creation is done inside the !PortSpec construction which means that we don't have a central place to assign ids except in the constructor. We either need to check all !PortSpec constructions or modify the constructor to grab ids from the controller.

@dakoop
Copy link
Member Author

dakoop commented Aug 7, 2013

Fixed on master by commit 16413b4.

@dakoop dakoop self-assigned this Nov 8, 2014
@dakoop dakoop added this to the version 2.1 milestone Nov 8, 2014
dakoop added a commit that referenced this issue Jun 10, 2015
<ticket>#693</ticket>

Because PortSpecItems are created as part of PortSpec construction, they were not being assigned correct ids (from the IdScope objects).  This commit fixes this by spinning through the list of created PortSpecItems and assigning them ids from the corresponding IdScope.  Note that this is not a big deal except for those PortSpecs that may be persisted.

vistrails/core/modules/module_descriptor.py:
  - ModuleDescriptor.new_port_spec: **removed**
  - ModuleDescriptor.add_input_port: **removed**
  - ModuleDescriptor.add_output_port: **removed**

vistrails/core/modules/module_registry.py:
  - ModuleRegistry.create_port_spec: set PortSpecItem ids

vistrails/core/vistrail/controller.py:
  - VistrailController.create_port_spec_static: set PortSpecItem ids
  - VistrailController.add_module_port: set PortSpecItem ids

vistrails/tests/utils.py:
  - execute: assign PortSpecItem ids
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant