-
Notifications
You must be signed in to change notification settings - Fork 8
Development environment
A development environment is needed for two things:
- Working on the code, obviously
- Visually debugging why it is not working for you
- You must have Python 3 installed on your system.
- You must have either Chrome or Chromium browser installed.
First things first, git clone ...
the project files in this repo.
- Open a fresh terminal
-
cd
into theserver
folder in the project files - Run
python3 -m venv env
to create a virtual environment - Activate the virtual environment with
source venv/bin/activate
on Linux/Mac orvenv\Scripts\activate
on windows. - Run
pip install -r requirements.txt
to install the server's dependencies
You can run the server with python server.py
It should say the server was started, and the process will run in that terminal until it crashes, or you press CTRL + C, or you close the terminal, or force quit the process some other way.
- Open a fresh terminal
-
cd
into theclient
folder in the project files - Run
python3 -m venv env
to create a virtual environment - Activate the virtual environment with
source venv/bin/activate
on Linux/Mac orvenv\Scripts\activate
on windows. - Run
pip install -r requirements.txt
to install the client's dependencies
You can run the client with python client.py
When you run the client it will be like any other installation. It will attempt to connect to the server and take you through the configuration process.
If you are having a problem where you cannot get an installation to work, or have some other issue, you can disable headless mode and see what is happening when the server is using the amazon site.
This assumes you have setup the local server development environment as described in Step 2.
If the local server is currently running, kill that process with CTRL + C or whatever.
Next, set this environment variable like so:
export ALEXA_SHOPPING_LIST_DEBUG=1
Now, start up your local server again with python server.py
.
You can now run the client and talk to the server as normal. But all functionality which involves talking to the amazon website will open a chrome/chromium window and you can see what is happening at the point where what you are investigating goes wrong.