Skip to content

This pull request introduces several new features and improvements to the queue API, focusing on enhanced data management and robustness.#90

Merged
goldlabelapps merged 3 commits intomasterfrom
staging
Apr 18, 2026
Merged

This pull request introduces several new features and improvements to the queue API, focusing on enhanced data management and robustness.#90
goldlabelapps merged 3 commits intomasterfrom
staging

Conversation

@goldlabelapps
Copy link
Copy Markdown
Owner

The most important changes include adding endpoints for deleting queue records and renaming columns, improving the LinkedIn CSV import process for large files, updating the queue data retrieval to provide more useful information, and implementing a global validation error handler. These updates make the API more flexible, robust, and user-friendly.

New API Endpoints:

  • Added a DELETE /queue/delete endpoint to allow deletion of queue records by ID. [1] [2]
  • Added a POST /queue/alter/rename_column endpoint to support renaming columns in the queue table. [1] [2]

LinkedIn CSV Import Improvements:

  • Refactored the LinkedIn CSV import to handle large files more robustly, dynamically detect headers, batch insert records, and add a group column. Now imports from linkedin.csv instead of linkedin_sample.csv.

Queue Data Retrieval Enhancements:

  • Changed the queue summary endpoint to return a random example record instead of just the most recently updated, and now also returns unique collections and groups present in the queue.

Error Handling:

  • Implemented a global validation error handler that returns errors in a consistent make_meta format. [1] [2]

Other:

  • Updated router registration in app/api/queue/__init__.py to include the new endpoints.
  • Added a sample output file queue_output.txt showing the new data structure, including the new group column.

Improve queue API: make LinkedIn CSV import robust and batched, add column-rename endpoints, and return more recent records. Changes include: switch import to linkedin.csv with dynamic header detection, skip blank rows, batch inserts (500) with an added 'group' value and imported count returned; update get route to return 10 most-recent records instead of one; add new rename/rename_column route handlers to ALTER TABLE RENAME COLUMN with error handling; wire up the rename router in queue __init__.py and add a sample queue_output.txt. These updates improve import reliability and provide a programmatic column-rename API.
Read queue: query DISTINCT collection and group values and include them in the response (collections, groups). Rename response keys for clarity (queued -> in_queue, most_recent -> example and return only the first example).

Import LinkedIn CSV: normalize CSV-to-DB mapping (url -> linkedin, email_address -> email), update batch tuple order and INSERT column list to match the renamed columns.

Delete rename.py: remove the /queue/alter/rename_column route (runtime column rename endpoint) for safety. These changes expose more queue metadata for the UI and standardize field names used by the LinkedIn importer.
Add a new DELETE /queue/delete route to remove queue records by id and register it in the queue router. Change the GET queue summary to return a random example record (ORDER BY RANDOM() LIMIT 1) instead of the most recently updated records. Update the LinkedIn import to point to linkedin.csv instead of the sample file. Add a global RequestValidationError handler in app.main that returns errors using the existing make_meta format, and add required imports for that handler.
@github-project-automation github-project-automation Bot moved this to Backlog in Python Apr 18, 2026
@goldlabelapps goldlabelapps added this to the Proof of Concept milestone Apr 18, 2026
@goldlabelapps goldlabelapps self-assigned this Apr 18, 2026
@goldlabelapps goldlabelapps merged commit aec9cee into master Apr 18, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Python Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant