Commit graph

3 commits

Author SHA1 Message Date
a_magical_me
b9a54c63d8 Add usage text for --safe. 2011-04-03 03:21:54 -07:00
a_magical_me
9340f24ae4 load: Add --recursive option.
Helps somewhat with #526 (`pokedex load` is slow) by making it easier to
load only the tables you're interested in.
2011-04-03 03:17:08 -07:00
a_magical_me
e7c40a08af Speed up import pokedex.db slightly.
Importing pokedex can take several seconds due to its rather large
dependencies—in particular, sqlalchemy, whoosh, and pkg_resources seem
to be the largest offenders. Normally, it would be possible to import
only the submodules one needs (pokedex.db, say), but pokedex.__init__
brings in all the submodules, for use by the command-line interface.

The fix is rather obvious:

- Move the command-line stuff into pokedex.main.

  Note: because the submodules are no longer imported by default, any
  script which expects `import pokedex` to be useful will likely break.

  Note: the `pokedex` command will not work until you re-run `python
  setup.py develop`, to update entry_points.txt.

- Don't import pkg_resources until necessary.
2011-04-03 03:13:07 -07:00