Skip to content

802 add support for automatic foulborn unique tracking#803

Draft
Ivareh wants to merge 18 commits intomainfrom
802-add-support-for-automatic-foulborn-unique-tracking
Draft

802 add support for automatic foulborn unique tracking#803
Ivareh wants to merge 18 commits intomainfrom
802-add-support-for-automatic-foulborn-unique-tracking

Conversation

@Ivareh
Copy link
Copy Markdown
Member

@Ivareh Ivareh commented Nov 22, 2025

No description provided.

@Ivareh Ivareh requested a review from bogadisa November 22, 2025 16:01
@Ivareh Ivareh linked an issue Nov 22, 2025 that may be closed by this pull request
@Ivareh Ivareh marked this pull request as draft November 22, 2025 16:02
@bogadisa bogadisa marked this pull request as ready for review November 22, 2025 19:07
@bogadisa bogadisa marked this pull request as draft November 22, 2025 19:07
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does nothing

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes an issue where tables with data inserted from the csv files could conflict/generate way too high id's with existing data in the table. Happens when we delete/updated data, which makes the sequence ids behave weirdly. This will choose current max sequence id, then set the next generating sequence id one up from that.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No related uniques?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too much work, there are too many foulborn unques related to every basetype. Needs to be inferred from what's persisted in the database, i.e check what baseTypes is related to which items in Item table, then create relatedUniques from that in basetype table.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential problem. Passage should probably be a separate modifier

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.pathofexile.com/trade/search/Keepers/02np40LeIg

Right now it's currently setup like that (bug probably)

).message


@router.post(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete not post

)
await self.create(db=db, obj_in=modifier_in)
else:
"I know this shit is messy"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make it a comment_

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is an "EMPTY" modifier needed?

deletion_key: str | None = None,
) -> ModelType:
db_objs = db.query(self.model).filter_by(**filter).all()
if isinstance(filter, list) and deletion_key is not None:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be list, but no deletion key -> big problem

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably fine to remove the deltion_key is not none test


class UniqueFoulbornDetector(UniqueDetector):
def _check_if_wanted(self, df: pd.DataFrame) -> pd.DataFrame:
df_filtered = df[df["identified"] & df["mutated"].astype(str) == "True"].loc[
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move all into .loc

response.raise_for_status()


def bulk_update_data(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove bulk

return s.split()


def _lcs_len(a: list[str], b: list[str]) -> float:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add source? wiki link?

return dp[m]


def _diff_chunks(a: list[str], b: list[str]) -> list[tuple[str, str, int]]:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add comment on where this logic comes from

for roll in diff_tuple[:-1]
)
]
dfx.at[i, "textRolls"] = dfx.at[i, "textRolls"] + diff_rolls
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure duplicates are not added

return None

logger.info(
"Its been over 3 days since last created modifiers from carantene modifiers. Retrieving carantene modifiers..."
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change 3 with the settings variable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for automatic foulborn unique tracking

2 participants