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)
- Can't add entities to a class that was just unhidden
- Fix conflicts between non-committed and external changes
- Main Toolbar's Edit specification action doesn't do anything
- Sorting of parameter value pane
- Get Database editor documentation up-to-date with the new entity stuff
- Closing and reopening DB Editor should reload the database HOT 8
- Importing SpineOpt template not working in 0.7 HOT 1
- WSL Package not installed HOT 4
- Undoing after rollback doesn't update Scenario tree HOT 7
- DB editor doesn't load entities when opened
- DB editor does not add new classes if they are empty HOT 8
- Strange significant digits when importing HOT 8
- Importer File Selection resets everytime after closing, ignores project.json config HOT 5
- "Add entities" in treeview should offer only relevant entities
- Group member expansion not showing entity names
- Option to sort entity classes by dimensionality HOT 1
- Show the ID of a class icon and colour in DB Editor HOT 1
- Managing elements for 0-dimensional entity classes
- New added entity class changes dimension after opening Toolbox again HOT 5
- DB editor item doesn't come back and causes a Traceback after commit and redo HOT 1
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.