Merge pull request #189 from phmatray/patch-1
The pokemon_name field in pokemon_form_names is sadly not rippable and has to be created by hand, being an unofficial amalgam of the species name and form name. Looks like Zhorken made a typo when adding the French form names originally.
Merge pull request #180 from seii/veekun-issue-103
Background: When I originally ripped FR/LG encounters, i gave them
their own set of location areas instead of reusing the ones from R/B/Y.
My reasoning was that location areas aren't really consistent across games,
and we have to name them by hand anyway, so it would be better to take care
of merging them in the presentation layer than the database layer.
The other devs disagreed with me, and all other rips have reused location areas.
This set of commits removes the separate location areas for FR/LG, merging them
with the existing location areas. Mostly straightforward, except:
- My original rip collapsed the three upper floors of the Pokémon Mansion into
a single unnamed area, since they had the same encounters. But R/B/Y had
slightly different encounters on each floor, so we have to re-duplicate these
floors.
- I'm not sure how we ended up with four Victory Roads in Kanto, but we did.
One of them (kanto-victory-road-1) is the G/S/C victory road, which has a
completely different layout so it makes sense having its own set of location
areas. As for the other three, one was used by R/B/Y (kanto-victory-road-2),
one by FireRed (kanto-victory-road-3), and one by LeafGreen
(kanto-victory-road-4). We can merge these.
Also, a few locations had inconsistent names:
- Routes 19, 20 & 21 => Sea Routes 19, 20 & 21
- Route 2 unnamed area => Route 2 south, towards Viridan City
- Safari Zone center => Safari Zone middle
Thanks to seii for doing all the hard work.
Fixes#103Fixes#156
There was a mix up with B1F and 1F in FireRed and LeafGreen.
Both floors got labeled as 1F during the location area cleanup,
and the B1F encounters were copied to 2F and 3F instead of the 1F
encounters.
This broke my database import:
```
psycopg2.DataError: extra data after last expected column
CONTEXT: COPY pokemon_shape_prose, line 21: "6,9,Upright,Sciurine,Pokémon with a bipedal, tailed form"
```
This is all the Pokémon data except moves and held items, which need to be
ripped separately for all Pokémon.
Note that Cosplay Pikachu and friends are technically in the Undiscovered egg
group, but egg groups are a property of PokemonSpecies so i can't represent
that here.
English names only for now. Still need to add names for old default forms,
e.g., Hoopa Confined.
Still need to regenerate the order columns.
Looks like pokemon_form_generations and pokemon_game_indices haven't been kept
up to date, so i guess i'll have to update those too.
Updates #141.
Went though the table docs and noted which tables have ids that correspond
to game ids, and explained why we sometimes have ids in the 10000s.
Since docs attached to id columns aren't displayed in the web documentation,
these edits all go in the class docstring, and i took the liberty of deleting
the id column docs from every table i touched.
Also: added some words about how to get to the species from pokemon and
pokemon_form.
Also: note that item flags are not official (they are a holdover from
brownkun) and item pockets are sort of kind of official (they originated from
D/P i believe, but i'm not sure how we've been assigning them for newer items).
Pertains to #99.
COPY FROM FILE requires database superuser permissions,
because of the obvious security implications.
COPY FROM STDIN has no such restriction.
Also do some cleanup while we're here.
The following locations have multiple areas, which have been assigned
placeholder names (Unknown Area ###).
- Frost Cavern
- Glittering Cave
- Reflection Cave
- Terminus Cave
- Victory Road
No horde encounters because i'm not sure how we want to represent them.
No swarm encounters because they aren't in the normal encounter data.
Fixes#146.
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