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

[WIP] Strict typing and fixed schemas for emmet document models #1174

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

esoteric-ephemera
Copy link
Collaborator

The goal of this PR is to make fixed, (more-)explicitly typed document models for storing tasks / converting python objects to parquet. To do this, we have to:

  • Make document models for some specific pymatgen objects (POTCAR summary stats, ComputedEntry, etc.)
  • Make a strict schema (not permitting extra model fields and no union types on fields besides Optional) for TaskDoc
  • Maybe concurrent: pydantic models that are low-memory implementations of objects like Structure, PeriodicSite, etc.

To avoid breaking changes, TaskDoc is the same as before, but inherits from a DbTaskDoc which meets the strict criteria above

Other concurrent goals:

  • Better PEP585 compliance by partially migrating away from type hints based on the typing package

@codecov-commenter
Copy link

codecov-commenter commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 98.55072% with 2 lines in your changes missing coverage. Please review.

Project coverage is 88.99%. Comparing base (e0edac6) to head (0bb8574).

Files with missing lines Patch % Lines
emmet-core/emmet/core/tasks.py 97.91% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1174       +/-   ##
===========================================
+ Coverage   72.13%   88.99%   +16.86%     
===========================================
  Files          77      116       +39     
  Lines        5149    11140     +5991     
===========================================
+ Hits         3714     9914     +6200     
+ Misses       1435     1226      -209     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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