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

updated prefab paths in spreadsheet don't show up in web #4

Open
energynumbers opened this issue Jun 10, 2012 · 5 comments
Open

updated prefab paths in spreadsheet don't show up in web #4

energynumbers opened this issue Jun 10, 2012 · 5 comments

Comments

@energynumbers
Copy link

In version 2.1 of the spreadsheet, there are updates to the FoE path (column AA on the worbook's "Control" sheet). But because the paths are hardcoded in pathways.js.cofffee lines 226-266, the updates don't automatically appear in the web interface.

By the way, while I'm here: great work on stemming the memory leaks! That's working very well here (using excel_to_code v0.0.10). Now, memory use quickly stabilises just under 200 MB, and then very slowly rises by about 0.1MB or so, now and again. Currently at 200.6MB, after rising to 200.7MB and dropping back a little bit. I don't know if that's a persistent rise, or not ... more news shortly. But it's a huge improvement, and makes it entirely usable now.

@energynumbers
Copy link
Author

Oh, I see that some of the pathways are also hard-coded in two other files too: app/helpers/application_helper.rb and app/assets/javascripts/costs_common_methods.js.coffee

@tamc
Copy link
Member

tamc commented Jun 12, 2012

Thank you. I will update this. Unfortunately the pathways need to be updated in several different spots. A legacy of a time when we thought we might have different example pathways in different spots.

Tom Counsell

On Sunday, 10 June 2012 at 17:10, energynumbers wrote:

In version 2.1 of the spreadsheet, there are updates to the FoE path (column AA on the spreadsheet). But because the paths are hardcoded in pathways.js.cofffee lines 226-266, the updates don't automatically appear in the web interface.

By the way, while I'm here: great work on stemming the memory leaks! That's working very well here (using excel_to_code v0.0.10). Now, memory use quickly stabilises just under 200 MB, and then very slowly rises by about 0.1MB or so. I don't know if that's a persistent rise, or not ... more news shortly. But it's a huge improvement, and makes it entirely usable now.


Reply to this email directly or view it on GitHub:
#4

tamc added a commit that referenced this issue Jun 12, 2012
@energynumbers
Copy link
Author

The pathways are encoded from the spreadsheet, within the model structure, and are available in ModelStructure.instance.example_pathways

So it should be possible to create a single hash for the example pathways, with the short name, the long description and the wiki page, all indexed by the pathway string.

And then pass that to javascript in the usual way, as a value of the twentyfifty global javascript variable

@tamc
Copy link
Member

tamc commented Jul 19, 2012

A further step towards fixing this is in 9159fb8

This consolidates all the different example pathway elements into one spot and then passes them to the javascript as a global variable. Note that it doesn't yet read from the underlying model structure. Need to add the other bits of data (e.g., description, wiki page, whether it appears as a cost comparator) to the excel before doing that.

@energynumbers
Copy link
Author

Nice one, cheers Tom. As you know (but just as a gentle reminder) it does currently read the expert pathways from the underlying model structure - they're all available in the decc_2050_model gem. It just doesn't do anything with that information: it uses the paths hard-coded in twenty-fifty instead.

However, although the model gem reads in the pathways from the spreadsheet, it doesn't read in titles of the pathways. Nor can it read in wikipage, short and long descriptions, and comparator flag: as you say, those are not yet present in the spreadsheet.

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

2 participants