Print the models of app, showing them in a package.
769692
def _print_app(self, app, models):
        
        self._print(self._app_start % app)
        self._print_models(models)
        self._print(self._app_end)
846722
def _write_init_models(self, filenames):
        

        self.write(destination=self.output_directory, filename="__init__.py", template_name="__init_model__.py.tpl",
                   filenames=self._prepare_filenames(filenames),
                   class_prefix=self._class_prefix,
                   product_accronym=self._product_accronym,
                   header=self.header_content)
1100653
function () {
    var packages = [
      'ember-cli-autoprefixer',
      'ember-cli-blanket',
      'ember-cli-sass',
      'ember-cpm',
      'ember-feature-flags',
      'ember-metrics',
      'ember-moment',
      'ember-responsive',
      'ember-route-action-helper',
      'ember-suave',
      'ember-truth-helpers'
    ];

    var updatePrompt = {
      type: 'confirm',
      name: 'answer',
      choices: [
        { key: 'y', name: 'Yes', value: 'yes' },
        { key: 'n', name: 'No', value: 'no' }
      ]
    };

    var prompts = [
      extend({ message: 'Would you like to enhance your ember-cli-opinionated setup?', packages: packages }, updatePrompt),
      // extend({ message: 'Organizing Your App Into Pods', packages: ['ember-cli-sass-pods'] }, updatePrompt),
      extend({ message: 'Analytics/Reports', packages: ['ember-e3'] }, updatePrompt),
      extend({ message: 'Testing', packages: ['ember-cli-mirage', 'ember-sinon-qunit'] }, updatePrompt),
      // extend({ message: 'Internationalization (i18n)', packages: ['ember-intl'] }, updatePrompt),
      extend({ message: 'Mobile Touch', packages: ['ember-gestures'] }, updatePrompt),
      extend({ message: 'Material Design', packages: ['ember-paper'] }, updatePrompt),
      extend({ message: 'Animations', packages: ['liquid-fire'] }, updatePrompt)
    ];

    return this.promptUserForOpinions(packages, prompts);
  }
1100428
public function loadModel()
    {
        $this->model = self::newModel();
        $this->model->loadModel($this->modelPath);
        $this->model->printModel();
        $this->fm = Model::LoadFunctionMap();
    }
598171
def from_apps(cls, apps):
        ""
        app_models = {}
        for model in apps.get_models(include_swapped=True):
            model_state = VersionedModelState.from_model(model)
            app_models[(model_state.app_label, model_state.name.lower())] = model_state
        return cls(app_models)
600560
def generate
      Dir["app/models/*.rb"].each do |path|
        result = File.basename(path).scan(/^(.+)\.rb/)[0][0]
        model = eval(ActiveSupport::Inflector.camelize(result))
        next if model.respond_to?(:abstract_class) && model.abstract_class
        next unless model < ActiveRecord::Base
        @annotations[model] = generate_annotation(model) unless @annotations.keys.include?(model)
      end
    end
1363381
def prepare_model_data(self, packages, linked, pip=None,
                           private_packages=None):
        """"""
        logger.debug('')
        return self._prepare_model_data(packages, linked, pip=pip,
                                        private_packages=private_packages)
551138
def tableToTsv(self, model):
        
        first = True
        for item in model.select():
            if first:
                header = "".join(
                    ["{}\t".format(x) for x in model._meta.fields.keys()])
                print(header)
                first = False
            row = "".join(
                ["{}\t".format(
                    getattr(item, key)) for key in model._meta.fields.keys()])
            print(row)
14491
def _print_single_file(self, path, apps_models):
        
        if path:
            outfile = codecs.open(path, 'w', encoding='utf-8')
            self._print = lambda s: outfile.write(s + '\n')
        self._print(self._diagram_start)
        for app, app_models in apps_models:
            self._print_app(app, app_models)
        self._print(self._diagram_end)
        if path:
            outfile.close()
1317217
def maybe_inspect_zip(models):
    
    '''

    if not(is_zip_file(models)):
        return models

    if len(models) > 1:
        return models

    if len(models) < 1:
        raise AssertionError('No models at all')

    return zipfile.ZipFile(models[0]).namelist()
1299645
def _compile_models(custom_models):
    
    ordered_models = sorted(custom_models.values(), key=lambda model: model.full_name)
    custom_impls = {}

    dependencies = []
    for model in ordered_models:
        dependencies.extend(list(model.dependencies.items()))

    if dependencies:
        dependencies = sorted(dependencies, key=lambda name_version: name_version[0])
        _run_npmjs(["install", "--no-progress"] + [ name + "@" + version for (name, version) in dependencies ])

    for model in ordered_models:
        impl = model.implementation
        compiled = _CACHING_IMPLEMENTATION(model, impl)
        if compiled is None:
            compiled = nodejs_compile(impl.code, lang=impl.lang, file=impl.file)

        if "error" in compiled:
            raise CompilationError(compiled.error)

        custom_impls[model.full_name] = compiled

    return custom_impls
598910
def _print_split_app(self, path, apps_models):
        
        for app, models in apps_models:
            # Convert dir/file.puml to dir/file.app.puml to print to an app specific file
            if self._has_extension(path):
                app_path = re.sub(r'^(.*)[.](\w+)$', r'\1.%s.\2' % app, path)
            else:
                app_path = '%s.%s.puml' % (path, app)

            self._print_single_file(app_path, [(app, models)])
864660
def models(self):
        
        app = get_app(self.__class__.__module__.split('.')[-2])
        return get_models(app)
399229
def printImports(self):
        """"""
        for module in self.listModules():
            print("%s:" % module.label)
            if self.external_dependencies:
                imports = list(module.imports)
            else:
                imports = [modname for modname in module.imports
                           if modname in self.modules]
            imports.sort()
            print("  %s" % "\n  ".join(imports))
568993
def print_results(self):
        """"""
        # Updates
        if self.package_data.get('updates'):
            print('\n{}{}Updates:'.format(c.Style.BRIGHT, c.Fore.BLUE))
            for p in self.package_data['updates']:
                print(
                    '{!s:<20}{}{} {!s:<50}'.format(
                        p.get('action'), c.Style.BRIGHT, c.Fore.CYAN, p.get('output')
                    )
                )

        # Packaging
        print('\n{}{}Package:'.format(c.Style.BRIGHT, c.Fore.BLUE))
        for p in self.package_data['package']:
            if isinstance(p.get('output'), list):
                n = 5
                list_data = p.get('output')
                print(
                    '{!s:<20}{}{} {!s:<50}'.format(
                        p.get('action'), c.Style.BRIGHT, c.Fore.CYAN, ', '.join(p.get('output')[:n])
                    )
                )
                del list_data[:n]
                for data in [
                    list_data[i : i + n] for i in range(0, len(list_data), n)  # noqa: E203
                ]:
                    print(
                        '{!s:<20}{}{} {!s:<50}'.format(
                            '', c.Style.BRIGHT, c.Fore.CYAN, ', '.join(data)
                        )
                    )

            else:
                print(
                    '{!s:<20}{}{} {!s:<50}'.format(
                        p.get('action'), c.Style.BRIGHT, c.Fore.CYAN, p.get('output')
                    )
                )

        # Bundle
        if self.package_data.get('bundle'):
            print('\n{}{}Bundle:'.format(c.Style.BRIGHT, c.Fore.BLUE))
            for p in self.package_data['bundle']:
                print(
                    '{!s:<20}{}{} {!s:<50}'.format(
                        p.get('action'), c.Style.BRIGHT, c.Fore.CYAN, p.get('output')
                    )
                )

        # ignore exit code
        if not self.args.ignore_validation:
            print('\n')  # separate errors from normal output
            # print all errors
            for error in self.package_data.get('errors'):
                print('{}{}'.format(c.Fore.RED, error))
                self.exit_code = 1
1357242
def get_models(args):
    
    if args:
        models = []
        for arg in args:
            match_found = False
            for model in registry.get_models():
                if model._meta.app_label == arg:
                    models.append(model)
                    match_found = True
                elif '%s.%s' % (model._meta.app_label, model._meta.model_name) == arg:
                    models.append(model)
                    match_found = True

            if not match_found:
                raise ValueError("No model or app named %s" % arg)
    else:
        models = registry.get_models()

    return set(models)
934172
def run(self):
        
        self.msg.resolving()
        self.repositories()
        if self.find_pkg:
            self.dependencies_list.reverse()
            self.requires = Utils().dimensional_list(self.dependencies_list)
            self.dependencies = Utils().remove_dbs(self.requires)
            if self.dependencies == []:
                self.dependencies = ["No dependencies"]
            if "--graph=" in self.flag:
                self.deps_tree()
            self.msg.done()
            pkg_len = len(self.name) + 24
            print("")    # new line at start
            self.msg.template(pkg_len)
            print("| Package {0}{1}{2} dependencies :".format(
                self.cyan, self.name, self.endc))
            self.msg.template(pkg_len)
            print("\\")
            print(" +---{0}[ Tree of dependencies ]{1}".format(self.yellow,
                                                               self.endc))
            index = 0
            for pkg in self.dependencies:
                if "--check-deps" in self.flag:
                    used = self.check_used(pkg)
                    self.deps_used(pkg, used)
                    used = "{0} {1}{2}{3}".format(
                        "is dependency -->", self.cyan,
                        ", ".join(used), self.endc)
                else:
                    used = ""
                index += 1
                installed = ""
                if find_package(pkg + self.meta.sp, self.meta.pkg_path):
                    if self.meta.use_colors in ["off", "OFF"]:
                        installed = "* "
                    print(" |")
                    print(" {0}{1}: {2}{3}{4} {5}{6}".format(
                        "+--", index, self.green, pkg,
                        self.endc, installed, used))
                else:
                    print(" |")
                    print(" {0}{1}: {2}{3}{4} {5}".format(
                        "+--", index, self.red, pkg,
                        self.endc, installed))
            if self.meta.use_colors in ["off", "OFF"]:
                print("\n * = Installed\n")
            else:
                print("")    # new line at end
            if "--graph=" in self.flag:
                self.graph()
        else:
            self.msg.done()
            print("\nNo package was found to match\n")
            raise SystemExit(1)