11SymPy Gamma
22===========
33
4+ .. image :: https://travis-ci.org/sympy/sympy_gamma.svg?branch=master
5+ :target: https://travis-ci.org/sympy/sympy_gamma
6+
47`SymPy Gamma <https://www.sympygamma.com >`_ is a simple web application based
58on Google App Engine that executes and displays the results of SymPy
69expressions as well as additional related computations, in a fashion similar
@@ -20,20 +23,7 @@ information from loading.
2023Installation
2124------------
2225
23- Download and unpack most recent Google App Engine SDK for Python from
24- https://code.google.com/appengine/downloads.html, e.g.::
25-
26- $ wget https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.90.zip
27- $ unzip google_appengine_1.9.90.zip
28-
29- On the Mac, it is a disk image with an application, which you should
30- drag to your Applications folder. Open the program and install the
31- symlinks (it should ask you the first time you open the application, but
32- if it doesn't, choose "Make Symlinks..." from the
33- GoogleAppEngineLauncher menu). Note that you will have to do this again
34- each time you update the AppEngine program.
35-
36- Then clone sympy_gamma repository::
26+ Clone sympy_gamma repository::
3727
3828 $ git clone git://github.com/sympy/sympy_gamma.git
3929 $ cd sympy_gamma
@@ -46,50 +36,26 @@ We use submodules to include external libraries in sympy_gamma::
4636This is sufficient to clone appropriate repositories in correct versions
4737into sympy_gamma (see git documentation on submodules for information).
4838
49- Install Dependencies
50- --------------------
51-
52- The project depends on some third-party libraries that are not on the list
53- of built-in libraries (in app.yaml) bundled with the runtime, to install them
54- run the following command.::
55-
56- pip install -r requirements/requirements.txt -t lib/
57-
58- Some libraries although available on app engine runtime, but needs to be
59- installed locally for development.
60-
61- Ref: https://cloud.google.com/appengine/docs/standard/python/tools/using-libraries-python-27#local_development ::
62-
63- pip install -r requirements/local_requirements.txt
64-
65- You will need to install Datastore Emulator as well, which comes from gcloud's SDK,
66- install the Google Cloud SDK for your OS from here: https://cloud.google.com/sdk/install
67- Then run the following commands to install and run the datastore emulator in the background::
68-
69- gcloud components install cloud-datastore-emulator --quiet
70- gcloud beta emulators datastore start &
71-
7239
73- Development server
40+ Development Server
7441------------------
7542
76- Now you are ready to run development web server::
43+ To setup the development environment and run the app locally, you
44+ need ``docker `` and ``docker-compose ``:
7745
78- $ ../google_appengine/dev_appserver.py .
46+ * https://docs.docker.com/get-docker/
47+ * https://docs.docker.com/compose/install/
7948
80- On the Mac, just run::
49+ Now you are ready to run development web server ::
8150
82- $ dev_appserver.py .
51+ $ docker-compose up
8352
84- (make sure you installed the symlinks as described above) .
53+ This will build and run the image for app and datastore emulator .
8554
86- I couldn't figure out how to make it work in the GUI (it won't find the
87- sympy git submodule). If you figure out how to do it, please update
88- this file and send a patch describing how to do it.
55+ This will spin up a local server that runs on port `` 8080 ``.
56+ Open a web browser and go to http://localhost:8080.
57+ You should see GUI of SymPy Gamma
8958
90- This is a local server that runs on port 8080 (use ``--port `` option to
91- change this). Open a web browser and go to http://localhost:8080. You
92- should see GUI of SymPy Gamma.
9359
9460Deploying to GAE
9561----------------
@@ -114,6 +80,11 @@ the google cloud console for the project::
11480
11581 $ gcloud init
11682
83+ You need to to create ``lib `` (libraries) before deploying, make sure the development
84+ server is up and running via ``docker-compose ``, as mentioned above and create
85+ libraries folder to package with the following command::
86+
87+ $ docker cp gamma_app:/usr/src/app/lib lib
11788
11889Assuming that sympy_gamma works properly (also across different mainstream web
11990browsers), you can upload your changes to Google App Engine, replacing the
@@ -161,6 +132,12 @@ Currently, there is no testing server set up as there is for SymPy
161132Live. However, you can set up your own testing server (it's free, though it
162133requires a cell phone to set up).
163134
135+ You need to to create ``lib `` (libraries) before deploying, make sure the development
136+ server is up and running via ``docker-compose ``, as mentioned above and create
137+ libraries folder to package with the following command::
138+
139+ $ docker cp gamma_app:/usr/src/app/lib lib
140+
164141Either way, to test, you will need to edit the Project ID in the deploy command
165142mentioned above with your Project ID and the version you want to deploy to::
166143
@@ -206,21 +183,11 @@ versions automatically.
206183Running Tests
207184-------------
208185
209- To be able to run tests, make sure you have testing libraries installed::
210-
211- npm install -g casperjs
212- pip install nose
213-
214- Install phantomjs for your system from: https://phantomjs.org/download.html
215-
216- To run unit tests::
217-
218- PYTHONPATH='.' nosetests app/test -vv
219-
220- To run PhantomJS Tests::
221-
222- casperjs test app/test
186+ To run tests you need to spinup the container as mentioned above
187+ via ``docker-compose `` and run the following command::
223188
189+ $ docker-compose exec app nosetests app/test -vv
190+ $ docker-compose exec app casperjs test app/test
224191
225192Pulling changes
226193---------------
0 commit comments