Git Product home page Git Product logo

Comments (8)

sopos avatar sopos commented on September 8, 2024

A variable BEAKERLIB_LIBRARIES will be used to define custom locations.

current state:
the library is defined by a component and a library name, it is written in format <component>/<library name> and it must be located in a directory <component>/Library/<library name>

BEAKERLIB_LIBRARIES is a space-separated list of following references:

I will be using library my-comp/basic-1 as an illustrative example

  1. reference to a common place for library repos:
    URL(s) to clone <URL>/<LIBRARY>, LIBRARY here cannot contain slash (/) and other special characters so they are replaced by dashes (-), thus the actual library repo is -e.g. URLhttps://github.com/beakerlib-libraries` and library would be actually located in https://github.com/beakerlib-libraries/my-comp-basic-1

  2. reference of a single library in dedicated repo
    (LIBRARY)URL
    e.g. (my-comp/basic-1)https://github.com/beakerlib-libraries/my-comp-basic-1

  3. reference of a library inside of a general repo
    (LIBRARY)URL
    e.g. (my-comp/basic-1)https://github.com/some/repo/raw/master/libraries/my-comp-basic-1.yaml

from beakerlib.

sopos avatar sopos commented on September 8, 2024

While I was experimenting with git I found out that if I try to clone non-existing repo git asks for credentials. This needs to be somehow worked around as it is quite expected scenario.

edit:
This might be overcome using svn or direct download of the archive bug it differs per provider.

edit2:
an idea: A mandatory file in the library's root with library identification and other data might be used. There might be instructions how and what to download if the direct method is going to be used.
Personally I would prefer direct download as we could omit git as a dependency but then downloading more complex structures might be an issue. Or there might be provides-specific link to the archive. Actually there might be more possible ways as a fall-back mechanism.

from beakerlib.

sopos avatar sopos commented on September 8, 2024

A variable BEAKERLIB_LIBRARIES will be used to define custom locations.

current state:
the library is defined by a component and a library name, it is written in format <component>/<library name> and it must be located in a directory <component>/Library/<library name>

BEAKERLIB_LIBRARIES is a space-separated list of following references:

I will be using library my-comp/basic-1 as an illustrative example

1. reference to a common place for library repos:
   URL(s) to clone `<URL>/<LIBRARY>, LIBRARY here cannot contain slash (/) and other special characters so they are replaced by dashes (-), thus the actual library repo is `-`e.g. URL`[https://github.com/beakerlib-libraries`](https://github.com/beakerlib-libraries%60) and library would be actually located in `https://github.com/beakerlib-libraries/my-comp-basic-1`

2. reference of a single library in dedicated repo
   (LIBRARY)URL
   e.g. `(my-comp/basic-1)https://github.com/beakerlib-libraries/my-comp-basic-1`

3. reference of a library inside of a general repo
   (LIBRARY)URL
   e.g. `(my-comp/basic-1)https://github.com/some/repo/raw/master/libraries/my-comp-basic-1.yaml`

Actually I have probably better and more generic way to describe the reference now, see next comment.

from beakerlib.

sopos avatar sopos commented on September 8, 2024

Actually only one common pattern to describe all three reference variants and more.

(library regexp pattern)URL

a special keyword LIBRARY in the reference would be substituted by the actual LIBRARY (with dashes)

e.g.

  1. reference to a common place for library repos
(.*)https://github.com/beakerlib-libraries/LIBRARY/raw/master/lib.yaml
  1. reference of a single library in dedicated repo
(my-comp/basic-1)https://github.com/beakerlib-libraries/my-comp-basic-1/raw/master/lib.yaml
  1. reference of a library inside of a general repo
(my-comp/basic-1)https://github.com/some/repo/raw/master/libraries/my-comp-basic-1.yaml
  1. reference more libraries inside of a general repo
(my-comp/basic-1|my-comp/basic-2)https://github.com/some/repo/raw/master/libraries/LIBRARY.yaml

Basically when looking for a library the URL would be considered if the LIBRARY matches the regexp pattern, otherwise it would be just wasting of time.

The yaml file should contain an information how to get whole library, where it is located inside the repo (branch, tag, commit, path). Currently, I'm thinking of just a link to the archive and links to raw files, but it might be extended in the future by other methods.
The advantage of this solution is that there is no need for further dependencies for beakerlib.

from beakerlib.

sopos avatar sopos commented on September 8, 2024

To allow to dive the library down into the component's repo it would make sense to define COMPONENT and NAME which would act as LIBRARY=COMPONENT/NAME.

from beakerlib.

sopos avatar sopos commented on September 8, 2024

format of the definition yaml file:

url:
base_url:
files:

url - reference to a single file (complete url)
base_url - a URL to be used together with files
files - array of items to be added to base_url to construct the final URL for a download

example 1:

url: https://github.com/some/repo/raw/master/lib.sh

example 2:

base_url: https://github.com/some/repo/raw/master/
files:
  - lib.sh
  - Makefile
  - additional_files/x
  - additional_files/y

note that Makefile might be necessary in case of other libraries required

from beakerlib.

sopos avatar sopos commented on September 8, 2024

another key requires and/or requires_lib might be added to somehow express the library requirements

from beakerlib.

sopos avatar sopos commented on September 8, 2024

actually, this is not needed anymore as it is prepared by the schedulers, like tmt

from beakerlib.

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.