PokeAPI / pokebase

Python 3 wrapper for Pokéapi v2
BSD 3-Clause "New" or "Revised" License
286 stars 53 forks source link

Add unit tests on GH Actions #30

Closed Naramsim closed 3 years ago

Naramsim commented 3 years ago

Travis-ci has switched from .org to .com so I thought we could get rid of it and start using Actions.

So this PR tests Pokebase on Python 3.6 and 3.7 on Actions.

Davidy22 commented 3 years ago

I enabled 3.8 and 3.9 on my branch that has a bunch of dependency version bumps and the check passed. My pull request that contains version bumps has been merged, so this probably works if you pull from main and try 3.8 again.

Naramsim commented 3 years ago

I've added a job for checking the syntax with flake8

clot27 commented 3 years ago

hey can anybody help me with how can i print the stats of a given pokemon? (sorry for dumb question)

Naramsim commented 3 years ago

@aditya-yadav-27

import pokebase as pb

for stat in pb.pokemon('charmander').stats:
  print('{}: {}'.format(stat.stat.name, stat.base_stat))

https://replit.com/@AlessandroPezze/OpulentUtilizedAudit#main.py

clot27 commented 3 years ago

does searching pokemon from its id is not working?

Davidy22 commented 3 years ago

For one, you probably want to open an issue for this instead of post in a closed pull request. Also, can you provide the code that doesn't work for you so we can see what's happening?

clot27 commented 3 years ago

k sorry for that btw I can't understand how to print the evolution line of a pokemon can anyone help me with this?