Skip to content

Debug statistics record score-set and keywords problem.#278

Merged
EstelleDa merged 2 commits intorelease-2024.3.1from
estelle/debugStatisticsRecord
Aug 30, 2024
Merged

Debug statistics record score-set and keywords problem.#278
EstelleDa merged 2 commits intorelease-2024.3.1from
estelle/debugStatisticsRecord

Conversation

@EstelleDa
Copy link
Copy Markdown
Member

Model options are from Class RecordNames(experiment and score-set) and fields options are from Class RecordFields(publication-identifiers, keywords, doi-identifiers, raw-read-identifiers and created-by).

However, score-set doesn't have keywords anymore. Hence, adding a validator to handle this case.

@EstelleDa EstelleDa requested a review from bencap August 29, 2024 06:39
@EstelleDa EstelleDa linked an issue Aug 29, 2024 that may be closed by this pull request
Copy link
Copy Markdown
Collaborator

@bencap bencap left a comment

Choose a reason for hiding this comment

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

Thanks for keeping an eye on the alerts channel Estelle, I appreciate it. If you can just remove the print statements before merging this looks good.

Comment thread src/mavedb/routers/statistics.py Outdated
model_created_by_field = getattr(queried_model, "created_by_id")
model_published_data_field = getattr(queried_model, "published_date")
if field is RecordFields.createdBy:
print("111")
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.

Suggested change
print("111")

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.

oops. Totally forgot them. Thanks Ben!

Comment thread src/mavedb/routers/statistics.py Outdated

return db.execute(query).all()
else:
print("2222")
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.

Suggested change
print("2222")

@EstelleDa EstelleDa merged commit 3963cf9 into release-2024.3.1 Aug 30, 2024
@EstelleDa EstelleDa deleted the estelle/debugStatisticsRecord branch August 30, 2024 00:06
@bencap bencap mentioned this pull request Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Router statistics/record/{model}/{field} gets a wrong parameter

2 participants