From 2952d27fdbc3e95a7f6c829850d2a73bef572f22 Mon Sep 17 00:00:00 2001 From: Ethan Chiu <17chiue@gmail.com> Date: Thu, 12 Mar 2020 14:52:34 -0700 Subject: [PATCH 01/34] Create CODE_OF_CONDUCT.md (#57) --- CODE_OF_CONDUCT.md | 76 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..185d3072 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at 17chiue@gmail.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq From 295076be0b5ed89f87b5f38728067865a47199ba Mon Sep 17 00:00:00 2001 From: Ethan Chiu <17chiue@gmail.com> Date: Thu, 12 Mar 2020 14:53:03 -0700 Subject: [PATCH 02/34] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 38 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..dd84ea78 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..bbcbbe7d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From 415b512774728abb566ee1e56590504dd3d2c9a5 Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Sun, 29 Mar 2020 19:03:37 +1100 Subject: [PATCH 03/34] docs: Fix simple typo, vitrual -> virtual (#58) There is a small typo in README.md. Should read `virtual` rather than `vitrual`. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c90d655e..b8de9cac 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Online Python 3.6 Programming with Live Pylint Syntax Checking! ``` python3 -m venv venv ``` -3) Activate vitrual environment: +3) Activate virtual environment: ``` source venv/bin/activate ``` From 3e92c0ec321a268441f50131d307d1cd875ee5e1 Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Sat, 4 Jul 2020 13:34:23 -0400 Subject: [PATCH 04/34] Add funding button because I need to pay my server bills --- .github/FUNDING.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..4b16f597 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] From 93c3bbc81b4cd1efe9b17331e27812327737f17b Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Sat, 4 Jul 2020 13:34:59 -0400 Subject: [PATCH 05/34] Create FUNDING.yml --- FUNDING.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 FUNDING.yml diff --git a/FUNDING.yml b/FUNDING.yml new file mode 100644 index 00000000..019f0333 --- /dev/null +++ b/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: ethanchewy # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] From 08e1121a9d6cb5c57143e654303ea958093fde12 Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Sat, 4 Jul 2020 13:35:32 -0400 Subject: [PATCH 06/34] Update FUNDING.yml --- FUNDING.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/FUNDING.yml b/FUNDING.yml index 019f0333..3a3efaa2 100644 --- a/FUNDING.yml +++ b/FUNDING.yml @@ -1,12 +1 @@ -# These are supported funding model platforms - -github: ethanchewy # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] +github: ethanchewy From fda9a138612bb91ab7cafecf0455372af9ce88a8 Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Sat, 4 Jul 2020 13:35:46 -0400 Subject: [PATCH 07/34] Update FUNDING.yml --- .github/FUNDING.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 4b16f597..3a3efaa2 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,12 +1 @@ -# These are supported funding model platforms - -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] +github: ethanchewy From d8e11542d81cef36de4c46715a39b57abfb2c1ad Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Thu, 23 Jul 2020 17:42:04 -0400 Subject: [PATCH 08/34] Remove sponsorship. --- README.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b8de9cac..8cf20452 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ I started working on this in 2016 after seeing no one had addressed the issue of So, ever since then, I've always been trying to improve PythonBuddy such as security and scalabitliy. Thus, I have dedicated as much as my free time into this project. -Since 2016, it's cost more than $250 per year to run and deploy the demo site excluding development costs. +Since 2016, it's cost more than $360 per year to run and deploy the demo site excluding development costs. Before college, I've been able to save money from various jobs. Now that I am in college, I have to pay a hefty tuition, housing, food, etc so it's much harder to sustain PythonBuddy even with a part-time job. @@ -163,11 +163,6 @@ Any donation would be greatly appreciated. No donation is too small. A dollar goes a long way :) ### Sponsorships: - - - - - - +Ethan Chiu (~$30 per month for server costs) If you are interested in sponsoring this project and getting you or your company featured in the README or demo site, feel free to contact me at 17chiue@gmail.com. PythonBuddy gets over 4000 visits every day. From 5f95a5f10087d5133d2159cf72f217cf7b5c87a9 Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Thu, 15 Oct 2020 22:36:09 -0700 Subject: [PATCH 09/34] Remove Donations + Sponsorships I'm not running the demo server anymore because it's too costly at the moment for me to host it all by myself. I believe this README suffices for understanding how this open-source repo works. If someone else wants to run a demo server, I'd be happy to link it in the README. --- README.md | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/README.md b/README.md index 8cf20452..ac6b8661 100644 --- a/README.md +++ b/README.md @@ -141,28 +141,3 @@ Featured on Python Weekly, CSS Author, and the Talk Python Podcast +Featured on FlaskCon 2020, Python Weekly, CSS Author, and the Talk Python Podcast ### Credits: This was made by Ethan Chiu as a research project under the guidance of Wellesley College professor Eni Mustafaraj. From 14fd4d3de93dccfbacaa4580c374249f811d7fcc Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Thu, 15 Oct 2020 22:39:42 -0700 Subject: [PATCH 11/34] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index f55ee5be..c237e04a 100644 --- a/README.md +++ b/README.md @@ -141,3 +141,7 @@ Featured on Fl ### Credits: This was made by Ethan Chiu as a research project under the guidance of Wellesley College professor Eni Mustafaraj. + +### Other: +As of Octobe 2020, PythonBuddy.com will no longer be a demo server for this open-source project due to the increasing costs of hosting it for 80,000+ people monthly. Instead, this URL will redirect back to this GitHub repo. + From 32fa5a7c8eaa6c7f14ff5f329370ff3b14296d88 Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Thu, 15 Oct 2020 22:39:59 -0700 Subject: [PATCH 12/34] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c237e04a..419e35a4 100644 --- a/README.md +++ b/README.md @@ -143,5 +143,5 @@ Featured on Fl This was made by Ethan Chiu as a research project under the guidance of Wellesley College professor Eni Mustafaraj. ### Other: -As of Octobe 2020, PythonBuddy.com will no longer be a demo server for this open-source project due to the increasing costs of hosting it for 80,000+ people monthly. Instead, this URL will redirect back to this GitHub repo. +As of October 2020, PythonBuddy.com will no longer be a demo server for this open-source project due to the increasing costs of hosting it for 80,000+ people monthly. Instead, this URL will redirect back to this GitHub repo. From 51a0414c3d56e34036f093de565f4725921344f4 Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Thu, 15 Oct 2020 23:09:29 -0700 Subject: [PATCH 13/34] Remove travis => replace with actions --- .travis.yml | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fa4d8cb0..00000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: python -python: - - "3.6" -# command to install dependencies -install: - - "pip install -r requirements.txt" - - pip install coverage - - pip install coveralls -# command to run tests -script: - - pytest - - coverage run --source=PythonBuddy -m unittest tests/test_linter.py - - coverage report -m - - coveralls From b80708126bbc6d00e0e7141e707da8a997c8fcb3 Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Thu, 15 Oct 2020 23:10:23 -0700 Subject: [PATCH 14/34] Update pythonapp.yml --- .github/workflows/pythonapp.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 5639973b..b390b4ba 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -9,7 +9,7 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Set up Python 3.7 + - name: Test requirements uses: actions/setup-python@v1 with: python-version: 3.7 @@ -17,14 +17,3 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt - - name: Lint with flake8 - run: | - pip install flake8 - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pip install pytest - pytest From 800ce51960316b0439cfdde3e9a08fe303345e2a Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Fri, 16 Oct 2020 23:11:34 -0700 Subject: [PATCH 15/34] Update README.md --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index 419e35a4..b89f224c 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,6 @@ [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](http://paypal.me/Ethan302)
Online Python 3.6 Programming with Live Pylint Syntax Checking! -
- - Demo: http://pythonbuddy.com - -
![](gifs/demo.gif) ### Usage From a2060295421a9251a515c36f7bedbf99f0e4961e Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Fri, 16 Oct 2020 23:11:49 -0700 Subject: [PATCH 16/34] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b89f224c..71d263bf 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](http://paypal.me/Ethan302)
Online Python 3.6 Programming with Live Pylint Syntax Checking! +
![](gifs/demo.gif) ### Usage From 7889f39acb624e5a146ac7a6052c83106ccf61ef Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Thu, 22 Oct 2020 10:21:43 -0700 Subject: [PATCH 17/34] refactor --- PythonBuddy/app.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PythonBuddy/app.py b/PythonBuddy/app.py index 5ab0f7c2..430d4655 100644 --- a/PythonBuddy/app.py +++ b/PythonBuddy/app.py @@ -71,8 +71,6 @@ def check_code(): return jsonify(output) # Run python in secure system - - @app.route('/run_code', methods=['POST']) def run_code(): """Run python 3 code @@ -87,6 +85,9 @@ def run_code(): session["time_now"] = datetime.now() output = None + if not "file_name" in session: + with tempfile.NamedTemporaryFile(delete=False) as temp: + session["file_name"] = temp.name cmd = 'python ' + session["file_name"] p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True) @@ -120,13 +121,12 @@ def evaluate_pylint(text): """ # Open temp file for specific session. # IF it doesn't exist (aka the key doesn't exist), create one - try: - session["file_name"] + if "file_name" in session: f = open(session["file_name"], "w") for t in text: f.write(t) f.flush() - except KeyError as e: + else: with tempfile.NamedTemporaryFile(delete=False) as temp: session["file_name"] = temp.name for t in text: From f8906c72f72b9b0e2f2ebf5b3d805f9122160737 Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Thu, 22 Oct 2020 10:29:10 -0700 Subject: [PATCH 18/34] Fix instructions --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 71d263bf..7bb071d5 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Online Python 3.6 Programming with Live Pylint Syntax Checking! ``` git clone https://github.com/ethanchewy/PythonBuddy.git ``` -2) Change to directory +2) Change to PythonBuddy directory ``` cd PythonBuddy ``` @@ -27,13 +27,13 @@ Online Python 3.6 Programming with Live Pylint Syntax Checking! ``` pip install -r requirements.txt ``` -5) Set FLASK_APP variable: +5) Change to the PythonBuddy application folder. You should now be in `PythonBuddy/PythonBuddy/`. ``` - export FLASK_APP=app.py + cd PythonBuddy ``` -6) Change to app folder +6) Set FLASK_APP variable: ``` - cd PythonBuddy + export FLASK_APP=app.py ``` 7) Run flask app: ``` From 42aeddb2b9b8e0d6ca20e23c728e072af6c638c3 Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Tue, 27 Oct 2020 22:49:28 -0700 Subject: [PATCH 19/34] Clarify Docs --- README.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7bb071d5..6ffeb2a2 100644 --- a/README.md +++ b/README.md @@ -23,19 +23,25 @@ Online Python 3.6 Programming with Live Pylint Syntax Checking! ``` source venv/bin/activate ``` -4) Pipe requirements to venv folder: +4) Enusre that your virtualenv uses Python 3.6.9 via this command: + ``` + python --version + ``` + If you don't use Python 3.6.9, some Python libraries that PythonBuddy relies on may not work. Please refer to this documentation for figuring out how to create a specific version of Python via vitualenv via this StackOverflow [post](https://stackoverflow.com/a/39713544). + +5) Pipe requirements to venv folder: ``` pip install -r requirements.txt ``` -5) Change to the PythonBuddy application folder. You should now be in `PythonBuddy/PythonBuddy/`. +6) Change to the PythonBuddy application folder. You should now be in `PythonBuddy/PythonBuddy/`. ``` cd PythonBuddy ``` -6) Set FLASK_APP variable: +7) Set FLASK_APP variable: ``` export FLASK_APP=app.py ``` -7) Run flask app: +8) Run flask app: ``` flask run ``` From 4f89ba2d9cca22db1e616493561bb98debdd619c Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Tue, 27 Oct 2020 22:55:08 -0700 Subject: [PATCH 20/34] Update Libraries --- requirements.txt | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4e5ed667..a85dac76 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,24 +1,21 @@ -astroid==2.0.4 -click==6.7 -dnspython==1.15.0 -eventlet==0.24.1 -Flask==1.0.2 -Flask-SocketIO==3.0.2 -greenlet==0.4.15 -isort==4.3.4 -itsdangerous==0.24 -Jinja2==2.10.1 -lazy-object-proxy==1.3.1 -MarkupSafe==1.0 +astroid==2.4.2 +click==7.1.2 +dnspython==1.16.0 +eventlet==0.29.1 +Flask==1.1.2 +Flask-SocketIO==4.3.1 +greenlet==0.4.17 +isort==5.6.4 +itsdangerous==1.1.0 +Jinja2==2.11.2 +lazy-object-proxy==1.4.3 +MarkupSafe==1.1.1 mccabe==0.6.1 -monotonic==1.5 -pylint==2.1.1 -python-engineio==3.8.2.post1 -python-socketio==2.0.0 -six==1.11.0 -typed-ast==1.1.0 -Werkzeug==0.15.3 -wrapt==1.10.11 -pytest==5.2.1 -pytest-cov==2.8.1 -pytest-html==2.0.0 +pylint==2.6.0 +python-engineio==3.13.2 +python-socketio==4.6.0 +six==1.15.0 +toml==0.10.1 +typed-ast==1.4.1 +Werkzeug==1.0.1 +wrapt==1.12.1 From 008e03c0f1c179afbe2bb1e412bd17c312f0749f Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Tue, 27 Oct 2020 23:00:14 -0700 Subject: [PATCH 21/34] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6ffeb2a2..d1a838da 100644 --- a/README.md +++ b/README.md @@ -23,11 +23,11 @@ Online Python 3.6 Programming with Live Pylint Syntax Checking! ``` source venv/bin/activate ``` -4) Enusre that your virtualenv uses Python 3.6.9 via this command: +4) Enusre that your virtualenv uses Python 3.7.6 via this command: ``` python --version ``` - If you don't use Python 3.6.9, some Python libraries that PythonBuddy relies on may not work. Please refer to this documentation for figuring out how to create a specific version of Python via vitualenv via this StackOverflow [post](https://stackoverflow.com/a/39713544). + If you don't use Python Python 3.7.6, some Python libraries that PythonBuddy relies on **may not work**. Please refer to this documentation for figuring out how to create a specific version of Python via vitualenv via this StackOverflow [post](https://stackoverflow.com/a/39713544). 5) Pipe requirements to venv folder: ``` From 973a49ebd2313ef11caebc7b64bb6838b8e8e847 Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Tue, 27 Oct 2020 23:00:25 -0700 Subject: [PATCH 22/34] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d1a838da..d4cd49bb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Travis branch](https://img.shields.io/travis/rust-lang/rust/master.svg)](https://travis-ci.org/ethanchewy/OnlinePythonLinterSyntaxChecker) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](http://paypal.me/Ethan302)
-Online Python 3.6 Programming with Live Pylint Syntax Checking! +Online Python 3 Programming with Live Pylint Syntax Checking!
![](gifs/demo.gif) From 7ec6471bc5acbb769a59589e399cf8295d077cb2 Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Wed, 28 Oct 2020 20:03:40 -0700 Subject: [PATCH 23/34] Delete FUNDING.yml --- FUNDING.yml | 1 - 1 file changed, 1 deletion(-) delete mode 100644 FUNDING.yml diff --git a/FUNDING.yml b/FUNDING.yml deleted file mode 100644 index 3a3efaa2..00000000 --- a/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: ethanchewy From ef3c0f1e49599903155323c5f4e291124c11339c Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Fri, 30 Oct 2020 22:27:27 -0700 Subject: [PATCH 24/34] Add donations section to help bring more awareness to important issues in society --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index d4cd49bb..2f602284 100644 --- a/README.md +++ b/README.md @@ -147,3 +147,15 @@ This was made by Ethan Chiu as a research project under the guidance of Wellesle ### Other: As of October 2020, PythonBuddy.com will no longer be a demo server for this open-source project due to the increasing costs of hosting it for 80,000+ people monthly. Instead, this URL will redirect back to this GitHub repo. +### What can I do help support PythonBuddy? +If you enojyed using this open-source project, please consider donating whatever you can to these organizations I think that are super cool: +- https://www.nami.org/Home +- https://www.cradlestocrayons.org/ +- https://codenation.org/ + +If you don't have the means, consider checking out some of these free action items and information: +- https://blacklivesmatters.carrd.co/#petitions +- https://news.berkeley.edu/story_jump/end-of-affirmative-action-at-uc-hurt-black-latinx-students-study-finds/ +- https://www.vote.org/ +- https://www.bentley.edu/news/confronting-anti-asian-racism-age-coronavirus +- https://en.wikipedia.org/wiki/Bamboo_ceiling From 0e2a77619b0ac5430fe2691ee475a88b333245c3 Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Sat, 31 Oct 2020 00:45:53 -0700 Subject: [PATCH 25/34] grammar --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2f602284..fa4f8148 100644 --- a/README.md +++ b/README.md @@ -148,12 +148,12 @@ This was made by Ethan Chiu as a research project under the guidance of Wellesle As of October 2020, PythonBuddy.com will no longer be a demo server for this open-source project due to the increasing costs of hosting it for 80,000+ people monthly. Instead, this URL will redirect back to this GitHub repo. ### What can I do help support PythonBuddy? -If you enojyed using this open-source project, please consider donating whatever you can to these organizations I think that are super cool: +If you enojyed using this open-source project, please consider donating whatever you can to these organizations that address problems I'm passionate about: - https://www.nami.org/Home - https://www.cradlestocrayons.org/ - https://codenation.org/ -If you don't have the means, consider checking out some of these free action items and information: +If you don't have the means to donate to the above, consider checking out some of these free action items and information: - https://blacklivesmatters.carrd.co/#petitions - https://news.berkeley.edu/story_jump/end-of-affirmative-action-at-uc-hurt-black-latinx-students-study-finds/ - https://www.vote.org/ From 84b35dbec20da70dbccc2a8de5d15aa507360d37 Mon Sep 17 00:00:00 2001 From: Ethan Chiu Date: Sat, 31 Oct 2020 02:44:09 -0700 Subject: [PATCH 26/34] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fa4f8148..7f4149d3 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ This was made by Ethan Chiu as a research project under the guidance of Wellesle ### Other: As of October 2020, PythonBuddy.com will no longer be a demo server for this open-source project due to the increasing costs of hosting it for 80,000+ people monthly. Instead, this URL will redirect back to this GitHub repo. -### What can I do help support PythonBuddy? +### How can I support PythonBuddy? If you enojyed using this open-source project, please consider donating whatever you can to these organizations that address problems I'm passionate about: - https://www.nami.org/Home - https://www.cradlestocrayons.org/ From ec889324d46ff9bc4ff03ed95ff81c4600818344 Mon Sep 17 00:00:00 2001 From: Ethan Chiu <17chiue@gmail.com> Date: Sat, 19 Feb 2022 18:59:50 -0500 Subject: [PATCH 27/34] Update License to 2022 --- LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index 0017cc46..164c8c89 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2019, Ethan Chiu. All rights reserved. +Copyright (c) 2022, Ethan Chiu. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: From dbd79c29316e713c9be75cc57928a6b7bd90cf10 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 27 Mar 2022 08:11:45 -0700 Subject: [PATCH 28/34] Bump jinja2 from 2.11.2 to 2.11.3 (#62) Bumps [jinja2](https://github.com/pallets/jinja) from 2.11.2 to 2.11.3. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst) - [Commits](https://github.com/pallets/jinja/compare/2.11.2...2.11.3) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a85dac76..99dd2387 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ Flask-SocketIO==4.3.1 greenlet==0.4.17 isort==5.6.4 itsdangerous==1.1.0 -Jinja2==2.11.2 +Jinja2==2.11.3 lazy-object-proxy==1.4.3 MarkupSafe==1.1.1 mccabe==0.6.1 From 3f9baeccfb264e67475a257f19e17e4f791990a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 27 Mar 2022 08:12:25 -0700 Subject: [PATCH 29/34] Bump eventlet from 0.29.1 to 0.31.0 (#63) Bumps [eventlet](https://github.com/eventlet/eventlet) from 0.29.1 to 0.31.0. - [Release notes](https://github.com/eventlet/eventlet/releases) - [Changelog](https://github.com/eventlet/eventlet/blob/master/NEWS) - [Commits](https://github.com/eventlet/eventlet/compare/v0.29.1...v0.31.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 99dd2387..47a4ae7a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ astroid==2.4.2 click==7.1.2 dnspython==1.16.0 -eventlet==0.29.1 +eventlet==0.31.0 Flask==1.1.2 Flask-SocketIO==4.3.1 greenlet==0.4.17 From 60176f4d0ada903a7fa92bcb2d33399178b92158 Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Tue, 6 Dec 2022 16:49:46 +1100 Subject: [PATCH 30/34] docs: Fix a few typos (#65) There are small typos in: - PythonBuddy/static/js/cm-validator-remote.js - README.md Fixes: - Should read `virtualenv` rather than `vitualenv`. - Should read `error` rather than `eror`. - Should read `enjoyed` rather than `enojyed`. - Should read `curriculum` rather than `curriculumn`. Signed-off-by: Tim Gates Signed-off-by: Tim Gates --- PythonBuddy/static/js/cm-validator-remote.js | 2 +- README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PythonBuddy/static/js/cm-validator-remote.js b/PythonBuddy/static/js/cm-validator-remote.js index c1c1b680..f491774e 100644 --- a/PythonBuddy/static/js/cm-validator-remote.js +++ b/PythonBuddy/static/js/cm-validator-remote.js @@ -17,7 +17,7 @@ CodeMirror.remoteValidator = function(cm, updateLinting, options) { { var error = error_list[i]; - // Null check to make sure eror message is not empty + // Null check to make sure error message is not empty if (error.line_no != null && error.message != null && error.severity != null) { var start_line = error.line_no; diff --git a/README.md b/README.md index 7f4149d3..0e7ffd94 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Online Python 3 Programming with Live Pylint Syntax Checking! ``` python --version ``` - If you don't use Python Python 3.7.6, some Python libraries that PythonBuddy relies on **may not work**. Please refer to this documentation for figuring out how to create a specific version of Python via vitualenv via this StackOverflow [post](https://stackoverflow.com/a/39713544). + If you don't use Python Python 3.7.6, some Python libraries that PythonBuddy relies on **may not work**. Please refer to this documentation for figuring out how to create a specific version of Python via virtualenv via this StackOverflow [post](https://stackoverflow.com/a/39713544). 5) Pipe requirements to venv folder: ``` @@ -112,7 +112,7 @@ pytest --cov-report html --cov=PythonBuddy tests/ ### FAQ: Why did you make this?
-In 2014, I was a Community TA at MIT edX 6.00.1x course where I helped teach over 1000 students. The year after I started researching under Prof. Eni Mustafaraj. She had a data set from that course and we saw a high attrition rate of students within the first 2 weeks. After digging through the curriculumn and data, I realized that the students left because of difficulties setting up their Python environment and complex error messages that they couldn't solve when running their code (ex: some students had path issues). +In 2014, I was a Community TA at MIT edX 6.00.1x course where I helped teach over 1000 students. The year after I started researching under Prof. Eni Mustafaraj. She had a data set from that course and we saw a high attrition rate of students within the first 2 weeks. After digging through the curriculum and data, I realized that the students left because of difficulties setting up their Python environment and complex error messages that they couldn't solve when running their code (ex: some students had path issues).
So, I created PythonBuddy to address this issue so that students wouldn't have to go through the frustrations of setting up a Python environment and running into seemingly "random" bugs. PythonBuddy allows users to jump right into Python programming with the support of live syntax checking & highlighting. Also, professors and teachers could easily set up a server and allow students to quickly test out their code with PythonBuddy online. @@ -148,7 +148,7 @@ This was made by Ethan Chiu as a research project under the guidance of Wellesle As of October 2020, PythonBuddy.com will no longer be a demo server for this open-source project due to the increasing costs of hosting it for 80,000+ people monthly. Instead, this URL will redirect back to this GitHub repo. ### How can I support PythonBuddy? -If you enojyed using this open-source project, please consider donating whatever you can to these organizations that address problems I'm passionate about: +If you enjoyed using this open-source project, please consider donating whatever you can to these organizations that address problems I'm passionate about: - https://www.nami.org/Home - https://www.cradlestocrayons.org/ - https://codenation.org/ From 45619cdb455c3985538a96b81f7e59471ca9ae85 Mon Sep 17 00:00:00 2001 From: Ethan Chiu <17chiue@gmail.com> Date: Fri, 5 Jul 2024 22:08:17 -0700 Subject: [PATCH 31/34] Update README.md --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index 0e7ffd94..1dfb33fa 100644 --- a/README.md +++ b/README.md @@ -147,12 +147,6 @@ This was made by Ethan Chiu as a research project under the guidance of Wellesle ### Other: As of October 2020, PythonBuddy.com will no longer be a demo server for this open-source project due to the increasing costs of hosting it for 80,000+ people monthly. Instead, this URL will redirect back to this GitHub repo. -### How can I support PythonBuddy? -If you enjoyed using this open-source project, please consider donating whatever you can to these organizations that address problems I'm passionate about: -- https://www.nami.org/Home -- https://www.cradlestocrayons.org/ -- https://codenation.org/ - If you don't have the means to donate to the above, consider checking out some of these free action items and information: - https://blacklivesmatters.carrd.co/#petitions - https://news.berkeley.edu/story_jump/end-of-affirmative-action-at-uc-hurt-black-latinx-students-study-finds/ From 26b37a8e6c95afda85715234f3c8cfba1cbe7f3b Mon Sep 17 00:00:00 2001 From: Ethan Chiu <17chiue@gmail.com> Date: Fri, 5 Jul 2024 22:08:59 -0700 Subject: [PATCH 32/34] Update README.md --- README.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/README.md b/README.md index 1dfb33fa..ee59b519 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ #
PythonBuddy 🖊️ 🐍 -[![Travis branch](https://img.shields.io/travis/rust-lang/rust/master.svg)](https://travis-ci.org/ethanchewy/OnlinePythonLinterSyntaxChecker) -[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](http://paypal.me/Ethan302)
Online Python 3 Programming with Live Pylint Syntax Checking!
@@ -146,10 +144,3 @@ This was made by Ethan Chiu as a research project under the guidance of Wellesle ### Other: As of October 2020, PythonBuddy.com will no longer be a demo server for this open-source project due to the increasing costs of hosting it for 80,000+ people monthly. Instead, this URL will redirect back to this GitHub repo. - -If you don't have the means to donate to the above, consider checking out some of these free action items and information: -- https://blacklivesmatters.carrd.co/#petitions -- https://news.berkeley.edu/story_jump/end-of-affirmative-action-at-uc-hurt-black-latinx-students-study-finds/ -- https://www.vote.org/ -- https://www.bentley.edu/news/confronting-anti-asian-racism-age-coronavirus -- https://en.wikipedia.org/wiki/Bamboo_ceiling From dcf027f76d9315500378137a01be4c80731f26b1 Mon Sep 17 00:00:00 2001 From: Ethan Chiu <17chiue@gmail.com> Date: Fri, 5 Jul 2024 22:09:09 -0700 Subject: [PATCH 33/34] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ee59b519..b8152e43 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@
Online Python 3 Programming with Live Pylint Syntax Checking!
+ ![](gifs/demo.gif) ### Usage From 91dfbf106c6896455b98ae10bd29386957ffd918 Mon Sep 17 00:00:00 2001 From: Elvis Wei <57282833+ewei068@users.noreply.github.com> Date: Sat, 19 Apr 2025 00:12:23 -0700 Subject: [PATCH 34/34] Added support for GitHub Codespaces (#69) * Create devContainer.json * setup script & readme instructions for Codespaces --- .devcontainer/devcontainer.json | 6 ++++++ README.md | 17 +++++++++++++++++ setup.sh | 8 ++++++++ 3 files changed, 31 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100644 setup.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..d98d252d --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,6 @@ +{ + "name": "PythonBuddy", + "image": "mcr.microsoft.com/vscode/devcontainers/python:3.7", + "features": { + } +} diff --git a/README.md b/README.md index b8152e43..8f9365d8 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,23 @@ Online Python 3 Programming with Live Pylint Syntax Checking! ![](gifs/demo.gif) ### Usage + +**GitHub Codespaces** + +The quickest way to use PythonBuddy is to launch your own GitHub Codespace! + +1) From the GitHub repo, click the green "Code" button and select "Codespaces". +2) Create a new Codespace or select a previous one you've already created. +3) Navigate to the new tab created for your Codespace. +4) In terminal, run `bash ./setup.sh` +5) Click "Open in Browser" in the bottom right corner after the setup is complete. + * The website may take a while to load or error at first while GitHub sets up the preview environment. In this case, reload the website. +6) Remember to **stop your workspace** after you're done using it. + +**Local Use** + +Due to Codespace's monthly limits, it's recommended to run PythonBuddy locally if used often. + 1) Fetch from repo: ``` git clone https://github.com/ethanchewy/PythonBuddy.git diff --git a/setup.sh b/setup.sh new file mode 100644 index 00000000..1a98ed3b --- /dev/null +++ b/setup.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +FLASK_APP=app.py + +pip install -r requirements.txt + +cd PythonBuddy +flask run \ No newline at end of file