Skip to content

Commit

Permalink
Final update
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramil Mammadov committed Sep 22, 2024
1 parent cacb8bc commit dc0d633
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 9 deletions.
Binary file modified data/correlation_matrix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/histogram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/line_graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ psutil==6.0.0
pylint==3.2.7
pytest==8.3.3
ruff==0.6.6
setuptools==73.0.1
setuptools==73.0.1
20 changes: 14 additions & 6 deletions src/main.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import pandas as pd
from lib import (
get_summary,
get_histogram,
get_line_graph,
get_correlation_matrix,
)

try:
from lib import (
get_summary,
get_histogram,
get_line_graph,
get_correlation_matrix,
)
except Exception:
from src.lib import (
get_summary,
get_histogram,
get_line_graph,
get_correlation_matrix,
)

remote_path = "https://raw.githubusercontent.com/Ramil-cyber/Ramil-Individual-Project-1/refs/heads/main/data/shanghai_ranking_2024.csv"

Expand Down
17 changes: 16 additions & 1 deletion test/test_main.py
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
# from src.main import
from src.main import calculate_iqr, save_to_md
from src.lib import get_data
import os

remote_path = remote_path = (
"https://raw.githubusercontent.com/Ramil-cyber/Ramil-Individual-Project-1/refs/heads/main/data/shanghai_ranking_2024.csv"
)


def test_main():
df = get_data(remote_path)
top_100_df = df.iloc[:100, :]
print(int(calculate_iqr(top_100_df, column="Award"))) == 26

save_to_md(df)
assert os.path.exists("summary_statistics.md")

0 comments on commit dc0d633

Please sign in to comment.