- For testcases, see /tests.
Exchange modules[edit source]
I'm moving the discussion from various places to here so we have an easy way to track what's happened so far:
- Exchange data will be converted to lua modules to improve performance, both in terms of normal page loads and in calculators. In the case of the latter, Quarenon's calc script passes a template through the API via action=parse which can cause a noticeable delay with complicated exchange data. Hopefully this conversion will alleviate this.
- A script for converting data in exchange pages to modules has been written and can be deployed when suitable.
- The format for exchange modules can be found here, the format for it's data subpage can be found Module:Exchange/Iron ore/Data|here.
- With regards to exchange related js:
- MediaWiki:Gadget-gemwupdate.js has been updated and has the ability to update exchange modules. This functionality is currently commented out, but has been marked as for post-lua conversion.
- MediaWiki:Gadget-GECharts.js has had the ability to pull data from modules added. As with the above script, this functionality is currently commented out but labelled appropriately.
- Exchange related abusefilters (such as ns protection) will need updating, however this should be quick and straightforward.
The update process will be run after TyBot has completed updating all exchange data after the GED updates, making sure it has the current data. From this point onwards, the various templates will be moved to using the data in modules. I'm hoping this won't take longer than a week, but there may be unforeseen errors during this transition that extend this period. This change will not be introducing any major changes: almost all templates output exactly the same as they do currently. A few will be deleted as they become obsolete.
Obviously, both module and exchange namespace pages to be updated during the transition. TyBot is currently being rewritten in java, when it's new code is stable I'm hoping to start the move.
Some things I haven't worked out yet:
- What should be done with the current /Data pages in the exchange namespace post conversion? They cease to be useful as data storage, and all they do that the main exchange pages don't is have a slightly less cluttered space for the graph.
- Should the main exchange pages be retired? It could be phased out in favour of a different interface elsewhere, possibly another subpage of GEMW.
- I think we could probs just delete the /Data pages if they have no real use. Maybe provide a way to make the graph bigger in the main exchange page if the larger graph is a popular thing. If we decide to keep them, maybe rename them to /Graph? 01:53, November 28, 2014 (UTC)
- I agree with Ty. The /Data subpages can be deleted. All data can be ported over to the Module namespace.
- If exchange pages are phased out and retained as subpages in mainspace, wouldn't that increase page count in mainspace? I don't think that would be a good idea, since these are not really articles, per se.
- If they are retained as exchange pages, how would they co-exist with their Module counterparts? Do they need to be maintained as well? Not updated daily with prices (since these pages only contain the Invoke thing), but more like renaming, moving, deleting, etc... when items are introduced/renamed/removed?
- Categories can only be added in the Exchange namespace (and not the Module namespace AFAIK), so maintenance (and categorisation) can be quite difficult if the Exchange pages are retired... 02:43, November 28, 2014 (UTC)
- I'm not a fan of them being moved to the mainspace, I was thinking of something similar to GEMW/C with extra data loaded/displayed as required but without having a vastly inflated page count. There's a few issues with the charts script that I didn't get around to fixing, so I could add some extra features when I get some time to fix those.
- For the time being I think we're going to have to maintain exchange pages alongside their module counterparts, if only so we don't break links all over the wiki. Long term we could move the categories and data displayed on exchange pages to their mainspace counterparts. With this move we do lose the ability to detect modules with incorrect item names (or for items that don't exist), but we could periodically tag these if it becomes an issue. Modules can be categorised, but it's like categorising js pages: it feels odd.
- The alchemy page should have some improvement in page load, in my tests various things were being updated much faster without purging the exchange page such as categories and the notice for when they were last updated.
- I've added abusefilters to the list of things to do above, but that should be a simple task to complete. cqm 13:28, 28 Nov 2014 (UTC) (UTC)
Default to a price (Or return a 0) for unknown prices?[edit source]
The Smithing Calculator currently won't load Rune Armor (or all Rune) because the price for Rune gauntlet +1 is missing. It would be nice to modify this script to return a default (and maybe a warning) rather than erroring out, so a missing price doesn't cause the table to fail to render entirely.
I don't want to do this myself as I'm not sure what knockon effects it might have, but thoughts?