Git Product home page Git Product logo

Comments (6)

steppi avatar steppi commented on June 16, 2024 2

cc @Carreau, @martinRenou, @jtpio, @matthewfeickert

from jupyterlite.

bollwyvl avatar bollwyvl commented on June 16, 2024

You might be able to use the doit -- "plumbing" CLI option:

jupyter lite doit --log-level ERROR -- --verbosity 0 --reporter zero build

There are still a fair number of print statements, however, which are not covered by the above settings

from jupyterlite.

steppi avatar steppi commented on June 16, 2024

You might be able to use the doit -- "plumbing" CLI option:

jupyter lite doit --log-level ERROR -- --verbosity 0 --reporter zero build

There are still a fair number of print statements, however, which are not covered by the above settings

Thanks! I’ll try that. I was about to open a separate issue for the print statements. My thought was maybe to use the logger there instead, but set the handler to omit all but the message so that the output looks the same.

from jupyterlite.

steppi avatar steppi commented on June 16, 2024

The doit -- plumbing options seemed to not help unfortunately.

I changed the invocation of jupyter lite build in jupyterlite-sphinx from

        command = [
            "jupyter",
            "lite",
            "build",
            *config,
            *contents,
            "--contents",
            os.path.join(app.srcdir, CONTENT_DIR),
            "--output-dir",
            os.path.join(app.outdir, JUPYTERLITE_DIR),
            *apps_option,
            "--lite-dir",
            jupyterlite_dir,
            "--log-level",
            "WARN",
        ]

        subprocess.run(command, cwd=app.srcdir, check=True)

to

        command = [
            "jupyter",
            "lite",
            "build",
            *config,
            *contents,
            "--contents",
            os.path.join(app.srcdir, CONTENT_DIR),
            "--output-dir",
            os.path.join(app.outdir, JUPYTERLITE_DIR),
            *apps_option,
            "--lite-dir",
            jupyterlite_dir,
            "--log-level",
            "WARN",
            "doit",
            "--",
            "--verbosity",
            "0",
            "--reporter",
            "zero"
        ]

        subprocess.run(command, cwd=app.srcdir, check=True)

with no impact on the output.

It seems like the plumbing options only apply for the LiteRawDoItApp, which isn't used for the tasks printing these messages. Making the LiteDoItApp respect doit plumbing options in CLI seems like it could be a reasonable fix.

and it didn't work because I put things in the incorrect order. See below.

from jupyterlite.

steppi avatar steppi commented on June 16, 2024

Sorry, nevermind. I got it to work. I guess the order is very important. What I'd written earlier is just the first permutation that that didn't error out when I built. Here's the winning permutation:

        command = [
            "jupyter",
            "lite",
            "doit"
            "build",
            *config,
            *contents,
            "--contents",
            os.path.join(app.srcdir, CONTENT_DIR),
            "--output-dir",
            os.path.join(app.outdir, JUPYTERLITE_DIR),
            *apps_option,
            "--lite-dir",
            jupyterlite_dir,
            "--log-level",
            "WARN",
            "--",
            "--verbosity",
            "0",
            "--reporter",
            "zero",
        ]

        subprocess.run(command, cwd=app.srcdir, check=True)

Thanks for the help!

from jupyterlite.

steppi avatar steppi commented on June 16, 2024

@bollwyvl, reopening because the command above didn't actually work. The output was only suppressed because the command is broken. It seems like it will actually be necessary to make doit configurable within jupyterlite.

from jupyterlite.

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.