Skip to content

Commit 439817f

Browse files
snehkhajanchiggeop
authored and
ggeop
committed
AI updated readme.md
Update setup.sh Update requirements.txt Fix dependencies Fix dependencies Bump urllib3 from 1.24.3 to 1.26.5 Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.24.3 to 1.26.5. - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](urllib3/urllib3@1.24.3...1.26.5) --- updated-dependencies: - dependency-name: urllib3 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Bump psutil from 5.6.2 to 5.6.6 Bumps [psutil](https://github.com/giampaolo/psutil) from 5.6.2 to 5.6.6. - [Release notes](https://github.com/giampaolo/psutil/releases) - [Changelog](https://github.com/giampaolo/psutil/blob/master/HISTORY.rst) - [Commits](giampaolo/psutil@release-5.6.2...release-5.6.6) Signed-off-by: dependabot[bot] <[email protected]> Fix dependencies Fix dependencies Another try Replace virtualenv with venv Fix Python version Add setup.sh logs Install Python 3.8 Remove 20.04 from .travis.yml Trying install Python 3.8 Trying install Python 3.8 Trying install Python 3.8 Trying install Python 3.8 Remove dependencies version Another Travis run Fix bdist error Fix dependencies version Fix mongodb service start Fix Travis Build
1 parent 27ee24b commit 439817f

File tree

6 files changed

+78
-80
lines changed

6 files changed

+78
-80
lines changed

.travis.yml

+7-14
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
11
language: python
2-
matrix:
2+
jobs:
33
include:
4-
- name: "Ubuntu 18.04 Job"
5-
- os: linux
6-
- dist: bionic
7-
- python:
8-
- "3.5"
9-
- "3.6"
10-
- name: "Ubuntu 16.04 Job"
11-
- os: linux
12-
- dist: xenial
13-
- python:
14-
- "3.5"
15-
- "3.6"
4+
- name: "Python 3.8 on Focal"
5+
os: linux
6+
dist: focal
7+
python: 3.8
8+
169
install:
1710
- sudo bash setup.sh
1811
script:
1912
- sudo bash run_tests.sh
2013
notifications:
21-
email: false
14+
email: false

README.md

+15-5
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11
[![CodeFactor](https://www.codefactor.io/repository/github/ggeop/python-ai-assistant/badge)](https://www.codefactor.io/repository/github/ggeop/Python-ai-assistant)
22
[![Maintainability](https://api.codeclimate.com/v1/badges/8c90305e22186cc2c9d5/maintainability)](https://codeclimate.com/github/ggeop/Python-ai-assistant/maintainability)
33
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4-
[![Build Status](https://travis-ci.org/ggeop/Python-ai-assistant.svg?branch=master)](https://travis-ci.org/ggeop/Python-ai-assistant)
4+
[![Build Status](https://app.travis-ci.com/ggeop/Python-ai-assistant.svg?branch=master)](https://travis-ci.org/ggeop/Python-ai-assistant)
55

66

77
![alt text](https://github.com/ggeop/Python-ai-assistant/blob/master/imgs/jarvis_logo.png)
88

9-
# About Jarvis 🧠
10-
Jarvis is a voice commanding assistant service in [Python 3.5+](https://www.python.org/downloads/release/python-360/)
9+
# About Jarvis - An Intelligent AI Consciousness 🧠
10+
Jarvis is a voice commanding assistant service in [Python 3.8](https://www.python.org/downloads/release/python-360/)
1111
It can recognize human speech, talk to user and execute basic commands.
1212

13+
#### Requirements
14+
15+
* Operation system: **Ubuntu 20.04 (Focal Fossa)**
16+
* Python Version: **3.8.x**
17+
18+
1319
#### Assistant Skills
1420
* **Opens a web page** (e.g 'Jarvis open youtube')
1521
* **Play music in Youtube** (e.g 'Jarvis play mozart')
1622
* **Increase/decrease** the speakers master volume (also can set max/mute speakers volume) ** (e.g 'Jarvis volume up!')
1723
* **Opens libreoffice suite applications (calc, writer, impress)** (e.g 'Jarvis open calc')
1824
* **Tells about something**, by searching on the internet (e.g 'Jarvis tells me about oranges')
1925
* **Tells the weather** for a place (e.g 'Jarvis tell_the_skills me the weather in London')
20-
* **Tells the current time and/or date** (e.g 'Jarvis tells me time or date')
26+
* **Tells the current time and/or date** (e.g 'Jarvis tell me time or date')
2127
* **Set an alarm** (e.g 'Jarvis create a new alarm')
2228
* **Tells the internet speed (ping, uplink and downling)** (e.g 'Jarvis tell_the_skills me the internet speed')
2329
* **Tells the internet availability** (e.g 'Jarvis is the internet connection ok?')
@@ -54,11 +60,15 @@ All the following APIs have free no-commercial API calls. Subscribe to the follo
5460
* [WolframAlpha](https://developer.wolframalpha.com/portal/myapps/): API for answer questions.
5561
* [IPSTACK](https://ipstack.com/signup/free): API for current location.
5662
### Setup Jarvis in Ubuntu/Debian system
57-
* Download the Jarvis repo localy:
63+
* Download the Jarvis repo locally:
5864

5965
```bash
6066
git clone https://github.com/ggeop/Jarvis.git
6167
```
68+
* Change working directory
69+
```bash
70+
cd Jarvis
71+
```
6272
* Setup Jarvis and system dependencies:
6373
```bash
6474
bash setup.sh

requirements.txt

+15-10
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,52 @@
11
appdirs==1.4.3
22
APScheduler==3.6.0
3+
backports.entry-points-selectable==1.1.0
34
beautifulsoup4==4.7.1
45
bs4==0.0.1
56
certifi==2019.3.9
67
chardet==3.0.4
78
Click==7.0
89
colorize==1.1.0
10+
Cython==0.29.24
11+
distlib==0.3.3
12+
filelock==3.3.0
913
geojson==2.4.1
1014
google==2.0.2
1115
gTTS-token==1.1.3
1216
idna==2.8
1317
inflect==2.1.0
1418
jaraco.itertools==4.4.2
15-
joblib==0.13.2
16-
lxml==4.3.4
19+
joblib==0.14.0
20+
lxml==4.6.3
1721
mock==3.0.5
1822
more-itertools==7.0.0
1923
nltk==3.4.5
2024
numpy==1.16.4
2125
patch==1.16
22-
psutil==5.6.2
26+
platformdirs==2.4.0
27+
playsound==1.2.2
28+
psutil==5.6.6
2329
PTable==0.9.2
2430
PyAudio==0.2.11
31+
pycairo==1.20.1
32+
PyGObject==3.42.0
33+
pymongo==3.10.1
2534
pyowm==2.10.0
2635
pyttsx3==2.71
2736
pytz==2019.1
2837
requests==2.21.0
2938
scikit-learn==0.21.2
30-
scipy==1.3.0
39+
scipy==1.5.4
3140
six==1.12.0
32-
sklearn==0.0
3341
soupsieve==1.9.1
3442
SpeechRecognition==3.8.1
3543
speedtest-cli==2.1.1
3644
textblob==0.15.3
3745
tzlocal==1.5.1
3846
urllib3==1.24.3
47+
virtualenv==20.8.1
3948
web-cache==1.1.0
4049
wikipedia==1.4.0
4150
wolframalpha==3.0.1
42-
xmltodict==0.12.0
43-
pymongo==3.10.1
44-
playsound==1.2.2
45-
vext==0.7.3
46-
vext.gi==0.7.0
4751
word2number==1.1
52+
xmltodict==0.12.0

run_jarvis.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# --------------------------------
33
# Start MongoDB service
44
# --------------------------------
5-
sudo service mongod start
5+
sudo systemctl start mongodb
66

77
# --------------------------------
88
# Start Jarvis service with virtualenv
@@ -12,4 +12,4 @@ sudo service mongod start
1212
# --------------------------------
1313
# Stop MongoDB service
1414
# --------------------------------
15-
sudo service mongod stop
15+
sudo systemctl stop mongodb

run_tests.sh

+17-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
#!/usr/bin/env bash
2+
# --------------------------------
3+
# Activate Python virtual env
4+
# --------------------------------
25
export PYTHONPATH="${PYTHONPATH}:./src/jarvis"
36
source jarvis_virtualenv/bin/activate
4-
sudo service mongod start
7+
8+
# --------------------------------
9+
# Start MongoDB service
10+
# --------------------------------
11+
sudo systemctl start mongodb
12+
13+
# --------------------------------
14+
# Run unittests
15+
# --------------------------------
516
python -m unittest discover -s ./src -p "*tests.py"
6-
sudo service mongod stop
17+
18+
# --------------------------------
19+
# Stop MongoDB service
20+
# --------------------------------
21+
sudo systemctl stop mongodb

setup.sh

+22-47
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,30 @@ reset=`tput sgr0`
1616
version=$(python3 -V 2>&1 | grep -Po '(?<=Python )(.+)')
1717
if [[ -z "$version" ]]
1818
then
19-
echo "${red} No Python 3.x.x in your system! Install Python and try again! ${reset}"
19+
echo "${red} No Python 3.x.x in your system${reset}"
2020
exit 1
2121
else
22-
PYTHON_PATH=$(which python3)
22+
echo "${green} System Python version is: Python ${version} ${reset}"
2323
fi
2424

25-
26-
2725
#-----------------------------------
2826
# System dependencies installation
2927
#-----------------------------------
3028
sudo apt-get update && /
31-
sudo apt-get install python-dev && /
32-
sudo apt-get install portaudio19-dev python-pyaudio python3-pyaudio && /
33-
sudo apt-get install libasound2-plugins libsox-fmt-all libsox-dev sox ffmpeg && /
34-
sudo apt-get install espeak && /
29+
sudo apt-get install build-essential && /
30+
sudo apt-get install python3-dev && /
31+
sudo apt-get install python3-setuptools && /
3532
sudo apt-get install python3-pip && /
36-
sudo apt-get install python3-setuptools
33+
sudo apt-get install python3-venv && /
34+
sudo apt-get install portaudio19-dev python3-pyaudio python3-pyaudio && /
35+
sudo apt-get install libasound2-plugins libsox-fmt-all libsox-dev libxml2-dev libxslt-dev sox ffmpeg && /
36+
sudo apt-get install espeak && /
37+
sudo apt-get install libcairo2-dev libgirepository1.0-dev gir1.2-gtk-3.0 && /
38+
sudo apt install mongodb && /
39+
sudo apt-get install gnupg
40+
41+
# Reload local package database
42+
sudo apt-get update
3743

3844
RESULT=$?
3945
if [ $RESULT -eq 0 ]; then
@@ -43,24 +49,10 @@ else
4349
exit 1
4450
fi
4551

46-
47-
#-----------------------------------
48-
# Install virtualenv
49-
#-----------------------------------
50-
pip3 install virtualenv
51-
52-
RESULT=$?
53-
if [ $RESULT -eq 0 ]; then
54-
echo "${green} Install virtualenv succeeded! ${reset}"
55-
else
56-
echo "${red} Install virtualenv failed ${reset}"
57-
exit 1
58-
fi
59-
6052
#-----------------------------------
6153
# Create Jarvis virtual env
6254
#-----------------------------------
63-
virtualenv -p $PYTHON_PATH $JARVIS_DIR/$VIRTUAL_ENV
55+
python3 -m venv $JARVIS_DIR/$VIRTUAL_ENV
6456

6557
RESULT=$?
6658
if [ $RESULT -eq 0 ]; then
@@ -75,10 +67,13 @@ fi
7567
#-----------------------------------
7668
source $JARVIS_DIR/$VIRTUAL_ENV/bin/activate
7769

78-
# Install pip in virtualenv
79-
sudo apt-get install python3-pip
70+
activated_python_version=$(python -V)
71+
echo "${green} ${activated_python_version} activated!${reset}"
8072

8173
# Install python requirements
74+
pip3 install --upgrade cython
75+
pip3 install wheel
76+
python setup.py bdist_wheel
8277
pip3 install -r $JARVIS_DIR/requirements.txt
8378

8479
RESULT=$?
@@ -121,28 +116,8 @@ fi
121116
#-----------------------------------
122117
deactivate
123118

124-
#-----------------------------------
125-
# Install MongoDB Server
126-
#-----------------------------------
127-
# Install process: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
128-
129-
# Install gnupg
130-
sudo apt-get install gnupg
131-
132-
# MongoDB public GPG Key
133-
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
134-
135-
# Create the /etc/apt/sources.list.d/mongodb-org-4.2.list file for Ubuntu 16.04 (Xenial):
136-
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
137-
138-
# Reload local package database
139-
sudo apt-get update
140-
141-
# Install a specific release of MongoDB
142-
sudo apt-get install -y mongodb-org=4.2.5 mongodb-org-server=4.2.5 mongodb-org-shell=4.2.5 mongodb-org-mongos=4.2.5 mongodb-org-tools=4.2.5
143-
144119
#-----------------------------------
145120
# Finished
146121
#-----------------------------------
147122
echo "${green} Jarvis setup succeed! ${reset}"
148-
echo "Start Jarvis: bash run_jarvis.sh"
123+
echo "Start Jarvis: bash run_jarvis.sh"

0 commit comments

Comments
 (0)