Skip to content

Comments

Expand Python TypeSystem#74

Merged
JacobHayes merged 7 commits intogoldenfrom
python_types_expanded
Aug 3, 2021
Merged

Expand Python TypeSystem#74
JacobHayes merged 7 commits intogoldenfrom
python_types_expanded

Conversation

@mikss
Copy link
Contributor

@mikss mikss commented Jul 28, 2021

In this PR, I expand out the types within the Python TypeSystem. I do think the Struct implementation is a little shaky, but let me know what you think. I tried to be generic with _gen_adapter where possible, but let me know if I am missing something obvious.

@mikss mikss requested review from JacobHayes and joycex99 July 28, 2021 14:10

@classmethod
def to_artigraph(cls, type_: Any) -> Type:
return cls.artigraph(precision="microsecond")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is because datetime precision is microsecond.

Copy link
Member

@JacobHayes JacobHayes left a comment

Choose a reason for hiding this comment

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

Thanks, looking pretty good! The Struct conversion seems clean, barring more esoteric things like typing.Optional (which we need to figure out/tweak in a few places to handle issubclass).

@codecov
Copy link

codecov bot commented Aug 2, 2021

Codecov Report

Merging #74 (15458be) into golden (9cb47be) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            golden       #74   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines          685       727   +42     
  Branches        79        86    +7     
=========================================
+ Hits           685       727   +42     
Impacted Files Coverage Δ
src/arti/types/core.py 100.00% <100.00%> (ø)
src/arti/types/python.py 100.00% <100.00%> (ø)
src/arti/views/python.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 9cb47be...15458be. Read the comment docs.

@mikss mikss requested a review from JacobHayes August 2, 2021 18:26
Copy link
Member

@JacobHayes JacobHayes left a comment

Choose a reason for hiding this comment

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

Thanks, looks great!

@JacobHayes JacobHayes merged commit 909a702 into golden Aug 3, 2021
@JacobHayes JacobHayes deleted the python_types_expanded branch August 3, 2021 00:57
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