PyAr / PyZombis

Programación Python para Zombis MOOC (código y materiales del curso abierto y masivo en linea)
GNU Affero General Public License v3.0
22 stars 48 forks source link

Serve via runestone #6

Closed reingart closed 7 months ago

reingart commented 5 years ago

The original course was already migrated to Restructured Text, but a proper structure using Runestone Interactive is needed to serve it as a simple web-app.

Please take a look to a simple sample project py101: interactive python lessons taken from a university course (FIUBA)

Sample online build: http://www.web2py.com.ar/runestone/static/py101/index.html

At this stage, only the lectures should be adapted to be served via Runestone (see Workshop 2017 for a more complete skeleton and info).

Quick sample startup:

git clone https://github.com/reingart/py101.git
mkvirtualenv pyzombis
pip install runestone
cd py101
runestone build
cd build/py101 ; python -m SimpleHTTPServer 8000

The last command serves the interactive book it localy.

You could also copy the book a web2py server, just do:

cp build/py101 ../web2py/applications/runestone/static/ -r

TL;DR: for PyZombis probably you should add a pavement.py and conf.py, to replace and simplify the sphinx machinery

For complete build instructions and server setup, see: Runestone documentation

urstrulykkr commented 5 years ago

I would like to take up this issue.

urstrulykkr commented 5 years ago

Need some time as I'm busy 3 days with exams. Will surely look on it from the 4th day.

veer11997 commented 5 years ago

i would like to work on the project

reingart commented 5 years ago

Hi @urstrulykkr and @veer11997 Thanks for the interest and welcome!

If you want to work in this project for GSoC, please fork the repo and reference the ticket in your commits.

Try at least to comment about a proposed solution to this issue in advance (so we can discuss and eventually distribute the tasks).

Don't forget to present yourself in the PyAr mailing list, if not done yet.

See Instructions for further steps: https://github.com/orgs/PyAr/projects

If you have any doubt, feel free to contact me via email.

urstrulykkr commented 5 years ago

@reingart there are no books in here . So I had pushed in some lectures in here in my local machine. That's what the task says,right?

urstrulykkr commented 5 years ago

The documentation of RunestoneServer is not clear from 6. Also few database issues are raised in my local machine. Help needed in setting up the DB.

reingart commented 5 years ago

@urstrulykkr at this stage, there is no need to use the RunestoneServer

Just adapt the actual ReST contents to use RunestoneComponents

Please read carefully the first comment (you could even serve the interactive book using SimpleHTTPServer as a quick Proof-of-Concept)

Please open another ticket for "RunestoneServer setup", with step by step instructions to reproduce your problem, and attach more detailed information about database issues raised.

reingart commented 5 years ago

Sample steps to create a new Runestone project:

devel@dev:~/pyzombis$ mkvirtualenv pyzombis
(pyzombis) devel@dev:~/pyzombis$ pip install runestone
(pyzombis) devel@dev:~/pyzombis$ runestone init
Skipping all DB operations because environment variables not set up
This will create a new Runestone project in your current directory.
Do you want to proceed?  [Y/n]: Y
Next we need to gather a few pieces of information to create your configuration files
Project name: (one word, no spaces): PyZombis
Path to build dir  [./build]: 
Path to deploy built site  [../../static]: 
Use Runestone Web Services  (true, false) [false]: 
Your Name  [devel]: Mariano Reingart
Title for this project  [Runestone Default]: Python para Zombis
Use Simple Python3 Semantics  [false]: true
Default ActiveCode language [python]: 
Enable inline Activecode downloads by default (single activecode downloads may be enabled with the :enabledownload: flag) [false]: 
Done.  Type runestone build to build your project
(pyzombis) devel@dev:~/pyzombis$ runestone build
Skipping all DB operations because environment variables not set up
Building with Runestone 3.3.2
Running Sphinx v1.8.4
Skipping all DB operations because environment variables not set up

The HTML pages are in build/PyZombis.
Done, PyZombis build successful
(pyzombis) devel@dev:~/pyzombis$ runestone serve
Skipping all DB operations because environment variables not set up
serving at port 8000

Then just open http://localhost:8000/ and you will get the new project template running.

At this point, you could start to editing _sources/index.rst and start to moving / adapting lectures to the runestone layout.

urstrulykkr commented 5 years ago

Thanks for the help @reingart . I shall tag an issue regarding RunestoneServer setup with all the proper instructions followed.

@urstrulykkr at this stage, there is no need to use the RunestoneServer

Just adapt the actual ReST contents to use RunestoneComponents

Please read carefully the first comment (you could even serve the interactive book using SimpleHTTPServer as a quick Proof-of-Concept)

Please open another ticket for "RunestoneServer setup", with step by step instructions to reproduce your problem, and attach more detailed information about database issues raised.

IronVenom commented 5 years ago

Hi, I would like to work on this issue and would like to apply for GSOC through this organization. Can you please tell me as to how I should proceed?

urstrulykkr commented 5 years ago

Hi @IronVenom, please do follow the instructions given above to setup your local environment in your machine. Then refer the Runestone docs for any further help in syntax and other functionalities.

All you need to do is push the lectures into Runestone layout as of now.

Good luck !

IronVenom commented 5 years ago

Thanks for the help @urstrulykkr !

IronVenom commented 5 years ago

Hello @reingart I wish to work on this issue and wish to apply for GSOC through this organization. I have made the runestone project and am working on pushing the lectures into Runestone layout. Can you please tell me how should I proceed after this? Also, , I am not able to subscribe to the PyAr mailing list, as its not accepting my confirmation code.

gurupratap-matharu commented 5 years ago

@reingart

  1. Thank you for the detailed explanation for setting up the project and configuring runestone.
  2. After creating the virtualenv, copying .rst files from lectures to _sources I did a runestone build.
  3. Runestone generated the Html's well
  4. The runestone serve works fine. See attachment.

Questions.

  1. Most of the content is in Portuguese. Are we keeping it that way or translating it?
  2. Do we have the Spanish .rst data files?
  3. Browsing through the local webserver I find many missing elements and broken links.
  4. The .rst are not in complete serialized order. Did you choose specifically like this? Or some have to be created. This will depend upon how the teaching course of Pyzombis meant to flow.

I remain attentive to your thoughts Gurupratap

gurupratap-matharu commented 5 years ago

Screenshot from 2019-03-17 09-38-29

urstrulykkr commented 5 years ago

@gurupratap-matharu and @reingart I had amended my #11 pull request. Would like to get reviewed. Also I'm figuring out the issue #12 (which is been opened by me) If you guys would like to suggest something, will be the most welcomed.

gurupratap-matharu commented 5 years ago

Okay just saw that there are pull requests with the modified rst files! Great work @urstrulykkr @IronVenom

Meantime i'll peek around other issues.