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

refactor: change workflow to simulation and node to step #205

Merged
merged 5 commits into from
Dec 8, 2020

Conversation

mostaphaRoudsari
Copy link
Member

This commit is a proposal for renaming a number of current objects. It also adds a new object for submitting simulations.

The proposal is to change Workflow to Simulation and Node to Step/SimulationStep. With this structure:

  • A Recipe is a collection of DAGs.
  • A DAG is a collection of tasks.
  • A Simulation is a collection of Steps. Each Step is an executed Task with an status.

@coveralls
Copy link

coveralls commented Dec 8, 2020

Pull Request Test Coverage Report for Build 408821341

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 148 (0.0%) changed or added relevant lines in 6 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.5%) to 48.499%

Changes Missing Coverage Covered Lines Changed/Added Lines %
queenbee/job/init.py 0 1 0.0%
queenbee/job/job.py 0 11 0.0%
queenbee/io/inputs/step.py 0 30 0.0%
queenbee/io/outputs/step.py 0 30 0.0%
queenbee/job/status.py 0 37 0.0%
queenbee/io/inputs/job.py 0 39 0.0%
Totals Coverage Status
Change from base Build 408818044: 0.5%
Covered Lines: 1357
Relevant Lines: 2798

💛 - Coveralls

Copy link
Member

@AntoineDao AntoineDao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with the switch from Node to Step and Workflow to Simulation.

Submission vs Status vs Simulation

It seems that we don't really have a simulation object but a create and a status object for simulations. As such I think we can get rid of the baked_recipe object inside of the simulation create object.

I am not sure where to leave the recipe resolution logic (ie: queenbee or queenbee-pollination) as we are going for a pollination-centric approach. I think we could benefit from a call sooner rather than later to hash this out.

Simulations vs Workflows

In the distant and very theoretical future I can imagine people running recipes that aren't strictly simulations (ie: machine learning or different automation jobs) but this future is so distant that there is no point me dying on this word hill 😄

queenbee/io/inputs/submission.py Outdated Show resolved Hide resolved
queenbee/io/inputs/submission.py Outdated Show resolved Hide resolved
queenbee/simulation/simulation.py Outdated Show resolved Hide resolved
class WorkflowStatus(BaseStatus):
"""Workflow Status"""
type: constr(regex='^WorkflowStatus$') = 'WorkflowStatus'
class SimulationStatus(BaseStatus):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to include some optional recipe information here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added source url to BaseStatus object which will provide these information. Its up to the client side to parse the source to get the desired information if needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we leave the source as an optional parameter? I think it might be difficult to resolve the source for each step inside of queenbee-argo

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good! I replied to your other comment. I will leave it to optional and we will see if you can find the Function for each Step or a Run.

queenbee/simulation/status.py Outdated Show resolved Hide resolved
queenbee/simulation/simulation.py Outdated Show resolved Hide resolved
queenbee/simulation/simulation.py Outdated Show resolved Hide resolved
@AntoineDao
Copy link
Member

After our call it seems we are happy using the following terminology:

  • Job: corresponds the SimulationSubmission object
  • JobStatus: corresponds to the SimulationStatus object

We have also agreed to include a source key to the Job object to indicate which recipe to use. This source is a URL that corresponds to the source url from the RecipeInterface described in #204

This commit is a proposal for renaming a number of current objects. It also adds a new object for submitting simulations.

The proposal is to change Workflow to Simulation and Node to Step/SimulationStep. With this structure:

- A `Recipe` is a collection of `DAGs`.
- A `DAG` is a collection of `tasks`.
- A `Simulation` is a collection of `Steps`. Each `Step` is an executed `Task` with an status.
With the new design:

* Job: corresponds the SimulationSubmission object
* JobStatus: corresponds to the SimulationStatus object
@mostaphaRoudsari
Copy link
Member Author

@AntoineDao, I updated the PR to use Job instead of Workflow/Simulation.

You probably want to check this commit (4632ed4) which doesn't include updating the docs folder.

Copy link
Member

@AntoineDao AntoineDao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we're good overall. I would just make the source in the BaseStatus object optional in case it is difficult to resolve for steps.

@mostaphaRoudsari mostaphaRoudsari merged commit b4ff0fb into pollination:master Dec 8, 2020
@mostaphaRoudsari mostaphaRoudsari deleted the simulation branch December 8, 2020 18:34
@ladybugbot
Copy link

🎉 This PR is included in version 1.19.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants