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 support for PEtab problems with multiple condition files #152

Merged
merged 3 commits into from
May 25, 2022

Conversation

dweindl
Copy link
Member

@dweindl dweindl commented May 24, 2022

Allows specifying different conditions in different files.

Closes #7

Allows specifying different conditions in different files.

Closes #7
@dweindl dweindl requested a review from dilpath May 24, 2022 20:21
@codecov-commenter
Copy link

codecov-commenter commented May 24, 2022

Codecov Report

Merging #152 (7c6bb5f) into develop (7a0b77e) will increase coverage by 0.24%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop     #152      +/-   ##
===========================================
+ Coverage    77.14%   77.39%   +0.24%     
===========================================
  Files           26       26              
  Lines         2437     2437              
  Branches       579      579              
===========================================
+ Hits          1880     1886       +6     
  Misses         404      404              
+ Partials       153      147       -6     
Impacted Files Coverage Δ
petab/problem.py 69.83% <100.00%> (+2.06%) ⬆️
petab/yaml.py 89.87% <0.00%> (-1.27%) ⬇️
petab/core.py 89.51% <0.00%> (+1.61%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7a0b77e...7c6bb5f. Read the comment docs.

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.

👍

tests/test_petab.py Outdated Show resolved Hide resolved
petab/problem.py Outdated
@@ -88,7 +88,8 @@ def __setstate__(self, state):
@staticmethod
def from_files(
sbml_file: Union[str, Path, None] = None,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
sbml_file: Union[str, Path, None] = None,
sbml_file: Union[str, Path] = None,

Not sure, why can sbml_file and condition_file be specified as None by the user, but not the other tables?

Copy link
Member Author

Choose a reason for hiding this comment

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

All of them should be optional.

petab/problem.py Outdated
@@ -88,7 +88,8 @@ def __setstate__(self, state):
@staticmethod
def from_files(
sbml_file: Union[str, Path, None] = None,
condition_file: Union[str, Path, None] = None,
condition_file:
Union[str, Path, None, Iterable[Union[str, Path]]] = None,
Copy link
Member

Choose a reason for hiding this comment

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

Unrelated, but parameter_file can also be Iterable[Union[str, Path]] here, but is List[str] in get_parameter_df [1]. I guess it can be changed to Iterable[Union[str, Path]] at [1] too.

[1] https://github.com/PEtab-dev/libpetab-python/blob/c457c05172234ff0998eb3054b495f472fd9d0c3/petab/parameters.py#L31=

Copy link
Member Author

Choose a reason for hiding this comment

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

Will address separately

petab/problem.py Outdated Show resolved Hide resolved
dweindl and others added 2 commits May 25, 2022 07:35
Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>
@dweindl dweindl merged commit 12a07b9 into develop May 25, 2022
@dweindl dweindl deleted the feature_7_multiple_condition_files branch May 25, 2022 07:42
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