Repository: Avaiga/taipy
File: taipy/core/cycle/cycle.py (Python)

Code before:
        production plan to be published. Each month is modeled as a cycle, and each cycle
        can contain one or more scenarios.

        The picture on the left shows the tree of entities: Cycles, Scenarios, and their
        associated Sequence(s). There is an existing past cycle for December and a current
        cycle for January containing a single scenario.

    When comes the end of a _cycle_ (start date + duration), only one of the scenarios is
    applied in production. This "official" scenario is called the _**primary scenario**_.
    Only one _**primary scenario**_ per cycle is allowed.

    !!! example "Example for February cycle"

        ![cycles](../pic/cycles_colored.svg){ align=left width="250" }
        Now the user starts working on the February work cycle. He or she creates two
        scenarios for the February cycle (one with a low capacity assumption and one with
        a high capacity assumption). The user can then decide to elect the low capacity
        scenario as the "official" scenario for February. To accomplish that, he just
        needs to promote the low capacity scenario as _**primary**_ for the February cycle.

        The tree of entities resulting from the various scenarios created is represented
        in the picture on the left. The underlined scenarios are _**primary**_.

    !!! note

        Note that cycles are optional. If a scenario has no Frequency, it will not be
        attached to any cycle.

    """

    _ID_PREFIX = "CYCLE"
    __SEPARATOR = "_"
    _MANAGER_NAME = "cycle"

    def __init__(
        self,
        frequency: Frequency,
        properties: Dict[str, Any],
        creation_date: datetime,
        start_date: datetime,
        end_date: datetime,
        name: Optional[str] = None,
        id: Optional[CycleId] = None,
    ) -> None:
        self._frequency = frequency
        self._creation_date = creation_date
        self._start_date = start_date
        self._end_date = end_date
        self._name = self._new_name(name)
        self.id = id or self._new_id(self._name)
        self._properties = _Properties(self, **properties)

Review comment (suggestion):
We're already in a Note block

```suggestion
        For a scenario, cycles are optional. If a scenario has no Frequency, it will not be
```

Code after:
        different scenarios until only one of those scenarios is selected as the official
        production plan to be published. Each month is modeled as a cycle, and each cycle
        can contain one or more scenarios.

        The picture on the left shows the tree of entities: Cycles, Scenarios, and their
        associated Sequence(s). There is an existing past cycle for December and a current
        cycle for January containing a single scenario.

    When comes the end of a _cycle_ (start date + duration), only one of the scenarios is
    applied in production. This "official" scenario is called the _**primary scenario**_.
    Only one _**primary scenario**_ per cycle is allowed.

    !!! example "Example for February cycle"

        ![cycles](../pic/cycles_colored.svg){ align=left width="250" }
        Now the user starts working on the February work cycle. He or she creates two
        scenarios for the February cycle (one with a low capacity assumption and one with
        a high capacity assumption). The user can then decide to elect the low capacity
        scenario as the "official" scenario for February. To accomplish that, he just
        needs to promote the low capacity scenario as _**primary**_ for the February cycle.

        The tree of entities resulting from the various scenarios created is represented
        in the picture on the left. The underlined scenarios are _**primary**_.

    !!! note

        For a scenario, cycles are optional. If a scenario has no Frequency, it will not be
        attached to any cycle.

    """

    _ID_PREFIX = "CYCLE"
    __SEPARATOR = "_"
    _MANAGER_NAME = "cycle"

    def __init__(
        self,
        frequency: Frequency,
        properties: Dict[str, Any],
        creation_date: datetime,
        start_date: datetime,
        end_date: datetime,
        name: Optional[str] = None,
        id: Optional[CycleId] = None,
    ) -> None:
        self._frequency = frequency
        self._creation_date = creation_date
        self._start_date = start_date
        self._end_date = end_date
        self._name = self._new_name(name)
        self.id = id or self._new_id(self._name)