Skip to content

Commit 42fa6be

Browse files
committed
Finishing touches
1 parent d438fef commit 42fa6be

File tree

4 files changed

+29
-27
lines changed

4 files changed

+29
-27
lines changed

README.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Elon-Charge
22

3-
Elon-Charge is a platform that connects electric vehicle drivers and electric
4-
station operators. Drivers and operators can view and manage their cars and
5-
stations get personalized analytics about their past charges.
3+
Elon-Charge is a platform that aims to connect electric vehicle drivers and
4+
electric station operators. Both parties can get personalised analytics and
5+
statistics regarding past EV charges, navigating through a stripped-down,
6+
to-the-point UI. Specialized administrative operations can also be performed
7+
through a no-nonsense CLI interface.
68

79
## Setting up
810

@@ -13,18 +15,18 @@ Please follow the instructions on the [deployment](deployment) directory.
1315
* [Back End](back-end): The implementation of the REST API written in
1416
Python/Django.
1517
* [Front End](front-end): The front end of the application written in React.
16-
* [CLI Client](cli-client): A CLI tool written in Python that interfaces
17-
with the REST API.
18+
* [CLI Client](cli-client): A CLI tool written in Python (using `argparse` module)
19+
that interfaces with the REST API.
1820

1921
## Documentation
2022

2123
The [documentation](documentation) directory contains the documentation for
22-
elon-charge. Specifically, it contains [UML diagrams](documentation/static_v2) in `.pdf` format
23-
and the {Software,Stakeholders} Requirements Specifications.
24+
Elon-Charge. Specifically, it contains [UML diagrams](documentation/static_v2)
25+
in `.pdf` format and the {Software,Stakeholders} Requirements Specifications.
2426

2527
## Authors
2628

27-
Alphabetically.
29+
Alphabetically,
2830

2931
* Dionysios Ntelis
3032
* Filippos Malandrakis

cli-client/cli/__main__.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ def main():
5555
parents=[format_parser, apikey_parser])
5656
sessions_per_point_parser.add_argument(
5757
"--point",
58-
help="specify point",
58+
help="specify point [<ID>]",
5959
required=True
6060
)
6161
sessions_per_point_parser.add_argument(
6262
"--datefrom",
63-
help="enter starting date of interval",
63+
help="enter starting date of interval [YYYY-MM-DD hh:mm:ss]",
6464
required=True
6565
)
6666
sessions_per_point_parser.add_argument(
6767
"--dateto",
68-
help="enter ending date of interval",
68+
help="enter ending date of interval [YYYY-MM-DD hh:mm:ss]",
6969
required=True
7070
)
7171

@@ -74,17 +74,17 @@ def main():
7474
parents=[format_parser, apikey_parser])
7575
sessions_per_station_parser.add_argument(
7676
"--station",
77-
help="specify station",
77+
help="specify station [<ID>]",
7878
required=True
7979
)
8080
sessions_per_station_parser.add_argument(
8181
"--datefrom",
82-
help="enter starting date of interval",
82+
help="enter starting date of interval [YYYY-MM-DD hh:mm:ss]",
8383
required=True
8484
)
8585
sessions_per_station_parser.add_argument(
8686
"--dateto",
87-
help="enter ending date of interval",
87+
help="enter ending date of interval [YYYY-MM-DD hh:mm:ss]",
8888
required=True
8989
)
9090

@@ -93,17 +93,17 @@ def main():
9393
parents=[format_parser, apikey_parser])
9494
sessions_per_ev_parser.add_argument(
9595
"--ev",
96-
help="specify ev",
96+
help="specify ev [<LICENSE-PLATE>]",
9797
required=True
9898
)
9999
sessions_per_ev_parser.add_argument(
100100
"--datefrom",
101-
help="enter starting date of interval",
101+
help="enter starting date of interval [YYYY-MM-DD hh:mm:ss]",
102102
required=True
103103
)
104104
sessions_per_ev_parser.add_argument(
105105
"--dateto",
106-
help="enter ending date of interval",
106+
help="enter ending date of interval [YYYY-MM-DD hh:mm:ss]",
107107
required=True
108108
)
109109

deployment/README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ REACT_ENV_FILE="$DIR/front-end/.env"
4545

4646
Upon review, just execute the deployment script:
4747
```bash
48-
bash deploy.sh
48+
bash fireitup.sh
4949
```
5050

5151
One last step to use the cli-client, is to activate the virtual environment in
5252
which the script installed it. To do so, execute:
5353
```bash
54-
source `git rev-parse --show-toplevel`/.venv/bin/activate`
54+
source /path/to/eloncharge/.venv/bin/activate`
5555
```
5656

5757
You can now navigate to `https://eloncharge.gr`. You can also administer the app
@@ -75,7 +75,7 @@ is documented below.
7575
2. Set up virtual environment
7676

7777
```bash
78-
$ cd `git rev-parse --show-toplevel`
78+
$ cd /path/to/eloncharge
7979
$ python3 -m venv .venv
8080
$ source .venv/bin/activate
8181
$ pip3 install -r deployment/requirements.txt
@@ -92,30 +92,30 @@ is documented below.
9292
4. Set up backend
9393

9494
```bash
95-
$ cd `git rev-parse --show-toplevel`/back-end
95+
$ cd /path/to/eloncharge/back-end
9696
$ cp backend/settings_test.py backend/settings.py
9797
$ python3 manage.py migrate
9898
$ python3 manage.py populatedb-demo
9999
```
100100
5. Set up frontend
101101

102102
```bash
103-
$ cd `git rev-parse --show-toplevel`/front-end
103+
$ cd /path/to/eloncharge/front-end
104104
$ npm install
105105
```
106106

107107
6. Set up cli-client
108108

109109
```bash
110-
$ cd `git rev-parse --show-toplevel`/cli-client
110+
$ cd /path/to/eloncharge/cli-client
111111
$ python3 setup.py build
112112
$ python3 setup.py install
113113
```
114114

115115
7. Set up NGINX reverse proxy
116116

117117
```bash
118-
$ cd `git rev-parse --show-toplevel`/deployment
118+
$ cd /path/to/eloncharge/deployment
119119
$ sudo cp -r ssl/* /etc/ssl
120120
$ sudo cp nginx/eloncharge /etc/nginx/sites-available/eloncharge
121121
$ sudo ln -sn /etc/nginx/sites-available/eloncharge /etc/nginx/sites-enabled/eloncharge
@@ -134,13 +134,13 @@ is documented below.
134134
1. Fire up React server
135135

136136
```bash
137-
$ cd `git rev-parse --show-toplevel`/front-end
137+
$ cd /path/to/eloncharge/front-end
138138
$ nohup npm start &
139139
```
140140

141141
2. Fire up Django application through Gunicorn
142142

143143
```bash
144-
$ cd `git rev-parse --show-toplevel`/back-end
144+
$ cd /path/to/eloncharge/back-end
145145
$ nohup gunicorn --access-logfile - --workers 3 --bind 127.0.0.1:8000 backend.wsgi &
146146
```

deployment/fireitup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ echo "2. PSQL db pass set inside \$DJANGO_CUSTOM_SETTINGS file is same with actu
77
echo " db password, \$DB_PASS"
88

99
while true; do
10-
read -p "Do you wish to install this program? [y/n]" yn
10+
read -p "Do you wish to proceed with this operation? [y/n]" yn
1111
case $yn in
1212
[Yy] ) break;;
1313
* ) exit;;

0 commit comments

Comments
 (0)