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

Additional tests for utilities #287

Merged
merged 6 commits into from
Jul 28, 2022
Merged

Conversation

IndrajeetPatil
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Jul 28, 2022

Codecov Report

Merging #287 (d17c0fa) into develop (f402204) will increase coverage by 4.04%.
The diff coverage is 0.00%.

❗ Current head d17c0fa differs from pull request most recent head f3e5541. Consider uploading reports for the commit f3e5541 to get more accurate results

@@             Coverage Diff             @@
##           develop     #287      +/-   ##
===========================================
+ Coverage    54.87%   58.91%   +4.04%     
===========================================
  Files           23       23              
  Lines         1097     1110      +13     
===========================================
+ Hits           602      654      +52     
+ Misses         495      456      -39     
Impacted Files Coverage Δ
R/esqlabs-env.R 83.33% <ø> (+20.83%) ⬆️
R/utilities-individual.R 0.00% <0.00%> (ø)
R/utilities-steady-state.R 0.00% <0.00%> (ø)
R/utilities-population.R 12.50% <0.00%> (+12.50%) ⬆️
R/utilities-parameters.R 73.68% <0.00%> (+28.94%) ⬆️
R/utilities-simulation.R 46.66% <0.00%> (+46.66%) ⬆️

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 f402204...f3e5541. Read the comment docs.

@IndrajeetPatil IndrajeetPatil changed the title Additional tests for utilities WIP: Additional tests for utilities Jul 28, 2022
@IndrajeetPatil IndrajeetPatil changed the title WIP: Additional tests for utilities Additional tests for utilities Jul 28, 2022
@IndrajeetPatil IndrajeetPatil marked this pull request as ready for review July 28, 2022 08:44
@IndrajeetPatil IndrajeetPatil requested a review from PavelBal July 28, 2022 08:44
simulation <- loadSimulation(system.file("extdata", "simple.pkml", package = "ospsuite"))
initializeSimulation(simulation, steadyStateTime = TRUE)
simulationResults <- runSimulation(simulation)
expect_s3_class(simulationResults, "SimulationResults")
Copy link
Member

Choose a reason for hiding this comment

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

What about

expect_true(isOfType(simulationResults, "SimulationResults"))

It is more straightforward because simulationResults is not actually an S3 class (or not designed to be)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If it makes it more readable for you, I can change it, but all R6 classes also come with S3 hierarchy.

cf. https://adv-r.hadley.nz/r6.html#introspection

image

@IndrajeetPatil IndrajeetPatil requested a review from PavelBal July 28, 2022 09:31
@IndrajeetPatil IndrajeetPatil merged commit 120c041 into develop Jul 28, 2022
@IndrajeetPatil IndrajeetPatil deleted the tests_for_individual branch July 28, 2022 09:59
PavelBal added a commit that referenced this pull request Sep 26, 2022
* Create V4  (#255)

* - Update data-handling vignette
- Function `loadObservedData()` requires a `ProjectConfiguration` instead of a
`ScenarioConfiguration`.

* Remove unused vignettes

* Update AppVeyor to R4.2.0

* Increment version to v4.0.0

* Cleanup for v4

* Update website

* Update reference index

* Removed steady-state function and using ospsuite.parameteridentification (#261)

* Removed steady-state function and using ospsuite.parameteridentification

* Update NEWS.md

Co-authored-by: Indrajeet Patil <[email protected]>

* Removed unused message

* Update documentation

* Update appveyor.yml

* Fix examples

Co-authored-by: Indrajeet Patil <[email protected]>

* Add functions to create plotting-related configs (#265)

- [x] Closes #262
- [x] Closes #263
- [x] Closes #264
- [x] Closes #225
- [x] docs and NEWS
- [x] tests

* Following guidelines for internal function names (#266)

* Added simulationRunOptions parameter (#268)

* Added simulationRunOptions parameter

* Remove `hash` from imports
Adds `stringr` and `labeling` to imports
Remove "return" from an empty switch statement
Missing documented arguments

* Update to roxygen2 7.2.1 (#273)

* Update to roxygen2 7.2.1

* .rd files

* Update exportSteadyStateToXLS.Rd

* Don't write to sheets when there is no data (#274)

Closes #272

* SensitivityAnalysis - use "by path" methods (#271)

* Use unlist

* Assign condition to a variable

* Skipping tests that rely on PK-Sim

* fix `createEsqlabsPlotConfiguration()`

Co-authored-by: Indrajeet Patil <[email protected]>

* Follow coding convention for source code filenames (#275)

* remove empty section from reference page

* Fix failing sensitivity-calculation after ospsuite update (#278)

* Fix failing sensitivity-calculation after ospsuite update

* Update rd

* Add tests for utilities (#280)

* Add tests for file utilities

* snapshot paths have changed?

* skip for now

* try

* problematic test?

* Update test-utilities-file.R

* Update test-utilities-file.R

* Update test-utilities-file.R

* Test for `compareWithNA()`

* rudimentary test for `ScenarioConfiguration`

* Don't skip tests on CI anymore (#283)

* Update README (#282)

* Update README

Closes #281

* Update README.md

* Tests for color utilities and global settings (#285)

* Tests for color utilities

* tests for global settings

* Use functions for error messages

* Additional tests for utilities (#287)

* Additional tests for utilities

* test for `compareSimulationParameters()`

* tweak tests for settings

* Test for `sampleRandomValue()`

* Address review comments

* remove `expect_s3_class()` for R6

* Extract applications (#288)

* - Add a function `getAllApplicationParameters` that returns all parameters of applications in a simulation
- Add a function `exportParametersToXLS` to write parameter information into an excel file that can be loaded in MoBi or R
- Add a function `writeExcel` that is a wrapper for creating a directory (if not present) and writing to excel file

* Update documentation

* Update R/utilities-simulation.R

Co-authored-by: Indrajeet Patil <[email protected]>

* Update R/utilities-parameters.R

Co-authored-by: Indrajeet Patil <[email protected]>

* Address review comments

* Update required R version

* Update NEWS

Co-authored-by: Indrajeet Patil <[email protected]>

* Tests for shiny apps (#290)

* Get rid of a few lints (#291)

* also not used

* - Add default project configuration file (#293)

- Fix documentation for the simulationTime argument of ScenarioConfiguration
- Fix example for setParameterValuesByPathWithCondition
- If simulation time is not defined in the ScenarioConfiguration, use output time schema from the simulation

* More tests for utilities (#294)

* More tests for utilities

* use github version

* skip for now

* Test for `executeInParallel()`

* Try shipping binary

* Revert "Try shipping binary"

This reverts commit 72dda5d.

* Update documentation (#298)

* More tests for scenario config (#296)

* more tests for scenario config

* to shut up codecov

* Get rid of `.getNetHashCode()`

Closes #297

* Added example project

* Add logo for the package (#299)

Stickers are big in the R community, and a good way to market ourselves at conferences and meetings. Print them, and distribute them, so that people can put them on their laptops.

cc @StephanSchaller

* - Remove unused test files
- Styler

* Delete modeling_environment.R

unneeded for the esqlabsR purposes

* Documenting data handling and running simulations (#301)

* Updated the introduction part of the vignette

* Data handling vignette

* Vignette on running simulations

* Propagated vignette updates to the /docs folder

* Updated links to the scenario file to avoid duplicated files

* style

* style changes to vignettes/data-handling.Rmd

Co-authored-by: Indrajeet Patil <[email protected]>

* Restored _snaps files that were mistakenly removed

* wording in introduction

Co-authored-by: Pavel Balazki <[email protected]>

* link to aciclovir model

Co-authored-by: Pavel Balazki <[email protected]>

* Removed function reference, moved installation and contribution to README.md only

* style changes README.md

Co-authored-by: Indrajeet Patil <[email protected]>

* Removed auto-generated testthat file

* Update vignettes/introduction-esqlabsr.Rmd

* Changes to data-handling.Rmd

Co-authored-by: Indrajeet Patil <[email protected]>
Co-authored-by: Pavel Balazki <[email protected]>

* Better explanation of the configuration Excel files

* Restructuring of existing documentation, a clear description of no-code approach

* Run tests for Shiny apps (#303)

* Simulations vignette with references to all configuration files and first lines of output

* Fixed link to the Scenarios.xlsx file

* Visualization vignette

* Sensitivity vignette

* Add getMoleculeNameFromQuantity() (#307)

* Add getMoleculeNameFromQuantity()

* Apply suggestions from code review

Co-authored-by: Indrajeet Patil <[email protected]>

Co-authored-by: Indrajeet Patil <[email protected]>

* Changed plot sizes

* Added troubleshooting sections

* Apply suggestions from code review

style changes

Co-authored-by: Indrajeet Patil <[email protected]>

* Apply suggestions from code review

style changes

Co-authored-by: Indrajeet Patil <[email protected]>

* Renamed chunks to follow style guide

* Added time profiles to sensitivity analysis

* Update vignettes/sensitivity-analysis.Rmd

* Added link to time profiles

* Updated the HTML docs to match the RMD docs (#309)

* Updated the HTML docs to match the RMD docs

* correct typos

Co-authored-by: Indrajeet Patil <[email protected]>

* Suggestions for vignettes (#315)

Co-authored-by: Johanna Eitel <[email protected]>

* Fixes initializeSimulation() when additionalParams is empty but not NULL #313 (#314)

* Added script for installation

* - List for packages that will be installed from CRAN
- Add "purr" explicitly to be installed from CRAN

* - Add jsonlite to be installed

* - Change defaults for `updatePackages` argument to `FALSE`
- Change defaults for `developerVersion` to `TRUE`
- Remove redundant test for PK-Sim connection

* Add vignette for shiny apps (#316)

* Add vignette for shiny apps

* Added header, minor style changes

* Add ShinyApp link to the introduction
Some minor changes to the vignette

Co-authored-by: Johanna Eitel <[email protected]>
Co-authored-by: Sergei Vavilov <[email protected]>
Co-authored-by: Pavel Balazki <[email protected]>

* Update website (#327)

* - Remove RData
- Update readme

* Update docs

Co-authored-by: Indrajeet Patil <[email protected]>
Co-authored-by: Johanna Eitel <[email protected]>
Co-authored-by: Sergei Vavilov <[email protected]>
Co-authored-by: Johanna Eitel <[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.

2 participants