Skip to content

Commit

Permalink
omit some similarityRunner files
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivieFranklova committed Oct 3, 2024
1 parent ed9f215 commit b4469b7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/py_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
pytest $TEST_FILES
- name: Show coverage
run: coverage report -m --omit=[".*.ipynb", "similarityRunner/UI", "similarityRunner/models", "similarityRunner/runner.py"]
run: coverage report -m --omit=".*.ipynb,similarityRunner/UI/*,*[U|u]ser*,similarityRunner/runner.py"

- name: Create coverage file
if: github.event_name == 'pull_request'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
"""
This file contains functions used in the similarityRunner package.
"""
import pandas as pd

from models.connector_models import FileType


def load_files_from_list(folder: list[str], file_types: tuple = (FileType.CSV,)) -> tuple[list[pd.DataFrame], list[str]]:
""" """
"""
Load files from a list of files
:param folder: list of files to load
:param file_types: tuple of posible file types
:return: tuple of data list and names list
"""
data = []
names = []
for file in folder:
Expand All @@ -17,7 +25,11 @@ def load_files_from_list(folder: list[str], file_types: tuple = (FileType.CSV,))
return data, names


def csv_to_parquet(file: str):
def csv_to_parquet(file: str) -> str:
"""
Convert csv file to parquet
:param file: file to convert
"""
df = pd.read_csv(file)
df.to_parquet(file.replace(".csv", ".parquet"))
return file.replace(".csv", ".parquet")

0 comments on commit b4469b7

Please sign in to comment.