Adicionar chave text em Abstract.data #1072
Merged
+290
−0
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?
Adiciona a chave
textno dicionário retornado porAbstract.data, contendo o texto plano concatenado do abstract:titleepde cada seçãopTambém corrige bug no property
kwdsque falhava quando o abstract não possui parent node.Onde a revisão poderia começar?
packtools/sps/models/v2/abstract.py- linhas 167-190 (novo propertytext) e linha 208 (adição da chave no dicionáriodata).Como este poderia ser testado manualmente?
Execute os testes:
pytest tests/sps/models/v2/test_abstract.py -vAlgum cenário de contexto que queira dar?
O property
textverifica a presença de sections vianode.xpath("sec")antes de iterar, evitando conversão desnecessária do generatorself.sectionspara lista. Os generatorsself.sectionseself.pcontinuam sendo consumidos apenas uma vez no propertydata.Screenshots
N/A - mudanças em API de dados.
Quais são tickets relevantes?
Issue #[número será vinculado automaticamente]
Referências
BaseTextNodepara extração deplain_textpacktools/sps/models/v2/article_xref.py(uso da chavetext)Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.