Adiciona API REST e app body para marcação SPS do corpo - #42
Open
gitnnolabs wants to merge 2 commits into
Open
gitnnolabs wants to merge 2 commits into
gitnnolabs wants to merge 2 commits into
Conversation
Expõe POST /api/v1/body/ e /api/v1/body/docx/ com cache por checksum, geração de XML JATS e integração Llama local via HTTP (BODY_*). Inclui comando remove_all_body e variáveis de ambiente de exemplo.
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.
O que esse PR faz?
Introduz o app Django
body, terceira peça da pipeline de marcação SPS (apósreferenceefront), responsável pelo corpo do artigo (<body>).Entregas principais:
POST /api/v1/body/— marcação a partir de texto planoPOST /api/v1/body/docx/— extração do corpo a partir de.docx(Introduction → acknowledgments/references) e marcação, incluindo metadados de tabelas e figurasBody), evitando reprocessamento pelo Llama quando a entrada é idêntica<body>com secções, parágrafos, figuras e tabelas) viabody/data_utils.pyBODY_*em settingsBODY_CHUNK_CHARS)remove_all_bodye targetmake remove_all_bodypara limpar o cacheO padrão arquitetural replica o já adotado em
front/ereference/: ViewSet DRF →resolve_body_result→ provider HTTP → persistência + resposta JSON ou XML.Onde a revisão poderia começar?
get_body_xmlBODY_*e registo do appComo este poderia ser testado manualmente?
.envs/.local/.django):BODY_ENABLED=trueBODY_URL=http://host.docker.internal:11434BODY_MODEL=llama3.2:3bdocker compose -f local.yml run --rm django pytest --reuse-db -m "not llama" body/tests/Algum cenário de contexto que queira dar?
front) e fecha a tríade front / body / back necessária para montagem do XML SPS completo (<article>).BODY_CHUNK_CHARS(default 8000) eBODY_NUM_CTX(default 32768) existem para acomodar textos extensos sem estourar o contexto do modelo local.Screenshots
N/A — PR de API/backend, sem alterações de interface Wagtail.
Quais são tickets relevantes?
SciELO Tools #41 (
chore/scielo-tools-41)Referências
<body>