Skip to content

Commit fc4046b

Browse files
Zat-CodezatRemiSaurel
authored
Release 0.0.1 (#14)
* add poo structure * first system object * add dataschema, create class from json and create json from class * start parse file with classes * start to work on CSV files * add recurrence on export json (for object inherited of object) and add structure for Character * add kill, stat for every character * add many command like objectif command, ultimate command etc... * export_json export only key present in data_schema of each object now * change deads to deaths * send message to backend * associate main service and log analyser (launch analysis with kafka) * refactor de Matche en Map * refactor score_team to team_score add event from back in service for launch log_analyser * mise en place d'event pour une map pour la timeline * création d'event pour la map et d'un end time pour les round * add death and kill event * add ultimate use * add Dockefile and add data agglomerate for dynamic graph (in front). rectify bug when player does'nt play same hero in all rounds * add functional dockerfile, cfg and change docker-compose.yaml add try catch for run in main.py * hot-fix, add docker-compose for dev * fix: typo * Create LICENSE * Update README.md * delete file after process --------- Co-authored-by: zat <[email protected]> Co-authored-by: Rémi <[email protected]> Co-authored-by: RemiSaurel <[email protected]>
1 parent cd03be6 commit fc4046b

24 files changed

+1281
-14
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
.vscode
1+
.vscode
2+
__pycache__/
3+
.idea/

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
# datastrike-python-processing
1+
# Datastrike analysis processing
2+
3+
## 🚀 Project
4+
This is the analysis processing part of Datastrike: an esport-oriented Overwatch tool.
5+
6+
## 🧑‍💻 Credits
7+
- [ZaT](https://github.com/orgs/DataStrike/people/Zat-Code)
8+
- [Rémi](https://github.com/RemiSaurel)

deploy/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM python:3.11-bullseye
2+
ADD requirements.txt /app/requirements.txt
3+
RUN python3 -m pip install -r /app/requirements.txt
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[kafka]
2+
3+
url = kafka:9092

deploy/docker-compose.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
ZOOKEEPER_CLIENT_PORT: 2181
77
ZOOKEEPER_TICK_TIME: 2000
88
ports:
9-
- 22181:2181
9+
- 22182:2181
1010

1111
kafka:
1212
image: confluentinc/cp-kafka:latest
@@ -20,4 +20,20 @@ services:
2020
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
2121
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
2222
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
23-
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
23+
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
24+
25+
datastrike-python:
26+
image: datastrike/python:latest
27+
build:
28+
context: .
29+
dockerfile: Dockerfile
30+
31+
command: /bin/bash -c "cd /datastrike-python/ && python3 main.py"
32+
volumes:
33+
- ../src/:/datastrike-python
34+
- ../../map/:/map
35+
- type: bind
36+
source: datastrike_python_processing.cfg
37+
target: /datastrike-python/datastrike_python_processing.cfg
38+
depends_on:
39+
- kafka

deploy/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
kafka-python==2.0.2
1+
kafka-python==2.0.2
2+
pandas==2.1.4

docker-compose.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: '2'
2+
services:
3+
zookeeper:
4+
image: confluentinc/cp-zookeeper:latest
5+
environment:
6+
ZOOKEEPER_CLIENT_PORT: 2181
7+
ZOOKEEPER_TICK_TIME: 2000
8+
ports:
9+
- 22182:2181
10+
11+
kafka:
12+
image: confluentinc/cp-kafka:latest
13+
depends_on:
14+
- zookeeper
15+
ports:
16+
- 29092:29092
17+
environment:
18+
KAFKA_BROKER_ID: 1
19+
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
20+
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
21+
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
22+
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
23+
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[kafka]
2+
3+
url = localhost:29092

src/kafka_lib.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ def __init__(self, url, date=None, nb_try_connection=10):
1818
self.date = date
1919
self.nb_try_connection = nb_try_connection
2020

21-
22-
2321
self.init_producer_ok, self.producer = self.init_producer(url)
2422
self.queue_sender = queue.Queue(2)
2523

0 commit comments

Comments
 (0)