feat/offers_module #2

Open
i.bahlai wants to merge 22 commits from feat/offers_module into 1.0.0
Owner
No description provided.
feat(ci): add development pipeline
Some checks failed
CI Pipeline - Development / Code Quality Check (pull_request) Failing after 1m2s
CI Pipeline - Development / Run Tests (pull_request) Has been skipped
CI Pipeline - Development / Build Docker Image (pull_request) Has been skipped
203d9d50d0
fix(ci): change some issues in pipeline
Some checks failed
CI Pipeline - Development / Code Quality Check (pull_request) Failing after 1m6s
CI Pipeline - Development / Run Tests (pull_request) Has been skipped
CI Pipeline - Development / Build Docker Image (pull_request) Has been skipped
2d8e2b1d7c
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SQLModel generates __init__ with **data instead of individual field params, so
Depends(OfferSearchFilters) doesn't extract query params. Replaced with a standalone
_search_filters dependency function using Annotated[list[str] | None, Query()] for
list params. Also renamed list_offers → list_entities and changed return type to
tuple[list[OfferListItemResponse], int] to match BaseCRUDResource expectations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace manual session/repository management with BaseSQLUnitOfWork inheritance.
Override __aexit__ to rollback on exception instead of always committing, which
the base class would do (aclose always commits when is_transaction=True).

Note: required patching repository/__init__.py to export SQL and REST classes that
unit_of_work.sql depends on — this is a version mismatch bug in the private indexes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(offers): fix ruff import order and mypy override violations
Some checks failed
CI Pipeline - Development / Code Quality Check (pull_request) Failing after 43s
CI Pipeline - Development / Run Tests (pull_request) Has been skipped
CI Pipeline - Development / Build Docker Image (pull_request) Has been skipped
7210d95671
- Sort import blocks per ruff I001 in offers_router.py and test_offers_use_cases.py
- Add type: ignore[override] to list_entities (intentionally returns OfferListItemResponse
  instead of Offer domain object, and uses narrower OfferSearchFilters filter type)
- Fix int | None passed to list_active by using limit or 100

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Offer, OfferSource, Category, Seniority, Technology, WorkMode, Location,
ContractType, and all link/association tables. Domain model reflects the
work-bee CompositeJobPost aggregation schema with public_id-based routing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
OfferListItemResponse, OfferDetailResponse, OfferFacetsResponse,
OfferSearchFilters with all facet types. OfferImportSummary for tracking
import run statistics.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
OfferRepository with list_active (filtered+faceted queries) and get_by_public_id.
Reference table repos (Category, Seniority, Technology, WorkMode, Location,
ContractType) with upsert-by-slug. Link repos (OfferCategoryLink etc.) with
bulk-replace pattern. Removes old reference_item_repository placeholder.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Mappers: build_composite_key (SHA-256 dedup), normalize_lookup_value (slug
normalization with C/C#/C++ disambiguation), build_offer_*_response builders.
Use cases: import_offers (full upsert pipeline via OffersUoW), enqueue_offers_import
(fires the taskiq task), task_import_offers (cron 0 6-18/2 * * *).
Removes old placeholder facade/persist/task_process files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Module facade exports OfferService and enqueue_offers_import for app registration.
CLI command 'offers import' enqueues the taskiq import task. E2e test covers
the main HTTP endpoints against a running stack.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat(db): add initial Alembic migration for offers tables
Some checks failed
CI Pipeline - Development / Code Quality Check (pull_request) Failing after 1m16s
CI Pipeline - Development / Run Tests (pull_request) Has been skipped
CI Pipeline - Development / Build Docker Image (pull_request) Has been skipped
3c8bdc74c2
Creates all 14 offers-related tables: offers, offer_sources, categories,
seniorities, technologies, work_modes, locations, contract_types, and
all link/compensation tables. Sets up unique constraints and indexes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(linter): remove call-arg from mypy
Some checks failed
CI Pipeline - Development / Code Quality Check (pull_request) Failing after 1m11s
CI Pipeline - Development / Run Tests (pull_request) Has been skipped
CI Pipeline - Development / Build Docker Image (pull_request) Has been skipped
c2e36a9eaf
fix(offers): address code review — move filter/facet types to domain, fix double deserialization
Some checks failed
CI Pipeline - Development / Code Quality Check (pull_request) Failing after 1m9s
CI Pipeline - Development / Run Tests (pull_request) Has been skipped
CI Pipeline - Development / Build Docker Image (pull_request) Has been skipped
667909b517
- Move OfferSearchFilters, FacetCountResponse, LocationFacetCountResponse,
  OfferFacetsResponse to domain/schemas.py; re-export from contracts.
  Fixes import-linter violation (persistence importing from contracts).
- Fix double CompositeJobPost deserialization in build_offer_detail_response
  via shared _build_list_item_fields helper.
- Replace `limit or 100` with DEFAULT_LIMIT in OfferService.list_entities.
- Remove redundant btrim in find_by_source_pairs (source_offer_id is already
  normalized before storage).
- Add return type annotations to derive_posted_at / derive_expiration_date.
- Add comment to _utcnow() explaining naive datetime for DB compatibility.
- Add comment to OffersResource sentinel schemas.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
refactor(offers): promote private mapper helpers to public API
Some checks failed
CI Pipeline - Development / Code Quality Check (pull_request) Failing after 57s
CI Pipeline - Development / Run Tests (pull_request) Has been skipped
CI Pipeline - Development / Build Docker Image (pull_request) Has been skipped
1a5871b653
Six functions that implement real domain operations were accidentally
private. Renamed to follow the established derive_*/build_* convention:
- _build_location_responses -> build_location_responses
- _build_compensation_responses -> build_compensation_responses
- _build_source_responses -> build_source_responses
- _expected_technology_values -> derive_expected_technology_values
- _optional_technology_values -> derive_optional_technology_values
- _work_schedule_values -> derive_work_schedule_values

Removed the _build_list_item_fields intermediary — both build_offer_*
functions now construct their fields directly from a single snapshot,
keeping the same single-deserialization guarantee.

_slugify and _unique_ordered remain private (pure implementation internals).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
chore(workflows): remove unused task_heartbeat
Some checks failed
CI Pipeline - Development / Code Quality Check (pull_request) Failing after 44s
CI Pipeline - Development / Run Tests (pull_request) Has been skipped
CI Pipeline - Development / Build Docker Image (pull_request) Has been skipped
7f60f15c1c
No scheduler entry, no callers — purely decorative smoke test
that was never wired to any monitoring.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Some checks failed
CI Pipeline - Development / Code Quality Check (pull_request) Failing after 44s
CI Pipeline - Development / Run Tests (pull_request) Has been skipped
CI Pipeline - Development / Build Docker Image (pull_request) Has been skipped
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/offers_module:feat/offers_module
git switch feat/offers_module

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 1.0.0
git merge --no-ff feat/offers_module
git switch feat/offers_module
git rebase 1.0.0
git switch 1.0.0
git merge --ff-only feat/offers_module
git switch feat/offers_module
git rebase 1.0.0
git switch 1.0.0
git merge --no-ff feat/offers_module
git switch 1.0.0
git merge --squash feat/offers_module
git switch 1.0.0
git merge --ff-only feat/offers_module
git switch 1.0.0
git merge feat/offers_module
git push origin 1.0.0
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JestEldorado.pl/eldo-api!2
No description provided.