Coder Social home page Coder Social logo

Comments (6)

spine-o-bot avatar spine-o-bot commented on May 27, 2024

In GitLab by @manuelma on Jun 14, 2018, 12:50

Here is my idea on how to implement this:

  1. DataConnection and DataStore classes have a method called find_file. This method receives a filename and a list of 'visited' items (instances of DataConnection and DataStore).
  2. The find_file method first check if the self instance is in the list of visited items. If yes, it finishes returning None.
  3. Then the method checks if the filename is in the references or data of this item. If yes, it returns the filepath and finishes.
  4. 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 the find_file method on all its input DataConnection and DataStore 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.

spine-o-bot avatar spine-o-bot commented on May 27, 2024

In GitLab by @manuelma on Jun 14, 2018, 13:54

mentioned in commit 36285e0

from spine-toolbox.

spine-o-bot avatar spine-o-bot commented on May 27, 2024

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.

spine-o-bot avatar spine-o-bot commented on May 27, 2024

In GitLab by @PekkaSavolainen on Aug 6, 2018, 18:22

mentioned in commit 69f2147

from spine-toolbox.

spine-o-bot avatar spine-o-bot commented on May 27, 2024

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.

spine-o-bot avatar spine-o-bot commented on May 27, 2024

In GitLab by @PekkaSavolainen on Aug 6, 2018, 18:28

closed

from spine-toolbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.