Giter VIP home page Giter VIP logo

Comments (7)

psss avatar psss commented on July 17, 2024

I can imagine we could provide a metadata write feature which could do one of the following three levels of the scatteredness (not sure about how we should handle overwriting existing files):

  1. One huge main.fmf file containing the whole metadata tree
  2. One main.fmf file plus additional object.fmf files in a single directory
  3. Separate main.fmf file for each metadata object, directories created as necessary

But what is the exact use case here? Do you expect some big batch changes in metadata? Would something like this be used often? Not sure it is worth to implement it.

from fmf.

jscotka avatar jscotka commented on July 17, 2024

Yep, exactly that is also my idea to use these tree base formats.
Would works similar to similar tools like autopep8 what formats your code to better style or helps you for example to transform your mismatch code in one single place to separated files in case you would like to rewrite it to more complex scenarios.

If it is often scenario hard to say. Also some tool what helps you generate metadata from another format can use it. like beakerlib format.

from fmf.

AloisMahdal avatar AloisMahdal commented on July 17, 2024

I think that good rule of thumb is: if you can make use of a tool that generates the meta-data for you automatically, then, well, do you really need the data in the first place? I understand why there could be use case fo some basic templaing, like generating test dir, but what kind of structure to use should be project-specific and wokflow-specific decision.

Ie. it should not be job of fmf but job of some wizard tool that is developed for the given project.

(Just my 2 satoshis.)

from fmf.

psss avatar psss commented on July 17, 2024

I think the fmf init use case mentioned in #26 makes a good sense. I can imagine we could even provide fmf init --examples which would populate the initialized metadata tree with a sample skeleton of metadata. Honza, would you be ok to, as the first step, limit scope of this issue for these two features?

from fmf.

jscotka avatar jscotka commented on July 17, 2024

@psss yep, exacly. it is my idea and this transforming could be now forgotten, because noone is directly interested.

And we can use this issue for this init and template generator

Maybe it could be more clever and for example generate this tree structure based on directories and files inside, like I can imagine, that:

.
├── sanity1
│   └── runtest.sh
└── sanity2
    └── script.sh

and tooling like fmf init --element=test="glob.glob('*.sh')[0]" --element=tags="'[sanity]'" can produce main.fmf
with content like:

/sanity1
  test: runtest1.sh
  tags: [sanity]
/sanity2
  test: script1.sh
  tags: [sanity]

it is very pythonish and very powerful generator ;-)

from fmf.

psss avatar psss commented on July 17, 2024

Interesting example with the glob matching. For the start I would suggest to only support some static skeleton, something similar you get when you call beaker-wizard -yf.

from fmf.

jscotka avatar jscotka commented on July 17, 2024

I've implemented it via #46

from fmf.

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.