Closed AoifeHughes closed 1 year ago
@AoifeHughes in case you missed it, this data is accessible without any other required work from poke-env
, through:
from poke_env.data import GenData
gen_9_dex = GenData.from_gen(9).pokedex
It's lazy loaded and cached for further use. Ditto for moves, natures and type charts. Learnsets are not included yet, but can be added if you need it.
@hsahovic this was my plan originally, but it doesn't seem to include the learnsets?
No, not yet. The data is included in the static
folder though.
You could add it through something like:
def load_learnsets(self) -> Dict[str, Dict[str, Union[int, float]]]:
with open(os.path.join(self._static_files_root, "learnsets.json")) as f:
return orjson.loads(f.read())
and adding learnsets
in GenData
's init - if you want to open a PR to poke-env
I would happily merge it.
Good shout! Yeah I'll do that. Thanks!
Think this is done with recent PR #44
We're about to start needing external data sources. E.g., the Pokédex. Do we want to say that everything needs to be run from the root directory. Or do we want to support the library being more portable? If the later then we need to configure how
pip install
will setup and copy across data files.@phinate how would you like this done?
Examples of data needed to be usable by the library: