Skip to content

Add simulator to editor page #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Nicholas H.Tollervey (@ntoll)
Damien P.George (@dpgeorge)
Nicholas H.Tollervey (@ntoll)
Damien P.George (@dpgeorge)
156 changes: 78 additions & 78 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,78 +1,78 @@
0.1.0
-----

* Add "Experimental" background image.
* Update help pages to reflect the latest changes.
* Add awareness of versioning and related manifest when available.
* Add file load button with drag and drop capabilities.

0.0.10
------

* Fix outstanding block related gremlins (with tests).

0.0.9
-----

* Add zoom to blocks (thanks Carlos).
* Fix next-block on panic and reset blocks (thanks again Carlos).
* Fix GIT submodule misconfiguration (thanks again [again] Carlos).
* Disable code snippets when blockly is active.
* Update documentation as per the above changes.

0.0.8
-----

* Add blockly support (requires GIT sub-modules).
* Add config object containing translation strings.
* Add feature flags to the config object.
* Check for size of Python script before flashing (added tests for this too).
* Move editor instantiation to within the HTML.
* Updated help to include latest UI changes.
* Updated README in light of changes above.

0.0.7
-----

* If there's unsaved work, ask user for confirmation if moving away from editor.
* Add save button to download raw Python script.
* Add drag to load for Python scripts and hex files.

0.0.6
-----

* Remove TouchDevelop specific elements.
* Make a stand-alone version of the editor.
* Simplification of the UI.
* Add a "share" button to create a tiny URL to point at the current script.
* Use query strings to override the script name, comment and code.
* Update to the latest version of MicroPython:
- Various minor refactors.
- Audio
- Speech
- Radio
- input() builtin
* Documentation work / tidy up.

0.0.5
-----

* Update to the latest version of MicroPython:
- Various minor code refactors.
- More efficient ticker (reduces overhead of display update by 90%).
- Add builtin set and frozenset types (from core Python).
- Don't show SystemExit or KeyboardInterrupt exceptions on the display.
* Update bug in editor that caused the status icon not to update to cloud.
* Added test script here: https://stage.microbit.co.uk/hoqumw
* Revised button-press code to be simpler.
* Minor documentation updates.

0.0.4
-----

Initial tested public release.

0.1-0.3
-------

Private test versions.
0.1.0
-----
* Add "Experimental" background image.
* Update help pages to reflect the latest changes.
* Add awareness of versioning and related manifest when available.
* Add file load button with drag and drop capabilities.
0.0.10
------
* Fix outstanding block related gremlins (with tests).
0.0.9
-----
* Add zoom to blocks (thanks Carlos).
* Fix next-block on panic and reset blocks (thanks again Carlos).
* Fix GIT submodule misconfiguration (thanks again [again] Carlos).
* Disable code snippets when blockly is active.
* Update documentation as per the above changes.
0.0.8
-----
* Add blockly support (requires GIT sub-modules).
* Add config object containing translation strings.
* Add feature flags to the config object.
* Check for size of Python script before flashing (added tests for this too).
* Move editor instantiation to within the HTML.
* Updated help to include latest UI changes.
* Updated README in light of changes above.
0.0.7
-----
* If there's unsaved work, ask user for confirmation if moving away from editor.
* Add save button to download raw Python script.
* Add drag to load for Python scripts and hex files.
0.0.6
-----
* Remove TouchDevelop specific elements.
* Make a stand-alone version of the editor.
* Simplification of the UI.
* Add a "share" button to create a tiny URL to point at the current script.
* Use query strings to override the script name, comment and code.
* Update to the latest version of MicroPython:
- Various minor refactors.
- Audio
- Speech
- Radio
- input() builtin
* Documentation work / tidy up.
0.0.5
-----
* Update to the latest version of MicroPython:
- Various minor code refactors.
- More efficient ticker (reduces overhead of display update by 90%).
- Add builtin set and frozenset types (from core Python).
- Don't show SystemExit or KeyboardInterrupt exceptions on the display.
* Update bug in editor that caused the status icon not to update to cloud.
* Added test script here: https://stage.microbit.co.uk/hoqumw
* Revised button-press code to be simpler.
* Minor documentation updates.
0.0.4
-----
Initial tested public release.
0.1-0.3
-------
Private test versions.
120 changes: 60 additions & 60 deletions CODEGUILD.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
# micro:edit

An online Python editor for the micro:bit.

This file is for students on the [Villiers Park](http://www.villierspark.org.uk/) Computer Science Course. Although the rest of you are allowed to read it too :)

## Making Changes

If you want to build new features into the editor you'll need a local copy of the code to change, as well as a way to test your changes. Here's how:

You'll need to make sure you've got [git](https://git-scm.com/), [VirtualBox](https://www.virtualbox.org/), and [Vagrant](https://www.vagrantup.com/) installed. They're all free and pretty easy to install.

Then you'll need to fork this repo (so you'll need a GitHub account, if you don't already have one). This is easy, just click the "Fork" button in the top right of this page.

You'll now have your own copy of the repository stored in your own account. You can make whatever changes you'd like to this copy; it's yours.

To make changes you'll need to clone your fork. This might require running something like this on the command line:

$ git clone https://github.com/YOUR_USERNAME/PythonEditor

This will have downloaded the repo to your computer. Let's now get vagrant up and running by doing:

$ cd PythonEditor
$ vagrant up

This one might take a while, but when it's done there will be a virtual machine running on your computer with all the code inside. We can connect to the virtual machine like this:

$ vagrant ssh

And now we can serve the website locally:

$ cd /vagrant
$ ./show.sh

If you now open this link: http://192.168.33.10:8000 you should see the editor. Except this one is running on your machine, so changes we make here will be seen on the website.

You can now edit the code and see the changes you make alter the local copy of the website. Start by changing something small to see if it works. Then think of a minor bugfix/improvement you can make and try that. When you're confident about making larger changes, go for it!


## Sharing Changes

When you're done making changes you'll want to have them included in the CodeGuild version of the website (not just your own), and then maybe even the official BBC version. So first push your changes up to your fork:

$ git add CHANGED_FILE CHANGED_FILE
$ git commit -m 'DESCRIPTION_OF_CHANGES'
$ git push origin master

If you don't know what the `git add` or `git commit` instructions are doing, ask around!

Now your fork will have the changes, let's make a pull request to the main repo to have them included in the main site. You'll need to open your fork on the GitHub website and click the "New Pull Request" button. Hopefully you'll see a green bit of text that says "Able to merge", if so, click the "Create pull request" button, provide a description of the work you've done and alick "Create pull request" again. If instead you see a red error message, you'll have to fix the problems it talks about before your work can be merged.


## Improvements

- Add a simulator to the editor
- Here's an example of a micro:bit simulator running Python: https://tools.withcode.uk/create/
- Here's the source code: https://github.com/pddring/createwithcode
- Let's add this simulator into this editor
- Make the website nicer
- Make these instructions nicer
# micro:edit
An online Python editor for the micro:bit.
This file is for students on the [Villiers Park](http://www.villierspark.org.uk/) Computer Science Course. Although the rest of you are allowed to read it too :)
## Making Changes
If you want to build new features into the editor you'll need a local copy of the code to change, as well as a way to test your changes. Here's how:
You'll need to make sure you've got [git](https://git-scm.com/), [VirtualBox](https://www.virtualbox.org/), and [Vagrant](https://www.vagrantup.com/) installed. They're all free and pretty easy to install.
Then you'll need to fork this repo (so you'll need a GitHub account, if you don't already have one). This is easy, just click the "Fork" button in the top right of this page.
You'll now have your own copy of the repository stored in your own account. You can make whatever changes you'd like to this copy; it's yours.
To make changes you'll need to clone your fork. This might require running something like this on the command line:
$ git clone https://github.com/YOUR_USERNAME/PythonEditor
This will have downloaded the repo to your computer. Let's now get vagrant up and running by doing:
$ cd PythonEditor
$ vagrant up
This one might take a while, but when it's done there will be a virtual machine running on your computer with all the code inside. We can connect to the virtual machine like this:
$ vagrant ssh
And now we can serve the website locally:
$ cd /vagrant
$ ./show.sh
If you now open this link: http://192.168.33.10:8000 you should see the editor. Except this one is running on your machine, so changes we make here will be seen on the website.
You can now edit the code and see the changes you make alter the local copy of the website. Start by changing something small to see if it works. Then think of a minor bugfix/improvement you can make and try that. When you're confident about making larger changes, go for it!
## Sharing Changes
When you're done making changes you'll want to have them included in the CodeGuild version of the website (not just your own), and then maybe even the official BBC version. So first push your changes up to your fork:
$ git add CHANGED_FILE CHANGED_FILE
$ git commit -m 'DESCRIPTION_OF_CHANGES'
$ git push origin master
If you don't know what the `git add` or `git commit` instructions are doing, ask around!
Now your fork will have the changes, let's make a pull request to the main repo to have them included in the main site. You'll need to open your fork on the GitHub website and click the "New Pull Request" button. Hopefully you'll see a green bit of text that says "Able to merge", if so, click the "Create pull request" button, provide a description of the work you've done and alick "Create pull request" again. If instead you see a red error message, you'll have to fix the problems it talks about before your work can be merged.
## Improvements
- Add a simulator to the editor
- Here's an example of a micro:bit simulator running Python: https://tools.withcode.uk/create/
- Here's the source code: https://github.com/pddring/createwithcode
- Let's add this simulator into this editor
- Make the website nicer
- Make these instructions nicer
82 changes: 41 additions & 41 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
Contributing to the Editor
==========================

Hey! Many thanks for wanting to improve the browser based editor for
MicroPython on the BBC micro:bit.

Contributions are welcome, without prejudice, from *anyone* irrespective of
who you are. If you're thinking, "but that probably doesn't mean me", then we
ESPECIALLY mean you. Good quality code and engagement with respect, humour and
intelligence wins every time.

* If you're from a background which isn't well-represented in most geeky groups, get involved - *we want to help you make a difference*.
* If you're from a background which *is* well-represented in most geeky groups, get involved - *we want your help making a difference*.
* If you're worried about not being technical enough, get involved - *your fresh perspective will be invaluable*.
* If you think you're an imposter, get involved.
* If your day job isn't code, get involved.
* This isn't a group of experts, just people. Get involved!
* We are interested in educational, social and technical problems. If you are too, get involved.
* This is a new community. *No-one knows what they are doing*, so, get involved.

We expect contributors to follow the Python Software Foundation's Code of
Conduct: https://www.python.org/psf/codeofconduct/

Feedback may be given for contributions and, where necessary, changes will
be politely requested and discussed with the originating author. Respectful
yet robust argument is most welcome.

Finally, contributions are subject to the following caveat: the contribution
was created by the contributor who, by submitting the contribution, is
confirming that they have the authority to submit the contribution and place it
under the license as defined in the LICENSE file found within this repository.

Checklist
+++++++++

* Your code should be commented in *plain English* (British spelling).
* If your contribution is for a major block of work and you've not done so
already, add yourself to the AUTHORS file following the convention found
therein.
* Try to include tests!
* Have fun!
Contributing to the Editor
==========================
Hey! Many thanks for wanting to improve the browser based editor for
MicroPython on the BBC micro:bit.
Contributions are welcome, without prejudice, from *anyone* irrespective of
who you are. If you're thinking, "but that probably doesn't mean me", then we
ESPECIALLY mean you. Good quality code and engagement with respect, humour and
intelligence wins every time.
* If you're from a background which isn't well-represented in most geeky groups, get involved - *we want to help you make a difference*.
* If you're from a background which *is* well-represented in most geeky groups, get involved - *we want your help making a difference*.
* If you're worried about not being technical enough, get involved - *your fresh perspective will be invaluable*.
* If you think you're an imposter, get involved.
* If your day job isn't code, get involved.
* This isn't a group of experts, just people. Get involved!
* We are interested in educational, social and technical problems. If you are too, get involved.
* This is a new community. *No-one knows what they are doing*, so, get involved.
We expect contributors to follow the Python Software Foundation's Code of
Conduct: https://www.python.org/psf/codeofconduct/
Feedback may be given for contributions and, where necessary, changes will
be politely requested and discussed with the originating author. Respectful
yet robust argument is most welcome.
Finally, contributions are subject to the following caveat: the contribution
was created by the contributor who, by submitting the contribution, is
confirming that they have the authority to submit the contribution and place it
under the license as defined in the LICENSE file found within this repository.
Checklist
+++++++++
* Your code should be commented in *plain English* (British spelling).
* If your contribution is for a major block of work and you've not done so
already, add yourself to the AUTHORS file following the convention found
therein.
* Try to include tests!
* Have fun!
Loading