INNER CODE UNIT · Python

_run_path

python-bonobo/bonobo · bonobo/commands/run.py:28

    def _run_path(self, file):
        # add install logic
        if self.install:
            if os.path.isdir(file):
                requirements = os.path.join(file, "requirements.txt")
            else:
                requirements = os.path.join(os.path.dirname(file), "requirements.txt")
            _install_requirements(requirements)

        return super()._run_path(file)

    def _run_module(self, mod):
        # install not implemented for a module, not sure it even make sense.
        if self.install:
            raise RuntimeError("--install behaviour when running a module is not defined.")

        return super()._run_module(mod)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…