Since we're mucking around with sqlalchemy core, all the tables that
PokemonMove references need to be defined already, so VersionGroup needs to
move up.
The idea here is to split each pokemon's moveset into sub-movesets which can be
re-used across versions.
Thanks to some mapper magic, this should be more or less transparent to users
of pokedex. Although i'm sure inserting new moves will be a pain.
Before:
pokemon_moves: 312,305 rows
After:
pokemon_movesets: 11,268 rows
pokemon_moveset_moves: 123,645 rows
pokemon_moveset_version_groups: 23,597 rows
total: 158,510 rows
SQLAlchemy 1.0 sets bindpararms to their default values when loading
lazy-loaded columns. This is in contrast to the 0.9 behaviour of
ignoring our incongruous bindparam alltogether.
So MultilangQuery is still broken, but now it breaks in the same way as before.
While we're here, set the correct param in one of the multilang tests. Not that
it matters.
To do:
- Add form prose for Mega Evolutions
- Update old Pokémon's form prose
- Nail down the style a little:
* Do I want to capitalize the form moniker? e.g. "Vivillon's
Pattern depends..." or "Trading [...] does not affect the Pattern
it will have..."
* What about when I'm actually writing a form name? e.g. "The Fancy
and Poké Ball Patterns..." (This is what I do at the moment.)
* Change all remaining instances of "Forms only affect appearance"
to "Forms only differ in appearance". It sounds better and fits
with the other opening sentences better.
Notes:
- Unown, Arceus, and Genesect are just given names like "One form" in
X/Y. I consulted Pokédex 3D Pro for Unown and Arceus, and named
Genesect's forms after their drives (since they don't have official
names).
- Names for Spiky-eared Pichu are missing, since it's missing from X/Y
and Pokédex 3D Pro.
- Korean names for Arceus are missing; we have type names, but I don't
know how to say "____ type", or whether it would be better to just
use the type name like the French and German localizers for Pokédex
3D Pro did.
- Eternal Floette is just "Éternelle" in the French text file, rather
than "Fleur Éternelle", but I think that's silly so I ignored it.
It does raise the question of whether I should really have typed
"Floette Éternel" though — the official convention seems to be
"Pokémon species names are masculine, even for all-female species",
but... they seem not to be going with that here, possibly because
this is a specific Floette? Or, more likely, because they just
didn't think about it that hard.
This commit updates the tests to take advantage of some of py.test's
newer features. Requires py.test 2.3 or newer. Tested with 2.3.0 and
2.5.2.
Tests which were parametrized now use py.test's built-in
parametrization[1].
The session and lookup objects are now implemented as fixtures[2].
The media root is a fixture as well. Fixtures are automatically passed
to any function that expects them.
Since the session is now created in one place, it is now possible to
provide an engine URI on the command line when running py.test. Ditto
for the index directory. (But the environment variables still work of
course.)
Slow tests are now marked as such and not run unless the --all option is
given.
A couple media tests are marked as xfail (expected to fail) because they
are broken.
[1]: http://pytest.org/latest/parametrize.html
[2]: http://pytest.org/latest/fixture.html
The Column class accepts a 'doc' argument. Use it.
And while we're at it, make them all unicode strings.
Performed by the following sed script:
s/info=dict(description=u\?\("[^"]*"\))/doc=u\1/
s/info=dict(description=u\?\('[^']*'\))/doc=u\1/
s/\(\s*\)info=dict(description=u\?\("[^"]*"\), /\1doc=u\2,\n\1info=dict(/
s/\(\s*\)info=dict(description=u\?\('[^']*'\), /\1doc=u\2,\n\1info=dict(/
/info=dict(description=u\?\('[^']*'\),$/ {
s//doc=u\1,/
n
s/^\s*/&info=dict(/
}
In previous gens, Spanish nature names only ever appeared in the
feminine form, so that's what we had. Now it looks like the isolated
nature names default to masculine — they're still feminine on the status
screen, but in the box you get "Naturaleza: [adjective]" and I guess
the adjective is considered to be on its own rather than modifying
naturaleza.
Italian doesn't follow suit so I guess it gets to be the one special
snowflake language where we don't have the default dictionary form for
natures.
I also changed Celebrate's effect to "unknown", which I meant to commit
separately but it got caught up in this one. It has a unique effect ID,
and we don't know for sure that it does nothing. Also, Splash's effect
(which it was sharing) says that the move is disabled by Gravity, which
isn't true of Celebrate.
I don't really like this but ehhhhhhh, the system for prose
translations seems to be to keep them in csv/translations/, and I can't
figure out how you're supposed to DO that, plus judging by the age of
the single file that's in there, that seems to be where translations go
to die.