-
Notifications
You must be signed in to change notification settings - Fork 0
Developer Guide
Since Octolapse is an OctoPrint plugin, you'll need OctoPrint to run basically anything. Follow the instructions here to install OctoPrint. Some useful reading about OctoPrint plugins is available here.
Clone Octolapse into its own folder.
git clone [email protected]:FormerLurker/Octolapse.git
Go to File > Settings > Project > Project Interpreter
and change the project interpreter to the one you created during the OctoPrint install (it should point to OctoPrint/venv/bin/python2.7
).
In order to standardize formatting across many editors and IDEs, we use EditorConfig. Go to File > Settings > Plugins
and install the EditorConfig plugin. This will automatically detect the .editorconfig
file at the root level of the repository and load the correct settings.
Right click on octoprint_octolapse/test
and select Run Twisted Trial in test to run all tests.
Go to File > Settings > Plugins
and install the BashSupport plugin.
Start by setting up a run configuration that will install Octolapse.
Go to Run > Edit Configurations
Add a new run configuration for Bash. Fill out the fields as follows:
Name: Install Octolapse
Script: octoprint dev plugin:install
Interpreter path: /bin/bash
Interpreter options: --rcfile <path-to-octoprint>/OctoPrint/octoprint_venv/bin/activate -i -c
Working directory: <path-to-octolapse>/Octolapse
Also check the Single instance only
checkbox in the top right corner.
You can check your run configuration by running it (Run > Run... > Install Octolapse
).
Return to Run > Run... > Edit Configurations
. Add another new run configuration for Bash. Again, fill out the fields as follows:
Name: OctoPrint Server with Octolapse
Script: octoprint serve
Interpreter path: /bin/bash
Interpreter options: --rcfile <path-to-octoprint>/OctoPrint/octoprint_venv/bin/activate -i -c
Before launch: Run another configuration > Install Octolapse
Also check the Single instance only
checkbox in the top right corner.
You can check your run configuration by running it (Run > Run... > Run OctoPrint server with Octolapse
). You should see a terminal pop up with the OctoPrint server's stdout
stream. Open your browser to http://localhost:5000/
to visit the OctoPrint server. Make sure Octolapse is installed as well.
One time only For your first setup, you'll need to setup SSH access via public/private key.
- Generate SSH key. Run
ssh-keygen
and follow the prompts. It's fine to leave everything as defaults. - Copy to Raspberry Pi.
ssh-id-copy pi@<ip-address-of-pi>
can be useful for this. - You should now be able to log into the Raspberry Pi without entering a password. Test with
ssh pi@<ip-address-of-pi>
.
How to run The steps we'll be following to run the local copy of Octolapse on a remote Raspberry Pi is as follows:
- Zip the plugin up.
zip -FSr /tmp/octolapse-local-dev.zip Octolapse/
- sFTP the fle over to the Pi.
sftp pi@<ip-address-of-pi>:/tmp <<< $'put /tmp/octolapse-local-dev.zip'
- Uninstall/Install/Cleanup.
ssh pi@<ip-address-of-pi> "/home/pi/oprint/bin/python -m pip uninstall --yes Octolapse && /home/pi/oprint/bin/python -m pip install /tmp/octolapse-local-dev.zip --no-cache-dir && rm /tmp/octolapse-local-dev.zip"
Integration into Pycharm You guessed it: create a new Run Configuration with the following fields:
Name: Install local Octolapse to Pi
Script: zip -FSr /tmp/octolapse-local-dev.zip Octolapse/ && sftp pi@<ip-address-of-pi>:/tmp <<< $'put /tmp/octolapse-local-dev.zip' && ssh pi@<ip-address-of-pi> "/home/pi/oprint/bin/python -m pip uninstall --yes Octolapse && /home/pi/oprint/bin/python -m pip install /tmp/octolapse-local-dev.zip --no-cache-dir && rm /tmp/octolapse-local-dev.zip && sudo service octoprint restart"
Interpreter path: /bin/bash
Interpreter options: -c
Working directory: <path-to-octolapse>
Octolapse uses OctoPrint's logging interfaces where possible. These logs are by default stored in ~/.octoprint/logs/plugin_octolapse.log
.
Your browser may also show useful JavaScript errors if you are working on the UI.
OctoPrint includes a virtual printer for testing purposes. Read more here.
Octolapse also includes a test mode in which all heating and extrusion commands are stripped. Documentation on that is available here.
- Development is done on the
devel
branch. - Merge
devel
intorc/devel
- update version number (Vx.x.xrcx-dev) - add arc/devel pre-release
to github - Merge
rc/devel
intorc/maintenance
when ready and remove -dev from version - add anrc/maintenance pre-release
to github - Add a github issue for feedback on the rc
- Fix any issues on
devel
branch - Merge fixes into
rc/devel
and update the version number (vx.x.x.rc(X+1)).dev - Work with the users to test the
rc/devel
branch, adding anrc/devel release
if necessary - When issues are fixed, merge into
rc/maintenance
and remove -dev and add anrc/maintenance pre-release
to github - Create a new github issue for feedback, close the previous issue.
- Repeat from step 4 until major issues are solved.
- Merge into
master
and update the version number (vx.x.x) and add a new release to github
Octolapse is provided without warranties of any kind. By installing Octolapse you agree to accept all liability for any damage caused directly or indirectly by Octolapse.
Use caution and never leave your printer unattended.