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

improved module code checks #223

Open
2 tasks
CeresBarros opened this issue Oct 25, 2022 · 3 comments
Open
2 tasks

improved module code checks #223

CeresBarros opened this issue Oct 25, 2022 · 3 comments
Assignees

Comments

@CeresBarros
Copy link
Member

CeresBarros commented Oct 25, 2022

@achubaty
Copy link
Contributor

achubaty commented Oct 26, 2022

some messages (which should be warnings) are being triggered spuriously:

BC_HRV_preamble: inputObjects: NAME_1, LU_NAME are used from sim inside InitStudyArea, but are not declared in metadata inputObjects

Here I'm using e.g., sim$canProvs$NAME_1 (where canProvs is an sf object) but it's being flagged incorrectly.

Likewise, per PredictiveEcology/LandMine#4 (comment):

LandMine: inputObjects: ros is used from sim inside fireROS, but is not declared in metadata inputObjects

safe to ignore: ros is column in a data.table and sim$ROSTable$ros <- foo is used, so code checks are incorrectly flagging this.

@achubaty achubaty changed the title Classify some code checks as warnings improved module code checks Oct 27, 2022
@achubaty
Copy link
Contributor

from PredictiveEcology/LandMine#4 (comment)

fireReturnInterval, sppEquiv are declared in metadata outputObjects, but are not assigned in the module

  • fireReturnInterval is updated via sim$fireReturnInterval[] <- foo, so can ignore this message
  • sppEquiv is a data.table and is updated by reference sim$sppEquiv[, LandMine := foo]

@eliotmcintire i'm not sure how easy/quick it is to update the code cheks in SpaDES.core to account for these. obv low priority, but now this is documented :)

@achubaty
Copy link
Contributor

from fRI-Research/LandWeb_preamble#3 (comment):

LandWeb_preamble: outputObjects: TSFLayerName are assigned to sim inside InitMaps, but are not declared in metadata outputObjects

spurious: TSFLayerName being used as index to sim to reference another object:

ml[[TSFLayerName]][] <- as.integer(ml[[TSFLayerName]][])

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

No branches or pull requests

3 participants