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

Integration #3

Merged
merged 14 commits into from Oct 24, 2018
Merged

Integration #3

merged 14 commits into from Oct 24, 2018

Conversation

rjplevin
Copy link
Contributor

@rjplevin rjplevin commented Apr 2, 2018

Updated DICE 2013 for new framework.

@lrennels
Copy link
Collaborator

lrennels commented Apr 7, 2018

@davidanthoff this is ready for review, I don't have the permissions to add you as a reviewer

@davidanthoff davidanthoff self-requested a review July 23, 2018 20:49
@@ -0,0 +1,117 @@
module dice2013
Copy link
Member

Choose a reason for hiding this comment

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

Remove this file for now, we don't want @defmodel to be public.

src/dice2013.jl Outdated
set_param!(DICE, :welfare, :rr, p[:rr])
set_param!(DICE, :welfare, :scale1, p[:scale1])
set_param!(DICE, :welfare, :scale2, p[:scale2])
connect_param!(DICE, :welfare, :CPC, :neteconomy, :CPC, offset=0)
Copy link
Member

Choose a reason for hiding this comment

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

This whole part should be in a function (like in the old version), not global scope code. We generally should not define global variables like this here.

include("dice2013.jl")
using dice2013

run(DICE)
Copy link
Member

Choose a reason for hiding this comment

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

Change this so that we first call some function that gets a model, assign it to m and then run that.


function getmarginal_dice_models(;emissionyear=2010)
m1 = getdiceexcel()
mm = MarginalModel(DICE)
Copy link
Member

Choose a reason for hiding this comment

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

Same here, don't use a global like DICE.

# run(m2)

# return m1, m2
# end
Copy link
Member

Choose a reason for hiding this comment

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

Don't keep old code around, it is always in the git history if someone wants to see it.

test/runtests.jl Outdated
using ExcelReaders
using DataTables
Copy link
Member

Choose a reason for hiding this comment

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

That package is long dead, we should use DataFrames.

src/dice2013.jl Outdated
@@ -1,8 +1,10 @@
module dice2013
Copy link
Member

Choose a reason for hiding this comment

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

I think we should probably follow the convention that module names start with a capital letter here? I think we can also not put this into a module for now, given that we'll have to change this again once we make this a package.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seemed to me good practice to define models in their own modules since we use module name + component name to uniquely identify components. Maybe DICE2013? I would think this will eventually be the name of the package/project in any case, right?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I think you are right. So maybe then just lets pick the name we will also use for the package. I guess the options are really DICE2013 or Dice2013. I don't feel strongly about it... The first one is more true to the model name, the second one to the julia naming guidelines...

@davidanthoff davidanthoff merged commit 41d812e into anthofflab:master Oct 24, 2018
@davidanthoff davidanthoff deleted the integration branch October 24, 2018 16:45
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.

None yet

3 participants