Giter Club home page Giter Club logo

universal-build's People

Contributors

github-actions[bot] avatar jankalkan avatar jnkielmann avatar lukasmasuch avatar raethlein avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

universal-build's Issues

Flags defined with underscores are not passed correctly to submodules

Describe the bug:
I have a project with submodules, it could be think as:

build.py
|  submodule/
|    |   build.py

I defined an argument with using an underscore in the name in both build.py

parser.add_argument(
    "--my_token" 
)

When the submodule is called from the parent, it is called with an argument --my-token which is not detected by the submodule.

Expected behaviour:
The names fo the arguments shouldn't be changed between when the parent and the submodule.

Steps to reproduce the issue:

Technical details:

  • Host Machine OS (Windows/Linux/Mac):
  • Browser (Chrome/Firefox/Safari):

Possible Fix:
The replacement of _ to - is here:

cli_arg_name = str(arg).replace("_", "-")

Additional context:

Creation of undesirable folders and deletion of source files when using build_utils.copy

I have the following structure:

build.py
|  src/
|  |  myfile.txt

And in build.py I have the following code:

from universal_build import build_utils

build_utils.copy(
    src_path="./src",
    target_path="./target/",
    preserve_target=True,
)

When the code is run, I expect the following structure:

build.py
|  src/
|  |  myfile.txt
|  target/
|  |  myfile.txt

However I have the following structure:

build.py
|  src/
|  target/
|  |  myfile.txt/
|  |  |  myfile.txt

Two things happened that I didn't expect:

  • The source file is deleted
  • There is an intermediate folder with the name of the file

Issue number one I suspect comes from the use of move instead of copy here:

shutil.move(str(file), target_file_path)

If this is expected then the documentation could be adjusted as it is stated that the src parameter is "source path to duplicate"

Issue number two I believe comes from this line:

path.mkdir(parents=True, exist_ok=True)

I think a change to the parent should fix the issue but hasn't been tested.

path.parent.mkdir(parents=True, exist_ok=True)

Running apt-get update in image causes error due to expired Let's Encrypt certificate.

Describe the bug:
When using the build-environment docker image as a base image and then running apt-get update it leads to the following error:
E: The repository 'https://deb.nodesource.com/node_14.x focal Release' does not have a Release file.

Steps to reproduce the issue:
Try to build the following dockerfile:

FROM mltooling/build-environment:0.6.15
RUN apt-get update

Possible Fix:
Looks like this could be due to the expired Let's Encrypt root certificate:
nodesource/distributions#1266
In that issue it is suggested to update the ca-certificates package.
This package is already installed in the build environment, so a docker build with --no-cache might already solve the problem.

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.