Re: [pcgen_developers] Re: Code Restructuring / Character Output
- Hi all,I'd go with core. That way the actual core pre-req functionality can be tested in one place (pre translation). We can optionally (because lets face it it's not critical) write further tests to check if the translations are accurate (e.g. The prereq'ing still works).KOn 13 February 2012 04:41, Devon Jones <devon.jones@...> wrote:
my gut says core.DevonOn Thu, Feb 9, 2012 at 9:33 PM, thpr <thpr@...> wrote:So I've looked at bit at this to see what would happen and found something I want to get a few extra minds on. There are a few things that pull information out of PlayerCharacter, and for some of those it's pretty clear whether they should formally access the core or whether they should go through a "Display Interface"
--- In email@example.com, "thpr" <thpr@...> wrote:
> So there are a few classes within pcgen.core.analysis that
> should be moved, as well as a bunch of methods in PlayerCharacter.
Export Tokens: Display Interface
UI: Display Interface
PCG read/write: Core
These are easy since the UI/Export need to have sorting, formatting, and we want to ensure the PCG is "pure".
Then we arrive at Prerequisites... the things in plugin.prereq.test for the most part.
I can see arguments both ways:
Display Interface: Want to ensure any formatting/substitution happens, so need to ensure we go through Display
Core: Better not let any formatting/localization happen because if you're doing a test on something that might be translated, you must use the core / object information, not a formatted string.
One set of logic would be to give Prerequisites their own interface... which we may eventually find is necessary.
Until that point, I think my instinct is to go with the core, since I think it's more appropriate to not do formatting on most things before they are tested. (One big counter-example will be "SAB", but once we get to localized data, I think we will realize that is a just a very bad idea [and one I think we have mostly moved away from in the data we ship])
Anyone have 2c to throw into the ring?