phalt / swapi

*NOT MAINTAINED - NO GUARENTEE TO BE UP*
https://phalt.github.io/pokeapi-and-swapi-going-forward/
BSD 3-Clause "New" or "Revised" License
892 stars 507 forks source link

Forked my own verson of SWAPI #148

Closed awongCM closed 4 years ago

awongCM commented 4 years ago

I forked your SWAPI.

I'm curious to know when following the MakeFile, which python version do you used for this?

I'm assuming the service has always been written in Python 2 for a while..

Also do you recommend using virtualenv when running locally? I'm running into a lot of versioning incompatibility noises with Django modules...

Juriy commented 4 years ago

@awongCM have you managed to run it locally or on the server?

awongCM commented 4 years ago

I tried to run it locally. It failed.

When troubleshooting, I realised the entire django api platform is using Python 2, instead of Python 3.

I have both Python versions on my Mac. But the app still doesn’t play nicely with it...

Hence the reason for raising this github issue.

Juriy commented 4 years ago

I have managed to start the project: https://swapi.dev, it is deployed from my fork: https://github.com/juriy/swapi

CaioBRosa commented 4 years ago

thank so much @Juriy

awongCM commented 4 years ago

Thanks for doing that @Juriy. I sincerely appreciated your help.

Just out of my insatiable curiosity, how did you manage to get your forked project to work locally?

Do you have the correct Python 2 dependencies that got everything working on the outset?

I'm keen to know as I want to get it working for my forked project.

Thanks again!

Juriy commented 4 years ago

@awongCM I was deploying it right away on the server, so I didn't try it locally yet, it is a next thing to do. I used Amazon Linux 2, which already has the appropriate version of Python - 2.7.16. I had to install the toolset and dependencies (gcc-c++, make, zlib-devel zip unzip bzip2-devel postgres, postgresql-devel, python-devel, libmemcached-devel, ). Not sure if everything is needed from the list, but most of it makes sense.

Then I fixed the version of keen in requirements.txt to 0.3.0, to fix the incompatibility error. Then it started without an issue. You need to provide environment variables for DEBUG and DATABASE_URL to for the service to start. That's pretty much it.

As for the local setup - I haven't tried it yet, but I assume the process is going to be similar. Except, maybe, for using sqlite instead of Postgres for development mode.

awongCM commented 4 years ago

@Juriy Awesome stuff. Thank you very much for putting all this together.

I sincerely appreciate your effort to give this much detail.

This would certainly be a useful guide for me to try installing myself locally to work when troubleshooting.

Thanks again!