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

[ux] Verify input to all AMD tools #1162

Merged
merged 41 commits into from
Sep 29, 2022

Conversation

pharmpy-dev-123
Copy link
Collaborator

@pharmpy-dev-123 pharmpy-dev-123 commented Sep 15, 2022

@rikardn Ready to MERGE

The goal is to improve the UX of the different tools when tool inputs are incorrect.

@codecov-commenter
Copy link

codecov-commenter commented Sep 15, 2022

Codecov Report

Base: 84.79% // Head: 85.27% // Increases project coverage by +0.48% 🎉

Coverage data is based on head (b4c82ae) compared to base (dc9d307).
Patch coverage: 79.43% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1162      +/-   ##
==========================================
+ Coverage   84.79%   85.27%   +0.48%     
==========================================
  Files         291      292       +1     
  Lines       26460    26841     +381     
  Branches     4513     4583      +70     
==========================================
+ Hits        22436    22890     +454     
+ Misses       3303     3218      -85     
- Partials      721      733      +12     
Flag Coverage Δ
macos-latest ?
python-3.10 84.68% <79.43%> (+0.46%) ⬆️
python-3.8 85.22% <79.43%> (+0.51%) ⬆️
python-3.9 85.23% <79.43%> (+0.48%) ⬆️
ubuntu-latest 85.10% <79.43%> (+0.48%) ⬆️
unit 85.25% <79.43%> (+0.48%) ⬆️
windows-latest 84.99% <79.43%> (+0.49%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/pharmpy/plugins/nonmem/advan.py 86.02% <ø> (ø)
tests/modeling/test_modeling.py 100.00% <ø> (ø)
src/pharmpy/tools/amd/run.py 14.01% <13.88%> (+0.31%) ⬆️
src/pharmpy/tools/modelsearch/algorithms.py 81.46% <60.00%> (+0.48%) ⬆️
src/pharmpy/tools/run.py 61.48% <62.50%> (-1.02%) ⬇️
src/pharmpy/utils.py 65.94% <63.33%> (-5.14%) ⬇️
src/pharmpy/tools/iivsearch/tool.py 31.93% <94.11%> (+15.89%) ⬆️
src/pharmpy/tools/ruvsearch/tool.py 20.94% <95.65%> (+9.87%) ⬆️
src/pharmpy/modeling/allometry.py 95.45% <100.00%> (+0.45%) ⬆️
src/pharmpy/modeling/eta_additions.py 95.52% <100.00%> (+0.02%) ⬆️
... and 33 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pharmpy-dev-123 pharmpy-dev-123 force-pushed the feature-tool-amd-verify-input-1 branch 6 times, most recently from 7f2bcbe to acb7df8 Compare September 15, 2022 16:38
@pharmpy-dev-123 pharmpy-dev-123 requested review from rikardn and stellabelin and removed request for rikardn September 15, 2022 16:45
Copy link
Collaborator

@stellabelin stellabelin 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! I'd maybe add types when raising type errors so that it is clear why that error is happening! Another question, in the Files changed it said modeling.init and tools.init are empty, were they removed or do you know why they're in the Files changed?

src/pharmpy/modeling/allometry.py Show resolved Hide resolved
src/pharmpy/tools/allometry/tool.py Outdated Show resolved Hide resolved
src/pharmpy/tools/allometry/tool.py Outdated Show resolved Hide resolved
src/pharmpy/tools/amd/run.py Show resolved Hide resolved
src/pharmpy/tools/covsearch/tool.py Outdated Show resolved Hide resolved
@pharmpy-dev-123
Copy link
Collaborator Author

Another question, in the Files changed it said modeling.init and tools.init are empty, were they removed or do you know why they're in the Files changed?

These new empty files are needed by pytest to differentiate between tests with identical basenames. See commit 01ee7cf

@pharmpy-dev-123 pharmpy-dev-123 force-pushed the feature-tool-amd-verify-input-1 branch 17 times, most recently from 7752de7 to 869d131 Compare September 23, 2022 22:29
@pharmpy-dev-123 pharmpy-dev-123 force-pushed the feature-tool-amd-verify-input-1 branch 2 times, most recently from 85d4864 to 93a11d4 Compare September 28, 2022 16:52
@pharmpy-dev-123 pharmpy-dev-123 marked this pull request as draft September 29, 2022 08:11
This is now checked automatically from create_workflow function
signature annotations.
Current usage never needs this since we always pass the model object to
create_workflow. This also simplifies the current implementation. In the
future, when we want to automate this sort of input validation at
workflow start for all tools,we can revisit this more generally.
@pharmpy-dev-123 pharmpy-dev-123 marked this pull request as ready for review September 29, 2022 09:16
@rikardn rikardn merged commit 70814d8 into pharmpy:main Sep 29, 2022
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.

Verify input to all AMD tools
4 participants