Skip to content

Commit 6e0a91c

Browse files
Merge pull request #1 from BureauTech/dev
Sprint 1
2 parents b8b4df2 + e368d18 commit 6e0a91c

File tree

16 files changed

+241
-1
lines changed

16 files changed

+241
-1
lines changed

.dockerignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/__pycache__
2+
/.pytest_cache
3+
/.github
4+
/doc
5+
/venv
6+
7+
.env
8+
.gitignore
9+
docker-compose.yml
10+
dockerfile.*
11+
LICENSE
12+
README.md

.github/workflows/docker-image.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Docker Image CI
2+
3+
on:
4+
push:
5+
branches: [ dev ]
6+
pull_request:
7+
branches: [ main, dev ]
8+
9+
jobs:
10+
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Build the Docker image
18+
run: docker compose up -d

.github/workflows/python.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Python CI
2+
3+
on:
4+
push:
5+
branches: [ dev ]
6+
pull_request:
7+
branches: [ main, dev ]
8+
9+
jobs:
10+
build-linux:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Python 3.7.11
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: 3.7.11
19+
20+
- name: Set up env
21+
run: bash setup-env.sh docker
22+
23+
- name: Install dependencies
24+
run: pip install -r requirements.txt
25+
26+
- name: Lint with flake8
27+
run: |
28+
pip install flake8
29+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
30+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
31+
32+
- name: Test with pytest
33+
run: |
34+
pip install pytest
35+
pytest ./src/tests/*

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
__pycache__
2+
.pytest_cache
3+
.env
4+
venv
5+
6+
!.keep

README.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,50 @@
1-
# BTAlert-IA
1+
[![License](http://img.shields.io/github/license/BureauTech/BTAlert-AI)](https://github.com/BureauTech/BTAlert-AI/blob/main/LICENSE)
2+
[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/BureauTech/BTAlert-AI/)
3+
[![Python CI](https://github.com/BureauTech/BTAlert-AI/actions/workflows/python.yml/badge.svg)](https://github.com/BureauTech/BTAlert-AI/actions/workflows/python.yml)
4+
[![Docker Image CI](https://github.com/BureauTech/BTAlert-AI/actions/workflows/docker-image.yml/badge.svg)](https://github.com/BureauTech/BTAlert-AI/actions/workflows/docker-image.yml)
5+
6+
# BTAlert-AI
7+
8+
BTAlert-AI is an application based on Machine Learning to monitor and predict application outages.
9+
10+
## How to install
11+
12+
### Docker Image
13+
14+
To make it run on your machine without installing everything locally, you can simply run it via docker image, by following the commands below.
15+
16+
```docker compose up```
17+
18+
NOTE: It's important to have [docker installed](https://docs.docker.com/engine/install/) on your machine.
19+
20+
### Locally
21+
22+
In case you want to run it in your machine without using docker, you must run the following commands.
23+
24+
For development environment:
25+
26+
```bash setup-env.sh```
27+
28+
```pip install -r requirements.txt```
29+
30+
```python src/app.py```
31+
32+
### Prerequisites:
33+
34+
You must have installed [Python 3.7.11](https://www.python.org/downloads/release/python-3711/) previously.
35+
36+
# Authors
37+
38+
<table align="center">
39+
<tr>
40+
<td align="center"><a href="https://github.com/anaclaragraciano"><img src="https://avatars.githubusercontent.com/u/64653864?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ana Clara<br>Dev</b></sub></a><br /><a href="https://github.com/BureauTech/BTAlert-IA/commits?author=anaclaragraciano" title="PO">:sparkles::iphone::open_book:</a></td>
41+
<td align="center"><a href="https://github.com/bibiacoutinho"><img src="https://avatars.githubusercontent.com/u/56437723?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Beatriz Coutinho<br>Master</b></sub></a><br /><a href="https://github.com/BureauTech/BTAlert-IA/commits?author=bibiacoutinho" title="Master">:headphones::nail_care::computer_mouse:</a></td>
42+
<td align="center"><a href="https://github.com/caiquesjc"><img src="https://avatars.githubusercontent.com/u/54915913?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Caique Nascimento<br>Dev</b></sub></a><br /><a href="https://github.com/BureauTech/BTAlert-IA/commits?author=caiquesjc" title="Dev Team">:keyboard::desktop_computer::computer_mouse:</a></td>
43+
<td align="center"><a href="https://github.com/charles-ramos"><img src="https://avatars.githubusercontent.com/u/25464287?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Charles Ramos<br>PO</b></sub></a><br /><a href="https://github.com/BureauTech/BTAlert-IA/commits?author=charles-ramos" title="Dev Team">:fist_raised::open_book::hamburger:</a></td>
44+
</table>
45+
<table align="center">
46+
<td align="center"><a href="https://github.com/danielsantosoliveira"><img src="https://avatars.githubusercontent.com/u/55162125?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Daniel Oliveira<br>Dev</b></sub></a><br /><a href="https://github.com/BureauTech/BTAlert-IA/commits?author=danielsantosoliveira" title="Dev Team">:computer::guitar::soccer:</a></td>
47+
<td align="center"><a href="https://github.com/Denis-Lima"><img src="https://avatars.githubusercontent.com/u/55518511?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Denis Lima<br>Dev</b></sub></a><br /><a href="https://github.com/BureauTech/BTAlert-IA/commits?author=Denis-Lima" title="Dev Team">:computer::v::pizza:</a></td>
48+
<td align="center"><a href="https://github.com/WeDias"><img src="https://avatars.githubusercontent.com/u/56437612?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Wesley Dias<br>Dev</b></sub></a><br /><a href="https://github.com/BureauTech/BTAlert-IA/commits?author=WeDias" title="Dev Team">:rocket::milky_way::new_moon:</a></td>
49+
</tr>
50+
</table>

doc/.keep

Whitespace-only changes.

docker-compose.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: '3.9'
2+
3+
services:
4+
5+
btalert-ai:
6+
container_name: btalert-ai
7+
build:
8+
context: .
9+
dockerfile: dockerfile.python
10+
ports:
11+
- 5050:5050
12+
networks:
13+
- backend_network
14+
15+
networks:
16+
backend_network:
17+
name: backend_network

dockerfile.python

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM python:3.7.11
2+
WORKDIR /usr/src/btalert-ai
3+
4+
COPY . .
5+
RUN bash setup-env.sh docker
6+
RUN pip install -r requirements.txt
7+
8+
WORKDIR /usr/src/btalert-ai/src
9+
CMD ["gunicorn", "--bind", "0.0.0.0:5050", "app:app"]

requirements.txt

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
attrs==21.4.0
2+
backports.zoneinfo==0.2.1
3+
certifi==2021.10.8
4+
charset-normalizer==2.0.12
5+
click==8.1.2
6+
dateparser==1.1.1
7+
Flask==2.1.1
8+
gunicorn==20.1.0
9+
idna==3.3
10+
importlib-metadata==4.11.3
11+
iniconfig==1.1.1
12+
itsdangerous==2.1.2
13+
Jinja2==3.1.1
14+
joblib==1.1.0
15+
MarkupSafe==2.1.1
16+
numpy==1.21.5
17+
packaging==21.3
18+
pandas==1.3.5
19+
pluggy==1.0.0
20+
prometheus-api-client==0.5.0
21+
prometheus-client==0.14.1
22+
py==1.11.0
23+
pyparsing==3.0.8
24+
pytest==7.1.1
25+
python-dateutil==2.8.2
26+
python-dotenv==0.20.0
27+
pytz==2022.1
28+
pytz-deprecation-shim==0.1.0.post0
29+
regex==2022.3.2
30+
requests==2.27.1
31+
scikit-learn==1.0.2
32+
scipy==1.7.3
33+
six==1.16.0
34+
threadpoolctl==3.1.0
35+
tomli==2.0.1
36+
typing-extensions==4.1.1
37+
tzdata==2022.1
38+
tzlocal==4.2
39+
urllib3==1.26.9
40+
Werkzeug==2.1.1
41+
zipp==3.8.0

runtime.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python-3.7.11

0 commit comments

Comments
 (0)