Skip to content

Commit

Permalink
Merge pull request #1044 from Avaiga/feature/#1495-document-filter-sc…
Browse files Browse the repository at this point in the history
…enarios-by-creation_time

Doc/#1495 -  Add document for filtering scenarios with creation_time
  • Loading branch information
trgiangdo authored Jul 23, 2024
2 parents 7ac9d83 + cf71095 commit 4b3eee6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
13 changes: 9 additions & 4 deletions docs/manuals/userman/sdm/scenario/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,9 @@ from the config_id provided as a parameter.

## Get all scenarios

All the scenarios can be retrieved using the method `taipy.get_scenarios()^`. This method
returns the list of all existing scenarios. Here is the list of the parameters:
All the scenarios can be retrieved using the method `taipy.get_scenarios()^`. This method returns
the list of all existing scenarios. To filter and sort the list of scenarios, you can use the
following parameters:

- *cycle* represents the optional `Cycle^` to filter scenarios by. If provided, the list
contains all the existing scenarios of the cycle.
Expand All @@ -288,6 +289,8 @@ returns the list of all existing scenarios. Here is the list of the parameters:
order for dates, in alphabetical order for name and id, and in lexicographical order for tags.
The default value is "name". If an incorrect sorting key is provided, the scenarios are sorted
by name.
- *created_start_time* represents the optional inclusive start date to filter scenarios by creation date.
- *created_end_time* represents the optional exclusive end date to filter scenarios by creation date.

!!! note

Expand All @@ -305,8 +308,8 @@ lists of corresponding scenarios as values.
The `taipy.get_primary()^` method returns the primary scenario of the cycle given as a
parameter.

The `taipy.get_primary_scenarios()^` method returns the primary scenarios for all the
existing cycles. The list of primary scenarios can be sorted using the parameters:
The `taipy.get_primary_scenarios()^` method returns the primary scenarios for all the existing
cycles. The list of primary scenarios can be sorted and filtered using the following parameters:

- *is_sorted* represents if the output list of scenarios is sorted using the sorting key.
The default value is False.
Expand All @@ -317,6 +320,8 @@ existing cycles. The list of primary scenarios can be sorted using the parameter
order for dates, in alphabetical order for name and id, and in lexicographical order for tags.
The default value is "name". If an incorrect sorting key is provided, the scenarios are sorted
by name.
- *created_start_time* represents the optional inclusive start date to filter scenarios by creation date.
- *created_end_time* represents the optional exclusive end date to filter scenarios by creation date.

# Promote a scenario as primary

Expand Down
7 changes: 5 additions & 2 deletions docs/release-notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ This is the list of changes to Taipy releases as they were published.

<h4><strong><code>taipy-core</code></strong> 3.2.0 </h4>

- The `taipy.get_scenarios()` and `taipy.get_primary_scenarios()^` methods now accept optional parameters to
sort the output list of scenarios by name, id, creation date, or tag. For more information, please refer to
- The `taipy.get_scenarios()` and `taipy.get_primary_scenarios()^` methods now accept optional parameters to:

- sort the output list of scenarios by name, id, creation date, or tag
- filter the output list of scenarios that are created in a specific time range.<br/>
For more information, please refer to
[Get all scenarios](../manuals/userman/sdm/scenario/index.md#get-all-scenarios) and
[Get primary scenarios](../manuals/userman/sdm/scenario/index.md#get-primary-scenarios).

Expand Down

0 comments on commit 4b3eee6

Please sign in to comment.