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

Add a data method to validate data frame variables #658

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

davidorme
Copy link
Collaborator

Description

This PR adds a new method to Data that can be used to check that a named set of variables for a data frame: a set of one-dimensional arrays with the same length.

This is motivated by the need for both the plants and animals models to handle cohort data, which naturally forms a data frame.

Fixes #657

Type of change

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist

  • Make sure you've run the pre-commit checks: $ pre-commit run -a
  • All tests pass: $ poetry run pytest

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works
  • Relevant documentation reviewed and updated

@davidorme davidorme linked an issue Jan 7, 2025 that may be closed by this pull request
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.64%. Comparing base (bf33499) to head (1c54b12).
Report is 15 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #658      +/-   ##
===========================================
+ Coverage    94.63%   94.64%   +0.01%     
===========================================
  Files           73       73              
  Lines         4619     4630      +11     
===========================================
+ Hits          4371     4382      +11     
  Misses         248      248              

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

Copy link
Collaborator

@sallymatson sallymatson left a comment

Choose a reason for hiding this comment

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

This looks logical & thorough to me!

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.

Add a data method to check variables form a data frame
3 participants