Skip to content
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

MES #20240808 #203

Merged
merged 3 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ ruff-check:
install:
pyenv virtualenv --force 3.9 data-api-base
pyenv local data-api-base
@eval "$$(pyenv init -)" && pyenv activate data-api-base && uv pip install -r linter-requirements.txt && pre-commit install
@eval "$$(pyenv init -)" && pyenv activate data-api-base && uv pip install -r linter-requirements.txt
@eval "$$(pyenv init -)" && pyenv activate data-api-base && pre-commit install
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ UV is a tool that aims to replace pip and pip-tools for managing Python dependen
make install
```

### Troubleshooting

- If `make install` fails due to pre-commit not found, please run once more `make install`.

## Formatting and static analysis

### Checking formatting and static analysis with `ruff`
Expand All @@ -77,5 +81,7 @@ make ruff-fix
```

## To run check micro service README
* [Recommendation documentation](apps/recommendation/README.md)
* [Compliance documentation](apps/fraud/compliance/api/README.md)

- [Recommendation documentation](apps/recommendation/README.md)

- [Compliance documentation](apps/fraud/compliance/api/README.md)
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ async def save_context(
if self.offer is not None:
context_extra_data["offer_origin_id"] = self.offer.offer_id

for o in offers:
for idx, o in enumerate(offers):
session.add(
PastOfferContext(
call_id=self.call_id,
Expand Down Expand Up @@ -171,7 +171,7 @@ async def save_context(
offer_subcategory_id=o.subcategory_id,
offer_item_rank=o.item_rank,
offer_item_score=o.item_score,
offer_order=o.offer_rank,
offer_order=idx, # order in the final recommendation output list
offer_venue_id=None,
offer_extra_data={
"offer_ranking_score": o.offer_score,
Expand Down
Loading