Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tags should not be unique in cycle #1292

Open
3 tasks
FlorianJacta opened this issue May 17, 2024 · 1 comment
Open
3 tasks

Tags should not be unique in cycle #1292

FlorianJacta opened this issue May 17, 2024 · 1 comment
Labels
Core: 🎬 Scenario & Cycle Core Related to Taipy Core good first issue New-contributor friendly 📈 Improvement Improvement of a feature. 🟩 Priority: Low Low priority and doesn't need to be rushed

Comments

@FlorianJacta
Copy link
Member

FlorianJacta commented May 17, 2024

Description
Scenario tags are unique within each cycle. It needs to be better suited.

For example, I want to say that some scenarios are more important than others. I could use the term "High priority" for multiple scenarios inside a cycle. Right now, it is not possible as tags are unique for each cycle.

Acceptance Criteria

  • Ensure new code is unit tested, and check code coverage is at least 90%
  • Propagate any change on the demos and run all of them to ensure there is no breaking change
  • Ensure any change is well documented and/or a new issue is created on the taipy-doc repository
@FlorianJacta FlorianJacta added Core Related to Taipy Core 📈 Improvement Improvement of a feature. 🟩 Priority: Low Low priority and doesn't need to be rushed labels May 17, 2024
@jrobinAV
Copy link
Member

jrobinAV commented May 19, 2024

In the _ScenarioManager, the static _tag method should be updated by removing the "old_tagged_scenario" update a follows:

    @classmethod
    def _tag(cls, scenario: Scenario, tag: str):
        tags = scenario.properties.get(cls._AUTHORIZED_TAGS_KEY, set())
        if len(tags) > 0 and tag not in tags:
            raise UnauthorizedTagError(f"Tag `{tag}` not authorized by scenario configuration `{scenario.config_id}`")
        scenario._add_tag(tag)
        cls._set(scenario)
        Notifier.publish(
            _make_event(scenario, EventOperation.UPDATE, attribute_name="tags", attribute_value=scenario.tags)
        )
  • Unit tests must be updated as well.
  • The ref manual of the Scenario class and the taipy module must be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core: 🎬 Scenario & Cycle Core Related to Taipy Core good first issue New-contributor friendly 📈 Improvement Improvement of a feature. 🟩 Priority: Low Low priority and doesn't need to be rushed
Projects
None yet
Development

No branches or pull requests

2 participants