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 getAllStateVariablesPaths #526

Merged
merged 3 commits into from
May 25, 2021
Merged

Add getAllStateVariablesPaths #526

merged 3 commits into from
May 25, 2021

Conversation

PavelBal
Copy link
Member

No description provided.

@PavelBal PavelBal requested a review from msevestre May 25, 2021 11:14
@codecov-commenter
Copy link

Codecov Report

Merging #526 (f304de3) into develop (4daa4c4) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #526      +/-   ##
===========================================
+ Coverage    88.52%   88.56%   +0.03%     
===========================================
  Files           72       72              
  Lines         1438     1443       +5     
===========================================
+ Hits          1273     1278       +5     
  Misses         165      165              
Impacted Files Coverage Δ
R/create-population.R 100.00% <100.00%> (ø)
R/utilities-simulation.R 97.88% <100.00%> (+0.07%) ⬆️

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 4daa4c4...f304de3. Read the comment docs.

#' @return A list of paths
#' @export
getAllStateVariablesPaths <- function(simulation) {
validateIsOfType(simulation, type = "Simulation")
Copy link
Member

Choose a reason for hiding this comment

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

you can pass a ref to the R6 class directly here (e..g validateIsOfType(simulation, Simulation) which removes the use of "magic" string

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

#' @export
getAllStateVariablesPaths <- function(simulation) {
validateIsOfType(simulation, type = "Simulation")
allMoleculesPaths <- getAllEntityPathsIn(container = simulation, entityType = Molecule)
Copy link
Member

Choose a reason for hiding this comment

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

getAllMoleculePathsIn instead. Since we have a convenience method for this, why not use it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@msevestre msevestre merged commit 9a8d3e7 into develop May 25, 2021
@msevestre msevestre deleted the getAllStateVariablesPaths branch May 25, 2021 14:53
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