sympy / sympy_gamma

A SymPy version of WolframAlpha.
https://sympygamma.com
Other
674 stars 112 forks source link

Migrate to Python 3 runtime of Google App Engine #154

Closed aktech closed 4 years ago

aktech commented 4 years ago

This migrates the application to Python3 runtime of Google App Engine.

Further cleanups will happen in later Pull requests.

asmeurer commented 4 years ago

So the submodules aren't needed anymore?

aktech commented 4 years ago

Yes, they aren't needed anymore. We install everything via requirements.txt

asmeurer commented 4 years ago

I see. IIRC we were pinned to some commit between versions. We should make sure 0.7.5 doesn't break anything.

aktech commented 4 years ago

Yes, correct. I tried to break, but everything seems to work of what I tried: https://py3-runtime-dot-sympy-gamma-hrd.appspot.com/

aktech commented 4 years ago

I have tried all the possible cases I can think of and the tests passes as well. I'll merge this in next 48 hours if no objections.

asmeurer commented 4 years ago

We can still do a quick revert in the deploy if this ends up breaking, right?

aktech commented 4 years ago

Yup, quite easily.

asmeurer commented 4 years ago

OK. I wasn't sure if switching the runtime had an effect on that.

WaleedSaleh commented 4 years ago

I would really thank you for this perfect work but when running the app it is plain HTML there are no styles, whereas the styles respond with 200 status code.

aktech commented 4 years ago

@WaleedSaleh It could be a caching issue, can you try doing a Hard refresh on your browser (you can Google for your browser on how to do that.). Also just to confirm, can you share the command you are using to run the app?

aktech commented 4 years ago

@WaleedSaleh I see why you're seeing that error, you need to set Debug=True in settings.py for serving static files locally: https://github.com/sympy/sympy_gamma/blob/17b9f0e8cb440c773b0875685f0d450d9e968fc3/app/settings.py#L26

I have created a PR for mentioning this in the README: https://github.com/sympy/sympy_gamma/pull/158 Thanks for pointing this out.

WaleedSaleh commented 4 years ago

You're welcome, I used docker-compose up for running the app because when using "python mange.py runserver" this error occurs:

File "C:\Users\walee\OneDrive\Desktop\Freelance\sympy_gamma\venv\lib\site-packages\grpc__init.py", line 23, in from grpc._cython import cygrpc as _cygrpc File "src\python\grpcio\grpc_cython\cygrpc.pyx", line 27, in init grpc._cython.cygrpc File "C:\Users\walee\AppData\Local\Programs\Python\Python37\lib\asyncio\init__.py", line 39, in from .windows_events import * File "C:\Users\walee\AppData\Local\Programs\Python\Python37\lib\asyncio\windows_events.py", line 19, in from . import windows_utils File "C:\Users\walee\AppData\Local\Programs\Python\Python37\lib\asyncio\windows_utils.py", line 126, in class Popen(subprocess.Popen): TypeError: NoneType takes no arguments

aktech commented 4 years ago

@WaleedSaleh docker-compose up is the correct command. If you make the change suggested above it's should work.

WaleedSaleh commented 4 years ago

@aktech thank you, it worked with docker-compose up