Comments (6)
In GitLab by @manuelma on Jun 14, 2018, 12:50
Here is my idea on how to implement this:
DataConnection
andDataStore
classes have a method calledfind_file
. This method receives a filename and a list of 'visited' items (instances ofDataConnection
andDataStore
).- The
find_file
method first check if theself
instance is in the list of visited items. If yes, it finishes returningNone
. - Then the method checks if the filename is in the
references
ordata
of this item. If yes, it returns the filepath and finishes. - If the file is not in the current item, the method adds the
self
instance to the list of visited items, and use the updated list to call thefind_file
method on all its inputDataConnection
andDataStore
items.
All the Tool
instance needs to do is call the find_file
method on all its input DataConnection
and DataStore
. I see some race conditions where the same file is found by following different paths, but I think that can be handled.
So I will give it a try...
Later on we can extend this idea to look for files also in Tool items output directory, or even to automatically trigger tool execution...
from spine-toolbox.
In GitLab by @manuelma on Jun 14, 2018, 13:54
mentioned in commit 36285e0
from spine-toolbox.
In GitLab by @PekkaSavolainen on Jun 14, 2018, 14:59
Tested this quickly with one 'proxy' data connection and looks like its working. I have to do some more testing but it looks promising.
from spine-toolbox.
In GitLab by @PekkaSavolainen on Aug 6, 2018, 18:22
mentioned in commit 69f2147
from spine-toolbox.
In GitLab by @PekkaSavolainen on Aug 6, 2018, 18:28
Finally tested this some more and I think it works great. Just tested the Data Connection connections but I assume the Data Store connections work the same way. I wanted to change a couple of prints to Event Log and for this I needed to update some methods. This issue is now closed.
from spine-toolbox.
In GitLab by @PekkaSavolainen on Aug 6, 2018, 18:28
closed
from spine-toolbox.
Related Issues (20)
- Hide database name column in DB editor HOT 4
- Change Toolbar format from browser style to ribbon style in DB editor
- The first click on graph view behaves weirdly
- Traceback from entity graph crosshairs
- Getting started HOT 9
- Specfication for new Tools is incorrect
- Help box instead of mouse hover HOT 1
- Replace Item, Spec and Plugin Toolbars HOT 1
- Point and click to add an item to Design View
- Make adding new entities simpler in DB editor HOT 9
- Viewing entities in Entity tree HOT 8
- Allow default alternatives in DB editor HOT 3
- Allow only right dataformat for parameters in DB editor
- Hierarchy of parameters
- Create workflow editor 'user mode'
- 'Manage plugins' window not showing text HOT 1
- Julia Installer wizard does not work in Windows bundle HOT 5
- Bundling SpineOpt and Julia installation inside Toolbox
- Limit the width of items in tree views
- Don't select tree items in db editor when right clicking on them HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spine-toolbox.