-
Notifications
You must be signed in to change notification settings - Fork 1
[MAN-1191] feat: Defining logic about files and interactive menu #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe update introduces automation for uploading customer document files via a new project within the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Terminal
participant Document
participant Query
participant Connection
User->>+Terminal: Start Process
Terminal->>User: Prompt Account Name
User->>Terminal: Enter Account Name
Terminal->>Query: Retrieve Account Details
Query->>Connection: Execute Query
Connection->>Query: Return Results
Query->>Terminal: Account Details
Terminal->>Document: Process Documents
Document->>Document: Validate & Categorize Documents
Document->>Document: Display Document Info
Document->>Document: Move Documents to Folders
Document->>Terminal: Completion Message
Terminal->>User: Process Completed
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 8
Outside diff range, codebase verification and nitpick comments (4)
documents_upload/src/document.py (4)
24-28
: Enhance theclean_plate
function to handle edge cases.Consider handling cases where the input plate is
None
or an empty string more explicitly.+ if plate is None: + return "NO PLATE FOR FILE"
30-36
: Handle cases where the directory does not exist or is empty.Consider adding error handling if the directory does not exist or is empty.
+ if not os.path.exists(path): + raise FileNotFoundError(f"The directory {path} does not exist.")
38-43
: Handle cases where the document list is empty.Consider adding a check to handle cases where the document list is empty.
+ if not documents: + print("No documents found.") + return
79-91
: Handle cases where the directory does not exist or contains no folders.Consider adding error handling if the directory does not exist or contains no folders.
+ if not os.path.exists(base_path): + raise FileNotFoundError(f"The directory {base_path} does not exist.") + if not os.listdir(base_path): + print("No folders found.") + return plates
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (8)
- .gitignore (1 hunks)
- documents_upload/.gitignore (1 hunks)
- documents_upload/README.md (1 hunks)
- documents_upload/src/conection.py (1 hunks)
- documents_upload/src/document.py (1 hunks)
- documents_upload/src/main.py (1 hunks)
- documents_upload/src/query.py (1 hunks)
- documents_upload/src/terminal.py (1 hunks)
Files skipped from review due to trivial changes (3)
- .gitignore
- documents_upload/.gitignore
- documents_upload/README.md
Additional context used
Ruff
documents_upload/src/main.py
1-1:
from document import *
used; unable to detect undefined names(F403)
2-2:
from query import *
used; unable to detect undefined names(F403)
3-3:
from conection import *
used; unable to detect undefined names(F403)
4-4:
from terminal import *
used; unable to detect undefined names(F403)
8-8:
get_documents_from_files
may be undefined, or defined from star imports(F405)
19-19:
Terminal
may be undefined, or defined from star imports(F405)
21-21:
Terminal
may be undefined, or defined from star imports(F405)
24-24:
print_document_info
may be undefined, or defined from star imports(F405)
27-27:
print_document_info
may be undefined, or defined from star imports(F405)
29-29:
create_and_move_documents
may be undefined, or defined from star imports(F405)
31-31:
create_and_move_documents
may be undefined, or defined from star imports(F405)
33-33:
get_plate_by_folder_name
may be undefined, or defined from star imports(F405)
38-38:
Query
may be undefined, or defined from star imports(F405)
38-38:
Query
may be undefined, or defined from star imports(F405)
Additional comments not posted (13)
documents_upload/src/query.py (2)
4-6
: Constructor looks good!The constructor correctly initializes the query attribute.
13-14
: String representation looks good!The
__str__
method correctly returns the query string.documents_upload/src/conection.py (3)
10-16
: Constructor looks good!The constructor correctly initializes the database connection parameters.
27-30
: Cursor method looks good!The
cursor
method correctly checks for a connection before returning a cursor.
32-35
: Commit method looks good!The
commit
method correctly checks for a connection before committing.documents_upload/src/main.py (2)
8-8
: Ensureget_documents_from_files
is defined.The function
get_documents_from_files
must be defined in the imported modules.Verification successful
Verification successful. The function
get_documents_from_files
is defined in the codebase.
- Location:
documents_upload/src/document.py
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify `get_documents_from_files` function is defined in the imported modules. # Test: Search for the function definition. Expect: Function definition found in the appropriate module. rg --type python -A 1 $'def get_documents_from_files'Length of output: 85
Script:
#!/bin/bash # Description: Verify `get_documents_from_files` function is defined in the imported modules. # Test: Search for the function definition using rg. rg --type py -A 1 $'def get_documents_from_files' # Test: Search for the function definition using ast-grep. ast-grep --lang python --pattern $'def get_documents_from_files($_):'Length of output: 242
Tools
Ruff
8-8:
get_documents_from_files
may be undefined, or defined from star imports(F405)
38-41
: EnsureQuery
is defined.The class
Query
must be defined in the imported modules.Verification successful
Verification successful:
Query
class is properly defined and imported.The
Query
class is defined indocuments_upload/src/query.py
and is imported indocuments_upload/src/main.py
usingfrom query import *
.
documents_upload/src/query.py:class Query
documents_upload/src/main.py:from query import *
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify `Query` class is defined in the imported modules. # Test: Search for the class definition. Expect: Class definition found in the appropriate module. rg --type python -A 1 $'class Query'Length of output: 68
Script:
#!/bin/bash # Description: Verify `Query` class is defined in the imported modules. # Test: Search for the class definition. Expect: Class definition found in the appropriate module. rg --type py -A 1 $'class Query'Length of output: 107
Script:
#!/bin/bash # Description: Verify `Query` is imported in documents_upload/src/main.py # Test: Search for the import statement. Expect: Query is imported in the module. rg --type py 'import Query' documents_upload/src/main.pyLength of output: 58
Script:
#!/bin/bash # Description: Verify all import statements in documents_upload/src/main.py # Test: List all import statements. Expect: Identify if the module containing Query is imported. rg --type py '^import ' documents_upload/src/main.py rg --type py '^from ' documents_upload/src/main.pyLength of output: 197
Tools
Ruff
38-38:
Query
may be undefined, or defined from star imports(F405)
38-38:
Query
may be undefined, or defined from star imports(F405)
documents_upload/src/terminal.py (1)
35-37
: Prompt for account name method looks good!The method correctly prompts for an account name or legacy code.
documents_upload/src/document.py (5)
8-9
: Constructor looks good.The constructor initializes the
name
attribute correctly.
11-12
: Methodget_plate
looks good.The method correctly splits the
name
attribute to retrieve the plate.
14-15
: Methodget_type
looks good.The method correctly splits the
name
attribute to retrieve the file type and converts it to uppercase.
17-18
: Method__str__
looks good.The method provides a string representation of the
Document
object.
20-22
: Methodis_valid_plate
looks good.The method validates the plate using the
clean_plate
function and checks if it is alphanumeric.
def get_account_name(name): | ||
return f"""SELECT a.id, a.legacy_account_id, a.name FROM accounts a WHERE a.name = '{name}';""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential SQL injection risk.
The get_account_name
method directly interpolates the name
parameter into the SQL query, which could lead to SQL injection attacks. Use parameterized queries instead.
@staticmethod
def get_account_name(name):
return f"SELECT a.id, a.legacy_account_id, a.name FROM accounts a WHERE a.name = %s;", (name,)
Committable suggestion was skipped due to low confidence.
def execute(self): | ||
print(f"Executing query: {self.query}") | ||
return True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add proper error handling for the execute method.
The execute
method currently only prints the query. It should handle possible database execution errors.
def execute(self):
try:
print(f"Executing query: {self.query}")
# Add actual database execution logic here
return True
except Exception as e:
print(f"An error occurred: {e}")
return False
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
def execute(self): | |
print(f"Executing query: {self.query}") | |
return True | |
def execute(self): | |
try: | |
print(f"Executing query: {self.query}") | |
# Add actual database execution logic here | |
return True | |
except Exception as e: | |
print(f"An error occurred: {e}") | |
return False |
def get_account_legacy_code(legacy_code): | ||
return f"""SELECT a.id, a.legacy_account_id, a.legacy_code FROM accounts a WHERE a.legacy_code = '{legacy_code}';""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential SQL injection risk.
The get_account_legacy_code
method directly interpolates the legacy_code
parameter into the SQL query, which could lead to SQL injection attacks. Use parameterized queries instead.
@staticmethod
def get_account_legacy_code(legacy_code):
return f"SELECT a.id, a.legacy_account_id, a.legacy_code FROM accounts a WHERE a.legacy_code = %s;", (legacy_code,)
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
def get_account_legacy_code(legacy_code): | |
return f"""SELECT a.id, a.legacy_account_id, a.legacy_code FROM accounts a WHERE a.legacy_code = '{legacy_code}';""" | |
@staticmethod | |
def get_account_legacy_code(legacy_code): | |
return "SELECT a.id, a.legacy_account_id, a.legacy_code FROM accounts a WHERE a.legacy_code = %s;", (legacy_code,) |
def connect(self): | ||
self.conn = psycopg2.connect( | ||
database=self.db_name, | ||
host=self.host, | ||
user=self.user, | ||
password=self.password, | ||
port=self.port | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add error handling for the connect method.
The connect
method should handle possible connection errors.
def connect(self):
try:
self.conn = psycopg2.connect(
database=self.db_name,
host=self.host,
user=self.user,
password=self.password,
port=self.port
)
except psycopg2.DatabaseError as e:
print(f"Database connection error: {e}")
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
def connect(self): | |
self.conn = psycopg2.connect( | |
database=self.db_name, | |
host=self.host, | |
user=self.user, | |
password=self.password, | |
port=self.port | |
) | |
def connect(self): | |
try: | |
self.conn = psycopg2.connect( | |
database=self.db_name, | |
host=self.host, | |
user=self.user, | |
password=self.password, | |
port=self.port | |
) | |
except psycopg2.DatabaseError as e: | |
print(f"Database connection error: {e}") |
def create_and_move_documents(documents, base_path): | ||
invalid_folder_path = os.path.join(base_path, 'invalid-documents') | ||
|
||
if not os.path.exists(invalid_folder_path): | ||
os.makedirs(invalid_folder_path) | ||
|
||
for doc in documents: | ||
src = os.path.join(base_path, doc.name) | ||
plate = clean_plate(doc.get_plate()) | ||
|
||
print(f"Processing {doc.name}: Plate = {plate}, is_valid = {doc.is_valid_plate()}") | ||
|
||
if doc.is_valid_plate(): | ||
folder_path = os.path.join(base_path, plate) | ||
|
||
if not os.path.exists(folder_path): | ||
os.makedirs(folder_path) | ||
|
||
dst = os.path.join(folder_path, doc.name) | ||
|
||
if os.path.exists(src): | ||
shutil.copy(src, dst) | ||
print(f"Copied {doc.name} to {folder_path}") | ||
else: | ||
print(f"Source file {src} does not exist") | ||
else: | ||
dst = os.path.join(invalid_folder_path, doc.name) | ||
|
||
if os.path.exists(src): | ||
shutil.copy(src, dst) | ||
print(f"Copied {doc.name} to {invalid_folder_path}") | ||
else: | ||
print(f"Source file {src} does not exist") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider refactoring the create_and_move_documents
function.
The function has multiple responsibilities and can be refactored to improve readability and maintainability.
- def create_and_move_documents(documents, base_path):
- invalid_folder_path = os.path.join(base_path, 'invalid-documents')
- if not os.path.exists(invalid_folder_path):
- os.makedirs(invalid_folder_path)
-
- for doc in documents:
- src = os.path.join(base_path, doc.name)
- plate = clean_plate(doc.get_plate())
- print(f"Processing {doc.name}: Plate = {plate}, is_valid = {doc.is_valid_plate()}")
- if doc.is_valid_plate():
- folder_path = os.path.join(base_path, plate)
- if not os.path.exists(folder_path):
- os.makedirs(folder_path)
- dst = os.path.join(folder_path, doc.name)
- if os.path.exists(src):
- shutil.copy(src, dst)
- print(f"Copied {doc.name} to {folder_path}")
- else:
- print(f"Source file {src} does not exist")
- else:
- dst = os.path.join(invalid_folder_path, doc.name)
- if os.path.exists(src):
- shutil.copy(src, dst)
- print(f"Copied {doc.name} to {invalid_folder_path}")
- else:
- print(f"Source file {src} does not exist")
+ def create_and_move_documents(documents, base_path):
+ def create_folder_if_not_exists(folder_path):
+ if not os.path.exists(folder_path):
+ os.makedirs(folder_path)
+
+ def copy_document(src, dst):
+ if os.path.exists(src):
+ shutil.copy(src, dst)
+ print(f"Copied {os.path.basename(src)} to {dst}")
+ else:
+ print(f"Source file {src} does not exist")
+
+ invalid_folder_path = os.path.join(base_path, 'invalid-documents')
+ create_folder_if_not_exists(invalid_folder_path)
+
+ for doc in documents:
+ src = os.path.join(base_path, doc.name)
+ plate = clean_plate(doc.get_plate())
+ print(f"Processing {doc.name}: Plate = {plate}, is_valid = {doc.is_valid_plate()}")
+ if doc.is_valid_plate():
+ folder_path = os.path.join(base_path, plate)
+ create_folder_if_not_exists(folder_path)
+ dst = os.path.join(folder_path, doc.name)
+ else:
+ dst = os.path.join(invalid_folder_path, doc.name)
+ copy_document(src, dst)
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
def create_and_move_documents(documents, base_path): | |
invalid_folder_path = os.path.join(base_path, 'invalid-documents') | |
if not os.path.exists(invalid_folder_path): | |
os.makedirs(invalid_folder_path) | |
for doc in documents: | |
src = os.path.join(base_path, doc.name) | |
plate = clean_plate(doc.get_plate()) | |
print(f"Processing {doc.name}: Plate = {plate}, is_valid = {doc.is_valid_plate()}") | |
if doc.is_valid_plate(): | |
folder_path = os.path.join(base_path, plate) | |
if not os.path.exists(folder_path): | |
os.makedirs(folder_path) | |
dst = os.path.join(folder_path, doc.name) | |
if os.path.exists(src): | |
shutil.copy(src, dst) | |
print(f"Copied {doc.name} to {folder_path}") | |
else: | |
print(f"Source file {src} does not exist") | |
else: | |
dst = os.path.join(invalid_folder_path, doc.name) | |
if os.path.exists(src): | |
shutil.copy(src, dst) | |
print(f"Copied {doc.name} to {invalid_folder_path}") | |
else: | |
print(f"Source file {src} does not exist") | |
def create_and_move_documents(documents, base_path): | |
def create_folder_if_not_exists(folder_path): | |
if not os.path.exists(folder_path): | |
os.makedirs(folder_path) | |
def copy_document(src, dst): | |
if os.path.exists(src): | |
shutil.copy(src, dst) | |
print(f"Copied {os.path.basename(src)} to {dst}") | |
else: | |
print(f"Source file {src} does not exist") | |
invalid_folder_path = os.path.join(base_path, 'invalid-documents') | |
create_folder_if_not_exists(invalid_folder_path) | |
for doc in documents: | |
src = os.path.join(base_path, doc.name) | |
plate = clean_plate(doc.get_plate()) | |
print(f"Processing {doc.name}: Plate = {plate}, is_valid = {doc.is_valid_plate()}") | |
if doc.is_valid_plate(): | |
folder_path = os.path.join(base_path, plate) | |
create_folder_if_not_exists(folder_path) | |
dst = os.path.join(folder_path, doc.name) | |
else: | |
dst = os.path.join(invalid_folder_path, doc.name) | |
copy_document(src, dst) |
from document import * | ||
from query import * | ||
from conection import * | ||
from terminal import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid wildcard imports.
Wildcard imports can lead to namespace pollution and make it difficult to track the origin of imported names. Import only what is necessary.
from document import (
get_documents_from_files,
print_document_info,
create_and_move_documents,
get_plate_by_folder_name
)
from query import Query
from conection import Connection
from terminal import Terminal
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
from document import * | |
from query import * | |
from conection import * | |
from terminal import * | |
from document import ( | |
get_documents_from_files, | |
print_document_info, | |
create_and_move_documents, | |
get_plate_by_folder_name | |
) | |
from query import Query | |
from conection import Connection | |
from terminal import Terminal |
Tools
Ruff
1-1:
from document import *
used; unable to detect undefined names(F403)
2-2:
from query import *
used; unable to detect undefined names(F403)
3-3:
from conection import *
used; unable to detect undefined names(F403)
4-4:
from terminal import *
used; unable to detect undefined names(F403)
print(Terminal.get_logo()) | ||
|
||
nombre_cuenta = Terminal.account_name() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the method call to prompt_for_account_name
.
The method prompt_for_account_name
should be called instead of account_name
.
print(Terminal.get_logo())
nombre_cuenta = Terminal.prompt_for_account_name()
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
print(Terminal.get_logo()) | |
nombre_cuenta = Terminal.account_name() | |
print(Terminal.get_logo()) | |
nombre_cuenta = Terminal.prompt_for_account_name() |
Tools
Ruff
19-19:
Terminal
may be undefined, or defined from star imports(F405)
21-21:
Terminal
may be undefined, or defined from star imports(F405)
def get_logo(): | ||
return r""" | ||
_,--._ | ||
,' `. | ||
|\ / ,-. ,-. \ /| | ||
)o),/ ( ( o )( o ) ) \.(o( | ||
/o/// /| `-' `-' |\ \\\o\ | ||
/ / |\ \( . , )/ /| \ \ | ||
| | \o`-/ `\/' \-'o/ | | | ||
\ \ `,' `.' / / | ||
\. \ `-' ,'| /\ |`. `-' / ,/ | ||
\`. `.__,' / / \ \ `.__,' ,'/ | ||
\o\ ,' ,' `. `. /o/ | ||
\o`---' ,' `. `---'o/ | ||
`.____,' `.____,' | ||
|
||
_____ _ _ _ _ _ | ||
| __ \ | | | | | | | | | | | ||
| | | | ___ ___ _ _ _ __ ___ ___ _ __ | |_ ___ | | | |_ __ | | ___ __ _ __| | | ||
| | | |/ _ \ / __| | | | '_ ` _ \ / _ | '_ \| __/ __| | | | | '_ \| |/ _ \ / _` |/ _` | | ||
| |__| | (_) | (__| |_| | | | | | | __| | | | |_\__ \ | |__| | |_) | | (_) | (_| | (_| | | ||
|_____/ \___/ \___|\__,_|_| |_| |_|\___|_| |_|\__|___/ \____/| .__/|_|\___/ \__,_|\__,_| | ||
| | | ||
|_| | ||
|
||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add self
parameter to the get_logo
method.
The get_logo
method is missing the self
parameter.
def get_logo(self):
return r"""
_,--._
,' `.
|\ / ,-. ,-. \ /|
)o),/ ( ( o )( o ) ) \.(o(
/o/// /| `-' `-' |\ \\\o\
/ / |\ \( . , )/ /| \ \
| | \o`-/ `\/' \-'o/ | |
\ \ `,' `.' / /
\. \ `-' ,'| /\ |`. `-' / ,/
\`. `.__,' / / \ \ `.__,' ,'/
\o\ ,' ,' `. `. /o/
\o`---' ,' `. `---'o/
`.____,' `.____,'
_____ _ _ _ _ _
| __ \ | | | | | | | | | |
| | | | ___ ___ _ _ _ __ ___ ___ _ __ | |_ ___ | | | |_ __ | | ___ __ _ __| |
| | | |/ _ \ / __| | | | '_ ` _ \ / _ | '_ \| __/ __| | | | | '_ \| |/ _ \ / _` |/ _` |
| |__| | (_) | (__| |_| | | | | | | __| | | | |_\__ \ | |__| | |_) | | (_) | (_| | (_| |
|_____/ \___/ \___|\__,_|_| |_| |_|\___|_| |_|\__|___/ \____/| .__/|_|\___/ \__,_|\__,_|
| |
|_|
"""
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
def get_logo(): | |
return r""" | |
_,--._ | |
,' `. | |
|\ / ,-. ,-. \ /| | |
)o),/ ( ( o )( o ) ) \.(o( | |
/o/// /| `-' `-' |\ \\\o\ | |
/ / |\ \( . , )/ /| \ \ | |
| | \o`-/ `\/' \-'o/ | | | |
\ \ `,' `.' / / | |
\. \ `-' ,'| /\ |`. `-' / ,/ | |
\`. `.__,' / / \ \ `.__,' ,'/ | |
\o\ ,' ,' `. `. /o/ | |
\o`---' ,' `. `---'o/ | |
`.____,' `.____,' | |
_____ _ _ _ _ _ | |
| __ \ | | | | | | | | | | | |
| | | | ___ ___ _ _ _ __ ___ ___ _ __ | |_ ___ | | | |_ __ | | ___ __ _ __| | | |
| | | |/ _ \ / __| | | | '_ ` _ \ / _ | '_ \| __/ __| | | | | '_ \| |/ _ \ / _` |/ _` | | |
| |__| | (_) | (__| |_| | | | | | | __| | | | |_\__ \ | |__| | |_) | | (_) | (_| | (_| | | |
|_____/ \___/ \___|\__,_|_| |_| |_|\___|_| |_|\__|___/ \____/| .__/|_|\___/ \__,_|\__,_| | |
| | | |
|_| | |
""" | |
def get_logo(self): | |
return r""" | |
_,--._ | |
,' `. | |
|\ / ,-. ,-. \ /| | |
)o),/ ( ( o )( o ) ) \.(o( | |
/o/// /| `-' `-' |\ \\\o\ | |
/ / |\ \( . , )/ /| \ \ | |
| | \o`-/ `\/' \-'o/ | | | |
\ \ `,' `.' / / | |
\. \ `-' ,'| /\ |`. `-' / ,/ | |
\`. `.__,' / / \ \ `.__,' ,'/ | |
\o\ ,' ,' `. `. /o/ | |
\o`---' ,' `. `---'o/ | |
`.____,' `.____,' | |
_____ _ _ _ _ _ | |
| __ \ | | | | | | | | | | | |
| | | | ___ ___ _ _ _ __ ___ ___ _ __ | |_ ___ | | | |_ __ | | ___ __ _ __| | | |
| | | |/ _ \ / __| | | | '_ ` _ \ / _ | '_ \| __/ __| | | | | '_ \| |/ _ \ / _` |/ _` | | |
| |__| | (_) | (__| |_| | | | | | | __| | | | |_\__ \ | |__| | |_) | | (_) | (_| | (_| | | |
|_____/ \___/ \___|\__,_|_| |_| |_|\___|_| |_|\__|___/ \____/| .__/|_|\___/ \__,_|\__,_| | |
| | | |
|_| | |
""" |
Ticket
MAN-1191
Descripción
Añadimos la lógica de la carga de documentos, el manejo de los mismos y la creación de carpetas dado el formato correcto.
Checklist
Summary by CodeRabbit
New Features
documents_upload
.Documentation
.gitignore
to ignore unnecessary files.README.md
with project details and endpoint information.