Skip to content

Commit 0dc9377

Browse files
Chore: changed directory name again, plus added template to test_manage_itineraries.
1 parent a503f08 commit 0dc9377

11 files changed

Lines changed: 274 additions & 17 deletions

File tree

Travel-Itinerary-Planner/tests/test_file_handler.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

Travel-Itinerary-Planner/tests/test_manage_itineraries.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

Travel_Itinerary_Planner/.flake8

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
max-line-length = 127
3+
max-complexity = 10
4+
select = E9,F63,F7,F82
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
flake8==7.3.0
22
pick==v2.4.0
3-
rich==14.0.0
3+
rich==14.2.0

Travel_Itinerary_Planner/setup.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
from setuptools import setup, find_packages
2+
3+
setup(
4+
name="task_manager_cli", # Updated project name
5+
version="0.2", # Updated version to reflect the new project
6+
packages=find_packages(where='src'), # Automatically locate packages under 'src'
7+
package_dir={'': 'src'}, # Packages are located in the 'src' directory
8+
9+
# Dependencies required for the updated functionality
10+
install_requires=[
11+
"pick==2.4.0",
12+
"python-dateutil>=2.8", # For robust date validation
13+
"rich==14.2.0", # FIRST ISSUE: For formatted table
14+
"colorama==0.4.6",
15+
"markdown-it-py==3.0.0",
16+
"mdurl==0.1.2",
17+
"Pygments==2.19.1",
18+
"six==1.17.0",
19+
"coverage",
20+
"flake8==7.3.0",
21+
"pick==v2.4.0"
22+
],
23+
24+
# Project metadata
25+
author="Gabrielle",
26+
author_email="your-email@example.com",
27+
)

Travel_Itinerary_Planner/src/__init__.py

Whitespace-only changes.
File renamed without changes.

Travel-Itinerary-Planner/src/manage_itineraries.py renamed to Travel_Itinerary_Planner/src/manage_itineraries.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,13 @@ def add_itinerary(itinerary_list, name, location, description, start_date, end_d
4242
}
4343
# Uncomment to print for itinerary validation:
4444
# print(new_itinerary)
45-
46-
itinerary_list.append(new_itinerary)
45+
if itinerary_list:
46+
for itinerary in itinerary_list:
47+
if new_itinerary== itinerary:
48+
print("This itinerary already exists!\nReturning to main menu...")
49+
return False
50+
else:
51+
itinerary_list.append(new_itinerary)
4752
# Uncomment to print for itinerary_list validation:
4853
# print(itinerary_list)
4954

0 commit comments

Comments
 (0)