GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Update Action template · Issue #2 · diffgram/diffgram-cli

Update Action template #2

New issue
Copy link
New issue
Copy link
Open
Open
Update Action template#2
Copy link
Assignees
vitalii-bulyzhyn
Labels
Snippet update

Description

@vitalii-bulyzhyn
vitalii-bulyzhyn
opened on Jul 25, 2022
Issue body actions

Since actions were updated, need to update template and add precondition property to the action class

from eventhandlers.action_runners.base.ActionRunner import ActionRunner
from eventhandlers.action_runners.base.ActionTrigger import ActionTrigger
from eventhandlers.action_runners.base.ActionCondition import ActionCondition
from eventhandlers.action_runners.base.ActionCompleteCondition import ActionCompleteCondition


class VertexTrainDatasetAction(ActionRunner):
    public_name = 'Vertex Ai Train Dataset'
    description = 'Train model with Vertex AI'
    icon = 'https://www.svgrepo.com/show/375510/vertexai.svg'
    precondition = ActionCondition(default_event = None, event_list = [])
    kind = 'VertexTrainDatasetAction'  # The kind has to be unique to all actions
    category = 'training'  # Optional

    # What events can this action listen to?
    trigger_data = ActionTrigger(default_event = 'some_diffgram_event',
                            event_list = ['some_diffgram_event'])

    # What pre-conditions can this action have?
    condition_data = ActionCondition(default_event = 'some_diffgram_event',
                                     event_list = ['some_diffgram_event'])

    # How to declare the actions as completed?
    completion_condition_data = ActionCompleteCondition(default_event = 'some_diffgram_event',
                                                        event_list = ['some_diffgram_event'])

    def execute_pre_conditions(self, session) -> bool:
        # Return true if no pre-conditions are needed.
        return True

    def execute_action(self, session):
        # Your core Action logic will go here.
        pass

Activity

  1. vitalii-bulyzhyn
    added
    Snippet update
    on Jul 25, 2022
  2. vitalii-bulyzhyn
    self-assigned this
    on Jul 25, 2022
  3. vitalii-bulyzhyn commented on Jul 25, 2022

    @vitalii-bulyzhyn
    vitalii-bulyzhyn
    on Jul 25, 2022
    Author
    More actions

    On the frontend snippet need to initialise steps_config on the state:

    data (){
        return {
          steps_config: null,
        }
      },
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @vitalii-bulyzhyn
    vitalii-bulyzhyn

Labels

Snippet update

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.