From b58a5b76c31002950ac472f4e14faf6ba8be8a69 Mon Sep 17 00:00:00 2001 From: Adickes Date: Mon, 7 Dec 2015 15:17:33 -0500 Subject: [PATCH] a few doc changes --- README.md | 42 +++++++++++++++++++++++++++++++++++++++--- data/v2/build.py | 8 ++++---- 2 files changed, 43 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index cddcdadb..d4e1426d 100755 --- a/README.md +++ b/README.md @@ -59,6 +59,33 @@ $ build_abilities() $ build moves() etc... ``` +Heres a list of the data building functions +- build_languages() +- build_regions() +- build_generations() +- build_versions() +- build_stats() +- build_damage_classes() +- build_abilities() +- build_characteristics() +- build_egg_groups() +- build_growth_rates() +- build_items() +- build_types() +- build_contests() +- build_moves() +- build_berries() +- build_natures() +- build_genders() +- build_experiences() +- build_machines() +- build_evolutions() +- build_pokedexes() +- build_locations() +- build_pokemons() +- build_encounters() +- build_pal_parks() + ## V2 Database setup @@ -66,13 +93,22 @@ Start Django shell ``` $ python manage.py shell --settings=config.local ``` + run the build script with ``` -$ import data.v2.build -$ data.v2.build.build_all() +$ from data.v2.build import * +$ build_all() ``` Each time the build script is run it will iterate over each table in the database, wipe it and rewrite each row using the data found in data/v2/csv. -If you don't need all of the data just run the functions of the modelgroups you want. For now there are only functions for groups of models if you want to build only some models you have to comment out everything you don't want in the functions you want to run. This might be useful because some of the csv files are massive (pokemon_moves expecially) and it can take about 30 minutes to build everything. +When building against sqlite we've heard it can take a ridiculously long time to finish building out the database. In this case you can set up just the portions of the db that you need. +``` +$ from data.v2.build import * +$ build_languages() +$ build_abilities() +... +``` + +Here ## Contributing diff --git a/data/v2/build.py b/data/v2/build.py index 014cdce3..2b187da4 100644 --- a/data/v2/build.py +++ b/data/v2/build.py @@ -4,14 +4,14 @@ # # and run the build script with # -# $ execfile('data/v2/build.py') +# $ from data.v2.build import * +# $ build_all # # Each time the build script is run it will iterate over each table in the database, # wipe it and rewrite each row using the data found in data/v2/csv. # If you don't need all of the data just go into data/v2/build.py and -# comment out everything but what you need to build the tables you're looking for. -# This might be useful because some of the csv files are massive -# (pokemon_moves expecially) and it can take about 30 minutes to build everything. +# just call one of the build functions found in this script + # support python3 from __future__ import print_function