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

Lin 447 pipeline object #710

Merged
merged 33 commits into from
Jul 8, 2022
Merged

Lin 447 pipeline object #710

merged 33 commits into from
Jul 8, 2022

Conversation

LordDarkula
Copy link
Contributor

@LordDarkula LordDarkula commented Jun 25, 2022

Description

Create Pipeline object and enable the creation, saving of fetching of pipelines. Pipelines serve as an intermediary between
artifacts and exported production scripts.

Fixes # (issue)

447

Type of change

Please delete options that are not relevant.

  • [ x ] New feature (non-breaking change which adds functionality)
  • [ x ] This change requires a documentation update

How Has This Been Tested?

Four tests have been added to test_linea_api.py.

LordDarkula and others added 30 commits June 22, 2022 14:41
Create PipelineORM with many to many relationship with artifacts.
Create Pipeline API class containing a TaskGraph.
Fix broken Table import in relational
Add dependency as TaskGraph member so it can be used in pipeline
generation.
The string key was just association so it was renamed to
artifact_to_pipeline.
Copy logic from to_pipeline function and modify the code to fit Pipeline
input parameters.
Since Pipeline is an object now, the TaskGraph can be initialized when
the object is instead of when the orchestration occurs.
Have to_pipeline create a Pipeline object and call generate_pipeline and
return the result.
Add IDs to Artifact and Pipeline
Allow user to get PipelineORM object from database given name
Return a Pipeline object by name.
Remove default value for PipelineORM name column because it is
nonnullable so no default is needed.
This represents the one to many relationship between an artifact and
it's sources in the context of a pipeline.
Makes copy notebokk tests pass.
Add currently failing pytest dependency test.
In order to construct a proper many to many relationship between pre
artifacts and dependencies, a secondary table must be constructed in
sqlalchemy.

Convert relationship between Pipeline and dependencies into a
bidirectional relationship.
The dependencies must be fetched from the database and converted
into a TaskGraphEdge to pass into Pipeline before returning the object.
It is assumed that all dependencies will be artifacts in the artifact
list so dependencies do not need to be fetched separately. Instead they
can be reused when fetching a Pipeline.

Replace some object strings in sqlalchmy relationships with the ORM
object types themselves
Mypy was complaining about being unable to pick up on the type of a
relationship.
If post artifact is None, the code would crash because none has no
attribute name. Instead we want to skip attempting to fetch an
incomplete dependency.
Test creating and fetching two pipelines with overlapping dependencies.
@LordDarkula LordDarkula marked this pull request as ready for review July 7, 2022 23:01
Make sure the db can handle multiple dependencies with the same pipeline
id and pre artifacts.

Disallow creation of empty pipelines.
Reduce number of tests to 3. The first test tests multiple pipelines
with different artifact lists. The second test tests multiple pipelines
with overlapping dependencies. The third test tests a signle pipeline
with overlapping dependencies.
lineapy/plugins/task.py Outdated Show resolved Hide resolved
lineapy/api/api.py Show resolved Hide resolved
tests/end_to_end/test_linea_api.py Outdated Show resolved Hide resolved
Copy link
Contributor

@lionsardesai lionsardesai left a comment

Choose a reason for hiding this comment

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

ship it!! 🚢 :shipit:

@LordDarkula LordDarkula merged commit 2679352 into main Jul 8, 2022
@lionsardesai lionsardesai deleted the LIN-447-pipeline-object branch July 9, 2022 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants