Giter VIP home page Giter VIP logo

Comments (4)

boegel avatar boegel commented on June 25, 2024

Getting this implemented was started by @nudded, and is continued by @boegel, see https://github.com/boegel/easybuild/tree/318-change-toolkit .

from easybuild-framework.

fgeorgatos avatar fgeorgatos commented on June 25, 2024

Hi,

If I understand the topic correctly, I think a simple approach to this one, would be to have a param like --amend:
--amend 'mypython string1' --amend 'mypython string2' --amend 'mypython string3'

which would basically insert the following in place of the EOF of the automatically found .eb template:
[...multiline default eb template...]
string1
string2
string3

That approach would allow generic python code to be placed in there, allowing much extensibility. Example:

--amend "toolkit={'name':'dummy','version':'dummy'}"         # would force using the stock os compiler;
--amend "versionsuffix='"`date "+-%Y%m%d-%H%M"`"'"      # would drop a timestamp as suffix
--amend 'sourceURLs=['"'http://ftp.ntua.gr/pub/gnu/%s'"' % name.lower()]' # alternative source server

Basically all parameters can be appended in there, without having to generate specific code for each one.

If you agree with this approach, then this is related: allow getting .eb info from stdinput (combining the two concepts).

from easybuild-framework.

boegel avatar boegel commented on June 25, 2024

Great suggestion @fgeorgatos! I like it.

I would like to rewrite the easyconfig file in a pretty way though (already implemented), instead of just appending to it and overwriting parameters that way. It would yield very confusing easyconfig files.

Right now, I have added several command line options like --software-version=3.14, --toolkit=ictce,4.0.10, --versionsuffix=mysuff, etc.
I think my current implementation allows to easily support --amend as well, which should probably replace some of the options I've added now.

But maybe not all though. I would try and avoid letting the user supply Python code, e.g. dictionaries or lists, but would rather use a stricter syntax which feels more like shell, if you know what I mean.
E.g. --amend=toolkit-version:4.0.10 and --amend=sourceURLs:http://ftp.ntus.gr/pub/gnu/gcc .

Although that's less flexible, I don't think that's an issue. If a user wants full flexibility, they won't mind writing an easyconfig file imho.

from easybuild-framework.

boegel avatar boegel commented on June 25, 2024

Fixed by #227.

from easybuild-framework.

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.