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

Pydantic v2 updates. Minor updates to Foundry API to enable simple da… #462

Merged
merged 3 commits into from
Jul 12, 2024

Conversation

blaiszik
Copy link
Contributor

…taset loading with a DOI

Copy link

what-the-diff bot commented Jul 12, 2024

PR Summary

  • Improvements to foundry.py

    • Advanced type hinting was introduced to enhance static typing checks.
    • Imported new modules for improved data validation and settings management.
    • The signatures of several methods were updated.
    • A new dataset retrieval method titled get_dataset was implemented for more efficient data extraction.
    • Redundant logging information was omitted from the get_metadata_by_doi function.
    • Implementation of a new class FoundryCache for effective data caching.
  • Modifications in foundry_dataset.py

    • Key objects are now accessed via dc.identifier.identifier.root, refining the way the information is represented and the citation method is triggered.
  • Refactoring in jsonschema_models/dc_model.py

    • Multiple classes like Doi, Year, Language, Uri, NameIdentifiers, and Identifier, were updated to extend the RootModel, enhancing their accessibility and making them more consistent.
  • Redesign of models.py

    • Added a new type hinting for dictionaries.
    • Imported a new data analysis library pandas.
    • Several classes were refactored to inherit from more specific base models.
    • The FoundryBase class now enables extra model configurations, allowing for more flexibility. Removed unused imports.

Please note, these changes further optimize our codebase by enabling enhanced type checks, more efficient data handling, improved code consistency and readability.

@blaiszik blaiszik merged commit 39d9f8c into dev Jul 12, 2024
5 checks passed
@blaiszik blaiszik deleted the pydantic2 branch July 12, 2024 19:40
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.

1 participant