Skip to content

Commit

Permalink
Merge pull request #399 from NREL-Sienna/gks/fix_398
Browse files Browse the repository at this point in the history
Resolve `IS` prefix in submodules (fixes #398)
  • Loading branch information
GabrielKS authored Sep 24, 2024
2 parents 02e3688 + a353a06 commit a763ee0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/Optimization/Optimization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import Dates
import CSV
import DataFrames

import ..InfrastructureSystems
const IS = InfrastructureSystems

import ..InfrastructureSystems:
@scoped_enum,
InfrastructureSystemsType,
Expand Down
2 changes: 1 addition & 1 deletion src/Optimization/optimization_problem_results.jl
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ end
function _validate_keys(existing_keys, result_keys)
diff = setdiff(result_keys, existing_keys)
if !isempty(diff)
throw(IS.InvalidValue("These keys are not stored: $diff"))
throw(InvalidValue("These keys are not stored: $diff"))
end
return
end
Expand Down
2 changes: 1 addition & 1 deletion src/Optimization/optimization_test_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function write_optimizer_stats!(
end

function read_optimizer_stats(store::MockModelStore)
stats = [IS.to_namedtuple(x) for x in values(store.optimizer_stats)]
stats = [to_namedtuple(x) for x in values(store.optimizer_stats)]
df = DataFrames.DataFrame(stats)
DataFrames.insertcols!(df, 1, :DateTime => keys(store.optimizer_stats))
return df
Expand Down
3 changes: 3 additions & 0 deletions src/Simulation/Simulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"""
module Simulation

import ..InfrastructureSystems
const IS = InfrastructureSystems

import ..InfrastructureSystems:
@scoped_enum

Expand Down

0 comments on commit a763ee0

Please sign in to comment.