Add organism classification (taxonomy-first) with diagnostics#2384
Closed
SatoryKono wants to merge 1 commit intomainfrom
Closed
Add organism classification (taxonomy-first) with diagnostics#2384SatoryKono wants to merge 1 commit intomainfrom
SatoryKono wants to merge 1 commit intomainfrom
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Owner
Author
|
Superseded by #2380. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
assay_organism+assay_taxonomy_idв доменном слое (категории:acellular/unicellular/multicellular) с приоритетомtaxonomy_idи диагностикой конфликтов источников.Description
classify_organismвsrc/bioetl/domain/services/organism_classification_service.pyс контрактомOrganismClass(Enum) иOrganismClassificationResult(frozendataclass) и вспомогательными lookup/normalize-функциями.assay_taxonomy_id→ map; при отсутствии валидногоtaxonomy_id— normalizeassay_organism+ alias/dictionary lookup + binomial fallback + keyword rule для вирусов/фагов; при конфликте помечаетсяsource_conflict=True.bioetl.domain.services.__init__для удобного импорта (OrganismClass,OrganismClassificationResult,classify_organism).tests/unit/domain/services/test_organism_classification_service.py, покрывающие требования (viruses/phage, bacteria/fungi, multicellular, aliases, conflicts, invalid input).contract_policy_loader, мелкие формат/типографические правки вbase_config_loaderиmemory_monitor(убраны/упрощены проблемные комменты), чтобыmypy/ruff/isortпроходили.Testing
uv run python -m pytest tests/unit/domain/services/test_organism_classification_service.py— успешно.uv run python -m pytest tests/architecture/test_code_metrics.py::TestFunctionComplexity::test_domain_complexity— успешно (функции в домене в рамках CC limit).uv run python -m mypy --strict src/bioetl/— успешно.uv run python -m ruff format --check src testsиuv run python -m ruff check --select I src tests— успешно после авто-форматирования/фиксинга затронутых файлов.uv run python -m pytest tests/ -x -q— большинство тестов прошло; один E2E упал из-за внешнего500 Internal Server Errorот ChEMBL API при запросе (вне области изменений классификатора) и отмечен как внешний/не относящийся к этой реализации.Codex Task