mirror of
https://github.com/akuker/RASCSI.git
synced 2024-06-20 22:29:55 +00:00
c8b6ac409b
* Support for downloading properties files * Show extra message when unzipping properties file * Add logic to unzip method * Move unzipped properties into CFG_DIR * Better status message * Cleanup * Generic process introspection method * Show macproxy status in the webapp |
||
---|---|---|
.. | ||
mock/bin | ||
pwa | ||
service-infra | ||
static | ||
templates | ||
.pylintrc | ||
device_utils.py | ||
drive_properties.json | ||
file_cmds.py | ||
pi_cmds.py | ||
ractl_cmds.py | ||
README.md | ||
requirements.txt | ||
settings.py | ||
socket_cmds.py | ||
start.sh | ||
web.py |
RaSCSI Web
Setup local dev env
# Make a virtual env named venv
$ python3 -m venv venv
# Use that virtual env in this shell
$ source venv/bin/activate
# Install requirements
$ pip install -r requirements.txt
# Use mocks and a temp dir - start the web server
$ BASE_DIR=/tmp/images/ PATH=$PATH:`pwd`/mock/bin/ python3 web.py
Mocks for local development
You may edit the files under mock/bin
to simulate Linux command responses.
TODO: rascsi-web uses protobuf commands to send and receive data from rascsi.
A separate mocking solution will be needed for this interface.
Static analysis with pylint
It is recommended to run pylint against new code to protect against bugs and keep the code readable and maintainable. The local pylint configuration lives in .pylintrc
sudo apt install pylint3
pylint3 python_source_file.py
Pushing to the Pi via git
Setup a bare repo on the rascsi
$ ssh pi@rascsi
$ mkdir /home/pi/dev.git && cd /home/pi/dev.git
$ git --bare init
Initialized empty Git repository in /home/pi/dev.git
Locally
$ cd ~/source/RASCSI
$ git remote add pi ssh://pi@rascsi/home/pi/dev.git
$ git push pi master