PyZombis icon indicating copy to clipboard operation
PyZombis copied to clipboard

Refactor lecture TWP42: Bases de datos (sql.js approach)

Open AngelaRemolina opened this issue 4 years ago • 2 comments

Summary

This PR may close: angelasofiaremolinagutierrez#48 I have implemented another approach (better than tha one on this PR to refacto this lecture. I use sql.js library for SQLite compiled to JavaScript. I load create the original surfersDB from the PyZombis course using the .. raw:: html tag as a global variable.

I'm still working on accessing this global variable from the activecode block with Brython. But I can confirm the db is global since in the browser console you can print it (see image below)

Checklist

  • [x] Variables, functions and comments are translated to Spanish
  • [x] Functions follow underscore notation
  • [x] Spell check done & typos fixed
  • [x] All python code is PEP8 compliant
  • [x] Test coverage with Playwright implemented; locators are Pyhton code
  • [x] Reviewers assigned (all peers & at least 1 mentor)

Note: debug prints and some comments for the draft PR have not been deleted yet. Is still on progress.

Screenshots

image

AngelaRemolina avatar Aug 13 '21 06:08 AngelaRemolina

Published to http://pyar.github.io/PyZombis/184/index.html

github-actions[bot] avatar Aug 13 '21 06:08 github-actions[bot]

Hi @angelasofiaremolinagutierrez , based on your PR i made some changes in ..raw:: html tag and now we can access the sql.js db using document module provide by activecode. Have a look at this PR #200 . I think we can use this to move forward with the lectures. Let me know what you think.

shivamshan avatar Mar 08 '22 20:03 shivamshan