Skip to content

Commit

Permalink
made some changes to the project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Catherine Oborski committed Sep 8, 2024
1 parent d094164 commit db112e8
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 5 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions app.py → source/app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# to delete

from typer import Typer
import identify_file_type

Expand Down
8 changes: 3 additions & 5 deletions identify_file_type.py → source/identify_file_type.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from typer import Typer, Argument
from rich import print, console
from log import create_rich_logger
from pprint import pprint
import argparse
import pathlib
Expand All @@ -10,7 +9,6 @@
import magic

app = Typer()
logger = create_rich_logger()


@app.command()
Expand All @@ -32,9 +30,9 @@ def identify(files: list[str] = Argument(..., help="File paths to identify")):
for member in tar.getmembers():
print(f" - {member.name}")
else:
print(f"{file_path}: {file_type}")
print(
f"[bold green]Identified file type: {file_type}[/bold green]"
)

except FileNotFoundError:
log.error(f"Error: File not found: {file_path}")

print(f"[bold green]Identified file type: {file_type}[/bold green]")
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions zipssion.py → source/zipssion.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# to delete

import argparse
import pathlib
import shutil
Expand Down
Binary file removed test_files/test.zipssion
Binary file not shown.
Binary file removed test_files/test1.zipssion
Binary file not shown.
4 changes: 4 additions & 0 deletions tests/identify_file_type_tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# identify_file_type_tests
import pytest
import unittest
import identify_file_type_tests

0 comments on commit db112e8

Please sign in to comment.