MCPcopy Create free account
hub / github.com/conda/constructor / _build_message

Method _build_message

constructor/main.py:503–543  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

501 parser.exit()
502
503 def _build_message(self):
504 msg = dedent(
505 """
506 The 'construct.yaml' specification
507 ==================================
508
509 constructor version {version}
510
511 The `construct.yaml` file is the primary mechanism for controlling
512 the output of the Constructor package. The file contains a list of
513 key/value pairs in the standard YAML format.
514
515 Available keys
516 --------------
517
518 {available_keys}
519
520 Available selectors
521 -------------------
522 Constructor can use the same Selector enhancement of the YAML format
523 used in conda-build ('# [selector]'). Available keywords are:
524
525 {available_selectors}
526 """
527 )
528 available_keys = [f"> Check full details in {SCHEMA_PATH}", ""]
529 schema = json.loads(SCHEMA_PATH.read_text())
530 for name, prop in schema["properties"].items():
531 if prop.get("deprecated"):
532 continue
533 available_keys.append(f"{name}")
534 available_keys.append("·" * len(name))
535 available_keys.append(prop.get("description", "No description found."))
536 available_keys.append("")
537
538 available_selectors = [f"- {sel}" for sel in sorted(ns_platform(sys.platform).keys())]
539 return msg.format(
540 version=__version__,
541 available_keys="\n".join(available_keys),
542 available_selectors="\n".join(available_selectors),
543 )
544
545
546def main(argv=None):

Callers 1

__call__Method · 0.95

Calls 3

ns_platformFunction · 0.85
getMethod · 0.80
read_textMethod · 0.45

Tested by

no test coverage detected