Coder Social home page Coder Social logo

Comments (3)

apdavison avatar apdavison commented on August 22, 2024

A proposal for implementing this:

  1. <main_file> (supplied by the --main option to smt run, for example) may be a space-separated list of scripts
  2. smt run may have any number of arguments. These are treated as follows:
    a. test whether the arg is the path to a file. if so, try to interpret it as a parameter file. If this can't be done, it is taken to be a generic "input file", and stored in a new attribute of Record, inputs. We should perhaps store the md5sum of the file as well as its path, to catch the case that a different file is later created with the same name.
    b. any args that look like "param=val" are treated as at present, and added to the parameter file
    c. anything else is assumed to be an argument of the <main_file> script, passed on unchanged during launch, and added to Record.inputs.

I can think of two possibilities for storing inputs:

  1. Put both input files (as datastore.DataFile objects) and script arguments in the same place: Record.inputs
  2. Have separate attributes: Record.input_files and Record.script_arguments

I think option (1) is best, as it preserves the argument order. We can always provide the extra attributes in option (2) as properties giving views of Record.inputs.

We can probably generalize "check if it is a file" to "check if it exists in a DataStore" to support inputs that come from online databases, etc.

Trac comment by apdavison on 07-19-2010 at 16:47

from sumatra.

apdavison avatar apdavison commented on August 22, 2024

Multiple arguments for smt run has been done in [177:6d960b24419c], although I didn't go for the Record.inputs idea in the end since it involved a lot more hassle in the DjangoRecordStore backend to keep the ordering right. Instead we have Record.input_data and Record.script_arguments. The latter is just a string.

Multiple main files remains to do.

Trac comment by apdavison on 07-20-2010 at 19:20

from sumatra.

apdavison avatar apdavison commented on August 22, 2024

Support for multiple main files implemented in [210:2498dcbd8da1], although the implementation is rather simplistic and assumes no spaces in file names.

Trac comment by apdavison on 02-14-2011 at 15:30

from sumatra.

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.