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

Store problem configuration in Problem #326

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented Dec 3, 2024

Introduces Problem.config which contains the info from the PEtab yaml file.

Sometimes it is convenient to have the original filenames around.

Pydantic gives more helpful error messages than jsonschema in case of incorrect inputs. Later on, this could replace jsonschema completely.

If accepted, I will add the same for petab.v2.Problem.

Related to #324.

@codecov-commenter
Copy link

codecov-commenter commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 89.47368% with 4 lines in your changes missing coverage. Please review.

Project coverage is 74.38%. Comparing base (45a3371) to head (31d64ea).

Files with missing lines Patch % Lines
petab/v1/problem.py 89.47% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #326      +/-   ##
===========================================
+ Coverage    74.24%   74.38%   +0.13%     
===========================================
  Files           53       53              
  Lines         5168     5196      +28     
  Branches       910      910              
===========================================
+ Hits          3837     3865      +28     
  Misses         984      984              
  Partials       347      347              

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

@dweindl dweindl self-assigned this Dec 4, 2024
@dweindl dweindl marked this pull request as ready for review December 5, 2024 15:45
@dweindl dweindl requested a review from a team as a code owner December 5, 2024 15:45
Copy link
Member

@dilpath dilpath left a comment

Choose a reason for hiding this comment

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

Looks good, could also add filename metadata to the specific table objects, so that e.g. the top-half of the measurements is saved to measurements1.tsv and the bottom-half to measurements2.tsv. Fine to merge already

@dweindl
Copy link
Member Author

dweindl commented Dec 9, 2024

could also add filename metadata to the specific table objects, so that e.g. the top-half of the measurements is saved to measurements1.tsv and the bottom-half to measurements2.tsv. Fine to merge already

Yeah, I was thinking along the same lines. The problem is, we'd probably have to store the filenames in a new column, which people might not like. Storing it elsewhere, will cause issues in case the dataframe gets modified.

@dilpath
Copy link
Member

dilpath commented Dec 9, 2024

could also add filename metadata to the specific table objects, so that e.g. the top-half of the measurements is saved to measurements1.tsv and the bottom-half to measurements2.tsv. Fine to merge already

Yeah, I was thinking along the same lines. The problem is, we'd probably have to store the filenames in a new column, which people might not like. Storing it elsewhere, will cause issues in case the dataframe gets modified.

Yes, I think it will be easier to support with #337

Introduces Problem.config which contains the info from the PEtab yaml file.

Sometimes it is convenient to have the original filenames around.

Closes PEtab-dev#324.
@dweindl dweindl merged commit 4a551a7 into PEtab-dev:develop Dec 9, 2024
7 checks passed
@dweindl dweindl deleted the problem_config branch December 9, 2024 14:47
dweindl added a commit to dweindl/libpetab-python that referenced this pull request Dec 9, 2024
Introduces `v2.Problem.config` which contains the info from the PEtab yaml file.
The same as PEtab-dev#326, but for `v2.Problem`.
dweindl added a commit that referenced this pull request Dec 9, 2024
Introduces `v2.Problem.config` which contains the info from the PEtab yaml file.
The same as #326, but for `v2.Problem`.



---------

Co-authored-by: Dilan Pathirana <[email protected]>
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.

3 participants