Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
166 changes: 0 additions & 166 deletions .cursor/.dev/1-update-cookiecutter-test-template.md

This file was deleted.

5 changes: 4 additions & 1 deletion .cursor/.dev/next_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Import the problem lists
sys.path.append(str(Path(__file__).parent.parent.parent))
from problem_lists import available_lists
from problem_lists.unscrapable import get_unscrapable_numbers
from problem_lists.utils import get_existing_problems


Expand All @@ -15,6 +16,7 @@ def get_next_problem(tag_names=None):
tag_names = list(available_lists.keys())

existing_problems = get_existing_problems()
unscrapable_numbers = get_unscrapable_numbers()

# Find the list with the lowest missing problems
best_list = None
Expand All @@ -24,7 +26,8 @@ def get_next_problem(tag_names=None):
for tag_name, problem_tuples in available_lists.items():
if tag_name in tag_names:
problem_numbers = {num for num, _ in problem_tuples}
missing = problem_numbers - existing_problems
# Exclude unscrapable problems from missing problems
missing = problem_numbers - existing_problems - unscrapable_numbers
missing_count = len(missing)

if missing_count > 0 and missing_count < min_missing:
Expand Down
28 changes: 28 additions & 0 deletions .cursor/.dev/problem_lists/unscrapable.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Unscrapable Problems List
# Problems that cannot be scraped due to being premium, having API issues, or other technical limitations

# Format: (problem_number, problem_name)
UNSCRAPABLE_PROBLEMS = [
(252, "meeting-rooms"),
(253, "meeting-rooms-ii"),
(261, "graph-valid-tree"),
(271, "encode-and-decode-strings"),
(323, "number-of-connected-components-in-an-undirected-graph"),
# Add more unscrapable problems as discovered
]


# Helper function to check if a problem is unscrapable
def is_unscrapable(problem_number: int) -> bool:
"""Check if a problem number is in the unscrapable list."""
return any(num == problem_number for num, _ in UNSCRAPABLE_PROBLEMS)


def is_unscrapable_by_name(problem_name: str) -> bool:
"""Check if a problem name is in the unscrapable list."""
return any(name == problem_name for _, name in UNSCRAPABLE_PROBLEMS)


def get_unscrapable_numbers() -> set[int]:
"""Get all unscrapable problem numbers as a set."""
return {num for num, _ in UNSCRAPABLE_PROBLEMS}
17 changes: 0 additions & 17 deletions .cursor/.dev/update_tags.json

This file was deleted.

9 changes: 5 additions & 4 deletions .cursor/.dev/update_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,14 @@ def update_tags(tag_names=None):
# Only include missing problems in the update
if missing_problems:
update_tags[tag_name] = sorted(missing_problems)
print(
f"{tag_name}: Missing {len(missing_problems)} problems: {sorted(missing_problems)}"
)
missing_list = sorted(missing_problems)
print(f"{tag_name}: Missing {len(missing_problems)} problems: {missing_list}")

if removed_problems:
removed_list = sorted(removed_problems)
print(
f"{tag_name}: Removed {len(removed_problems)} problems: {sorted(removed_problems)} (not included in update)"
f"{tag_name}: Removed {len(removed_problems)} problems: {removed_list} "
f"(not included in update)"
)

if not changes_found:
Expand Down
Loading