Skip to content

Comments

Use pydantic for Artifacts#72

Merged
JacobHayes merged 1 commit intogoldenfrom
pydantic-artifacts
Jul 29, 2021
Merged

Use pydantic for Artifacts#72
JacobHayes merged 1 commit intogoldenfrom
pydantic-artifacts

Conversation

@JacobHayes
Copy link
Member

Updates Artifact classes to be pydantic models.

Artifacts were the only objects we mutated (when setting Artifact.producer within Producer.out), but rather than mutate we now copy the Artifact and return an updated version. This will require the output of Producer.out to be assigned to the Graph, rather than something like g.artifacts.x = MyArtifact(...); MyProducer().out(g.artifacts.x) - but that seems quite fine.

@JacobHayes JacobHayes self-assigned this Jul 27, 2021
@JacobHayes JacobHayes requested a review from mikss July 27, 2021 07:01
@codecov
Copy link

codecov bot commented Jul 27, 2021

Codecov Report

Merging #72 (a5c4470) into golden (c920e49) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            golden       #72   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines          699       709   +10     
  Branches        81        80    -1     
=========================================
+ Hits           699       709   +10     
Impacted Files Coverage Δ
src/arti/artifacts/core.py 100.00% <100.00%> (ø)
src/arti/producers/core.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c920e49...a5c4470. Read the comment docs.

Base automatically changed from pydantic-prep to golden July 27, 2021 19:42
@JacobHayes JacobHayes force-pushed the pydantic-artifacts branch from c680622 to a5c4470 Compare July 27, 2021 19:43
@JacobHayes JacobHayes merged commit e1403cb into golden Jul 29, 2021
@JacobHayes JacobHayes deleted the pydantic-artifacts branch July 29, 2021 02:12
@mikss mikss mentioned this pull request Jul 29, 2021
2 tasks
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