MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / from_arguments

Method from_arguments

misc/python/materialize/mzbuild.py:1653–1678  ·  view source on GitHub ↗

Construct a repository from command-line arguments. The provided namespace must contain the options installed by `Repository.install_arguments`.

(cls, root: Path, args: argparse.Namespace)

Source from the content-addressed store, hash-verified

1651
1652 @classmethod
1653 def from_arguments(cls, root: Path, args: argparse.Namespace) -> "Repository":
1654 """Construct a repository from command-line arguments.
1655
1656 The provided namespace must contain the options installed by
1657 `Repository.install_arguments`.
1658 """
1659 if args.release:
1660 profile = Profile.RELEASE
1661 elif args.optimized:
1662 profile = Profile.OPTIMIZED
1663 elif args.dev:
1664 profile = Profile.DEV
1665 else:
1666 profile = (
1667 Profile.RELEASE if ui.env_is_truthy("CI_LTO") else Profile.OPTIMIZED
1668 )
1669
1670 return cls(
1671 root,
1672 profile=profile,
1673 coverage=args.coverage,
1674 sanitizer=args.sanitizer,
1675 image_registry=args.image_registry,
1676 image_prefix=args.image_prefix,
1677 arch=args.arch,
1678 )
1679
1680 @property
1681 def root(self) -> Path:

Callers 4

mainFunction · 0.80
load_compositionFunction · 0.80
runMethod · 0.80
runMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected