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 15 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 75.15924% with 39 lines in your changes missing coverage. Please review.

Project coverage is 71.92%. Comparing base (a1b5ff2) to head (c9b4871).

Files with missing lines Patch % Lines
emmet-core/emmet/core/tasks.py 64.64% 35 Missing ⚠️
emmet-core/emmet/core/vasp/calculation.py 90.47% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1174      +/-   ##
==========================================
- Coverage   72.13%   71.92%   -0.21%     
==========================================
  Files          77       77              
  Lines        5149     5196      +47     
==========================================
+ Hits         3714     3737      +23     
- Misses       1435     1459      +24     

☔ 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