def to_experiment()

in opmon/experimenter.py [0:0]


    def to_experiment(self) -> "Experiment":
        """Convert to Experiment."""
        return Experiment(
            normandy_slug=self.slug,
            experimenter_slug=None,
            name=self.userFacingName,
            type="v6",
            status=(
                "Live"
                if (
                    self.endDate
                    and pytz.utc.localize(self.endDate) >= pytz.utc.localize(dt.datetime.now())
                )
                or self.endDate is None
                else "Complete"
            ),
            start_date=pytz.utc.localize(self.startDate) if self.startDate else None,
            end_date=pytz.utc.localize(self.endDate) if self.endDate else None,
            branches=self.branches,
            reference_branch=self.referenceBranch,
            app_name=self.appName,
            app_id=self.appId,
            boolean_pref=None,
            channel=(
                Channel(self.channel) if self.channel and Channel.has_value(self.channel) else None
            ),
            is_rollout=self.isRollout if self.isRollout else (len(self.branches) == 1),
        )