Sha256: 8dee7bdc375adc44add06b6d93300b433dd593eadcb5b681df9a4930e7555e58

Contents?: true

Size: 888 Bytes

Versions: 1

Compression:

Stored size: 888 Bytes

Contents

module LearnOpen
  module Environments
    class JupyterContainerEnvironment < BaseEnvironment
      def open_jupyter_lab(lesson, location, editor)
        download_lesson(lesson, location)
        open_editor(lesson, location, editor)
        start_file_backup(lesson, location)
        install_jupyter_dependencies(lesson, location)
        notify_of_completion
        open_shell
      end

      def open_editor(lesson, location, editor)
        io.puts "Opening lesson..."
        system_adapter.change_context_directory(lesson.to_path)
        system_adapter.open_editor(editor, path: ".")
      end

      def install_jupyter_dependencies(lesson, location)
        LearnOpen::DependencyInstallers::JupyterPipInstall.call(lesson, location, self, options)
      end

      def open_shell
        system_adapter.open_login_shell(environment_vars['SHELL'])
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
learn-open-1.2.21 lib/learn_open/environments/jupyter_container_environment.rb